Yingyi Bu has posted comments on this change. Change subject: Avoid always merging old components in prefix policy ......................................................................
Patch Set 7: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/1818/6/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/PrefixMergePolicy.java File hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/PrefixMergePolicy.java: PS6, Line 273: } > Not sure I fully understand this correctly. But the idea is quite a special What I proposed is almost the same as what you're doing. Since the current signature doesn't have the newly added component, there seems some wasted work. The special handling of FLUSH is because a FLUSH-result component can skip this method but a MERGE-result component must enter this method. In your current patch, you select the first mergeable window that ranges from [i, j], where i and j are between 0 to n (n =immutableComponents.size() ). Assume immutableComponents is ordered from younger to older, If we know that the new component is at position k within immutableComponents, then, -- for MERGE-result component, you only need to select the first mergeable window [k, j'], where j'>k and j'<n; -- for FLUSH-result component, you only need to select the last mergeable window [k', j''], where k'>=k and j'' is the oldest FLUSH-result component. The mergeable criteria is the same as what you do now. But maybe the current implementation already skip most un-mergeable cases. I'll trace more of the implementation to see what happens if there are more components. -- To view, visit https://asterix-gerrit.ics.uci.edu/1818 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I464da3fed38cded0aee7b319a35664eae069a2ba Gerrit-PatchSet: 7 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Luo Chen <[email protected]> Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Jianfeng Jia <[email protected]> Gerrit-Reviewer: Luo Chen <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]> Gerrit-HasComments: Yes
