Clone
Murtadha Makki Al Hubail
committed
on 28 Aug 18
[ASTERIXDB-2444][STO] Avoid Using System Clock in Storage
- user model changes: no
- storage format changes: yes
- interface changes: yes

D… Show more
[ASTERIXDB-2444][STO] Avoid Using System Clock in Storage

- user model changes: no

- storage format changes: yes

- interface changes: yes

Details:

- Replace the usage of system clock timestamps in LSM

 index components file names by a sequencer. The next

 sequence id to use is determined by checking the list

 of existing components on disk. Note that due to a

 rollback, an index checkpoint file may have last valid

 component sequence which is greater than what is on disk.

 This should not cause any issues since only components

 that have a sequence greater than that appears in the

 checkpoint will be deleted.

- Replace the usage of system clock timestamps in LSM

 index components ids by a monotonically increasing

 sequencer. The sequencer is initialized after restarts

 by the last valid component id that appears in the

 index checkpoint.

- Refactor the logic to generate flush/merge file names.

- Refactor the logic to check invalid components.

- Adapt test cases to new naming format.

Change-Id: I9dff8ffb38ce8064a199d03b070ed1f5b924b8a4

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

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

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

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

Reviewed-by: Murtadha Hubail <mhubail@apache.org>

Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>

Show less