q977734161 commented on a change in pull request #768: HBASE-23224 Delete the TODO tag URL: https://github.com/apache/hbase/pull/768#discussion_r343523328
########## File path: hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java ########## @@ -848,14 +850,24 @@ private void syncLoop() throws Throwable { StringUtils.humanSize(syncedPerSec))); } - // update webui circular buffers (TODO: get rid of allocations) - final SyncMetrics syncMetrics = new SyncMetrics(); + // update webui circular buffers + SyncMetrics syncMetrics = null; + if (syncMetricsQueue.isAtFullCapacity()) { + if (syncMetricsQueueIndex == syncMetricsQueueSize) { + syncMetricsQueueIndex = 0; + } + syncMetrics = syncMetricsQueue.get(syncMetricsQueueIndex); + syncMetricsQueueIndex ++; Review comment: Yes, syncMetricsQueueIndex ++ in order reuse next SyncMetrics Object in syncMetricsQueue. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services