Apache9 commented on code in PR #5168:
URL: https://github.com/apache/hbase/pull/5168#discussion_r1164170325
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java:
##########
@@ -1070,4 +1070,21 @@ MetricsReplicationGlobalSourceSource getGlobalMetrics() {
ReplicationQueueStorage getQueueStorage() {
return queueStorage;
}
+
+ boolean addTotalBufferUsed(long size) {
Review Comment:
Please add comments to mention the meaning of the return value.
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java:
##########
@@ -1070,4 +1070,21 @@ MetricsReplicationGlobalSourceSource getGlobalMetrics() {
ReplicationQueueStorage getQueueStorage() {
return queueStorage;
}
+
+ boolean addTotalBufferUsed(long size) {
Review Comment:
After checking the later code, I think here we'd better introduce two
methods, one is acquire, which returns a boolean, the other is release, which
returns nothing. And they could both call a private method, where we change the
totalBufferUsed, and record the new usage in metrics.
This will be much clearer.
--
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]