Apache9 commented on code in PR #5168:
URL: https://github.com/apache/hbase/pull/5168#discussion_r1172022613


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java:
##########
@@ -366,20 +352,17 @@ void clearWALEntryBatch() {
         return;
       }
     }
-    LongAccumulator totalToDecrement = new LongAccumulator((a, b) -> a + b, 0);
-    entryReader.entryBatchQueue.forEach(w -> {
-      entryReader.entryBatchQueue.remove(w);
-      w.getWalEntries().forEach(e -> {
-        long entrySizeExcludeBulkLoad = 
ReplicationSourceWALReader.getEntrySizeExcludeBulkLoad(e);
-        totalToDecrement.accumulate(entrySizeExcludeBulkLoad);
-      });
-    });
+    long totalToDecrement = 0;

Review Comment:
   Should name it totalReleasedBytes or totalDecremented? As we do the 
decrement on the fly, the final number is just used for logging.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to