Clone
Abdullah Alamoudi <bamousaa@gmail.com>
committed
on 21 Nov 17
[ASTERIXDB-2169][STO][TX] Unblock modifications during full scan
- user model changes: no
- storage format changes: no
- interface changes: … Show more
[ASTERIXDB-2169][STO][TX] Unblock modifications during full scan

- user model changes: no

- storage format changes: no

- interface changes: yes

 - added ILSMHarness.replaceMemoryComponentsWithDiskComponents

details:

- During a long running query aka full scan, two things block

 incoming modifications:

 1) Memory component gets full, is flushed but can't be recycled

    because of the search operation inside the component.

 2) Read latches on the memory component not being released and

    the memory component search cursor is not advancing.

 The two cases are addressed in this change for the LSMBTree but

 not yet addressed for other indexes.

 The proposed solution for case (1) is to poll memory components

 states every n records during the search operation. If a memory

 component was found to have been flushed, its cursor is moved

 to the corresponding disk component allowing the memory

 component to be recycled.

 The proposed solution for case (2) is to check memory component

 cursor every n records. If the cursor has not advanced and the

 component has writers, then the latches over the leaf page are

 released, and the cursor re-do the operation entering from the

 tree root.

- Added a test case.

- Added performance traces for enter and exit components.

Change-Id: I37ba52f6324ed1c5a78465c3a8cbcd351f1ed5bc

Reviewed-on: https://asterix-gerrit.ics.uci.edu/2166

Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Luo Chen <cluo8@uci.edu>

Show less

master + 3 more