bshashikant commented on a change in pull request #102:
URL: https://github.com/apache/incubator-ratis/pull/102#discussion_r426381181



##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/impl/PendingRequests.java
##########
@@ -87,7 +87,10 @@ void release(Message message) {
       this.resource = new RequestLimits(elementLimit, byteLimit);
       this.raftServerMetrics = raftServerMetrics;
 
+      raftServerMetrics.removeNumPendingRequestsGauge();
       raftServerMetrics.addNumPendingRequestsGauge(resource::getElementCount);
+

Review comment:
       I think it would be better to remove the metrics when the leader steps 
down instead of removing and then adding it back ? what do you think?




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


Reply via email to