wchevreuil commented on a change in pull request #437: HBASE-22539 WAL
corruption due to early DBBs re-use when Durability.A…
URL: https://github.com/apache/hbase/pull/437#discussion_r310392369
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerCall.java
##########
@@ -141,14 +147,43 @@ public void done() {
cleanup();
}
+ private void release(int mask) {
+ for (;;) {
+ int ref = reference.get();
+ if ((ref & mask) == 0) {
+ return;
+ }
+ int nextRef = ref & (~mask);
+ if (reference.compareAndSet(ref, nextRef)) {
+ if (nextRef == 0) {
+ if (this.reqCleanup != null) {
+ this.reqCleanup.run();
+ }
+ }
+ return;
+ }
+ }
+ }
+
@Override
Review comment:
So here we rely that _cleanup()_ will never be called before
_retainByWal()_, otherwise the rpc call may end before the wal write is done?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services