You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/11/06 01:12:35 UTC

[GitHub] [hbase] xcangCRM commented on a change in pull request #768: HBASE-23224 Delete the TODO tag

xcangCRM commented on a change in pull request #768: HBASE-23224 Delete the TODO tag
URL: https://github.com/apache/hbase/pull/768#discussion_r342876015
 
 

 ##########
 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:
   should be `syncMetricsQueueIndex++; `?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services