Luo Chen has posted comments on this change.

Change subject: [ASTERIXDB-2414][STO] Fix name of merge files
......................................................................


Patch Set 5:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/2820/4/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndexFileManager.java
File 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndexFileManager.java:

PS4, Line 212:         String end = lastTimestampRange[1];
             :         if (end.compareTo(start) <= 0) {
             :             throw new IllegalArgumentException(
             :                     "A Merge file must have end greater than 
start. Found end: " + end + " and start: " + start);
             :         }
             :         // Get the range of timestamps by taking the earliest 
and the latest timestamps
             :         return new 
LSMComponentFileReferences(baseDir.getChild(start + DELIMITER + end), null, 
null);
             :     }
             : 
> The alphabetical comparison is because the start and end follow the format 
Oh I see. But even in this case, we have lost the information that 1-4 is 
excluded from this component.  It would lead to undefined behaviors.

For example, consider the case that the system crashes before the merge 
operation cleans up old components, but the new one has already formed (this 
could happen frequently because we can only clean up old components after all 
queries referencing them have completed). The recovery would be tricky in this 
case. First, now the recovery assumes components are named start-end, then how 
5-1, 10-7, 15-11 are handled? Even this can be handled properly, it will find 
out 5-1, 5-11, 11-15, which are illegal because they contain overlapping ranges 
and none of them could dominate others (1-15 would be fine since it contains 
all previous components).


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2820
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I861765bc0f293bdfdf0285f97884d536204fdb1e
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Luo Chen <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Wail Alkowaileet <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: Yes

Reply via email to