Apache9 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_r310461123
##########
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:
Yes, we should call retainByWal before cleanup. So we must call retainByWal
in the rpc handler thread, before putting it into the ringbuffer of WAL, I
think this is enough to make sure that we call retainByWal before cleanup.
----------------------------------------------------------------
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