asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Blow (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[release-0.9.3-pre-rc]: [NO ISSUE][TX] Fix DatasetLock for Multiple Index Builds
Date Sun, 12 Nov 2017 19:32:36 GMT
Michael Blow has posted comments on this change.

Change subject: [NO ISSUE][TX] Fix DatasetLock for Multiple Index Builds
......................................................................


Patch Set 5:

(3 comments)

https://asterix-gerrit.ics.uci.edu/#/c/2144/5/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/lock/DatasetLock.java
File asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/lock/DatasetLock.java:

PS5, Line 108: dsModifyCounter.decrement();
             :                 if (dsModifyCounter.intValue()
decrementAndGet()


PS5, Line 132:         InterruptUtil.doUninterruptibly(() -> {
             :             synchronized (indexBuildCounter) {
             :                 if (indexBuildCounter.getValue() > 0) {
             :                     indexBuildCounter.increment();
             :                 } else {
             :                     while (true) {
             :                         synchronized (dsModifyCounter) {
             :                             if (dsModifyCounter.getValue() == 0) {
             :                                 indexBuildCounter.increment();
             :                                 return;
             :                             }
             :                         }
             :                         indexBuildCounter.wait();
             :                     }
             :                 }
             :             }
             :         });
why the while(true)?  note that this will increment indexBuildCounter every time it is interrupted,
is that right?  if not, seems you should move lines 133-136 outside of the doUninterruptibly()...


PS5, Line 154: indexBuildCounter.decrement();
             :             if (indexBuildCounter.intValue()
decrementAndGet


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3bea3ff2075d952ab13402b0c445c464b431c0f5
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: release-0.9.3-pre-rc
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mblow@apache.org>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-HasComments: Yes

Mime
View raw message