Murtadha Hubail has posted comments on this change.

Change subject: ASTERIXDB-1516: Unable to find free page in buffer cache after 
3 cycles
......................................................................


Patch Set 1:

(4 comments)

Just minor comments and suggestions.

https://asterix-gerrit.ics.uci.edu/#/c/1038/1/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java
File 
hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java:

Line 370:                 while (cPage != null) {
This loop is repeated three times inside this method. You may refactor it as  

private CachedPage findWinnerInBucket(long dpid, CacheBucket bucket, CachedPage 
victim)


Line 1178:         if (victim != null) {
I think if you do similar check in here as findPageInner, the code will be 
easier to follow. i.e.

if (victim == null) {
    return null;
}


Line 1259:                 finally{
formatting


Line 1298:                         do {
do we need this do/while loop?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I46fa6bbda8c2f81e5e570dd6c07e4f4b794ef5bb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-HasComments: Yes

Reply via email to