asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yingyi Bu (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Avoid always merging old components in prefix policy
Date Sat, 10 Jun 2017 01:03:30 GMT
Yingyi Bu has posted comments on this change.

Change subject: Avoid always merging old components in prefix policy
......................................................................


Patch Set 5:

(5 comments)

https://asterix-gerrit.ics.uci.edu/#/c/1818/5/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:

PS5, Line 47: take
taken


PS5, Line 270: @return
complete the java doc


PS5, Line 275: immutableComponents.get(i).getState() != ComponentState.READABLE_UNWRITABLE
This probably won't happen because this method is called from a synchronized block from LSMHarness?


PS5, Line 284: immutableComponents.get(j).getState() != ComponentState.READABLE_UNWRITABL
This probably won't happen because this method is called from a synchronized block from LSMHarness?


PS5, Line 303:  // otherwise, we can look ahead to see if adding more younger components
             :                     // could pass the ratio check.
It looks to me that the old algorithm is O(2*n) for the worst case. However, I suspect this
algorithm is of O(n^2) for the worst case.

This method, as part of diskComponentAdded() is run in the synchronized block of primaryIndexOpTracker,
 i.e., synchronized(opTracker) in LSMHarness.  That means, this method will block consequent
reads, writes, merges, and flushes on all local partitions of the dataset until it's done.

Therefore, the algorithm here has to be very fast.  However, I couldn't think of a O(n) approach
quickly -- maybe it's not possible...  But running that with O(n^2) doesn't seem desirable.


-- 
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: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen <cluo8@uci.edu>
Gerrit-Reviewer: Ian Maxon <imaxon@apache.org>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <jianfeng.jia@gmail.com>
Gerrit-Reviewer: Luo Chen <cluo8@uci.edu>
Gerrit-Reviewer: Yingyi Bu <buyingyi@gmail.com>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-HasComments: Yes

Mime
View raw message