You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/11/14 12:49:16 UTC

[GitHub] [ratis] adoroszlai commented on a diff in pull request #782: RATIS-1743. Memory leak in SegmentedRaftLogWorker due to metrics.

adoroszlai commented on code in PR #782:
URL: https://github.com/apache/ratis/pull/782#discussion_r1021480921


##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLogWorker.java:
##########
@@ -208,8 +243,7 @@ synchronized void updateIndex(long i) {
     this.workerThread = new Thread(this::run, name);
 
     // Server Id can be null in unit tests
-    metricRegistry.addDataQueueSizeGauge(queue);
-    metricRegistry.addLogWorkerQueueSizeGauge(writeTasks.q);
+    metricRegistry.addQueueSizeGauges(queues);
     metricRegistry.addFlushBatchSizeGauge(() -> (Gauge<Integer>) () -> flushBatchSize);

Review Comment:
   The `syncBatchSize` gauge this creates still holds `SegmentedRaftLogWorker` after `close()`.



-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org