Luo Chen has posted comments on this change.

Change subject: [ASTERIXDB-2453] Add Improved Constant Merge Policy
......................................................................


Patch Set 4:

(4 comments)

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

PS2, Line 905: 
             :     public Optional<Long> getLatestDiskComponentSequence() {
             :      
> You cannot use this value to get the correct number of flushes in the merge
Thanks! I have adapted this new method, and reverted the previous changes. This 
algorithm uses numOfFlushes to construct a binary tree representing the flush 
history. If numOfFlushes is slightly wrong, then the shape of the binary tree 
might be a little bit different, and in the worst case the policy might 
schedule some sub-optimal merges (but won't be too worse).
For EMPTY_COMPONENT, they won't be added to the component list, so basically 
calling the merge policy again will be a no op (the policy won't find any merge 
to schedule).


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

Line 38:     private int numComponents;
> +1. Also, if you plan to use it, please use log4j2 loggers.
Done


Line 64:         int size = immutableComponents.size();
> +1
Done


PS2, Line 144: // TODO: for now, we simply block the ingestion when there is an 
ongoing merge
             :         List<ILSMDiskComponent> immutableComponents = 
index.getDiskComponents();
             :         return isMergeOngoing(immutableComponents);
             :     }
             : 
> return isMergeOngoing(immutableComponents);
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5f83a4d5fdd3f036b823c906df1760f5110ae0a
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
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: Steven Jacobs <[email protected]>
Gerrit-HasComments: Yes

Reply via email to