acelyc111 commented on code in PR #1463:
URL: 
https://github.com/apache/incubator-pegasus/pull/1463#discussion_r1181355237


##########
src/replica/duplication/duplication_sync_timer.cpp:
##########
@@ -65,15 +64,13 @@ void duplication_sync_timer::run()
     req->node = _stub->primary_address();
 
     // collects confirm points from all primaries on this server
-    uint64_t pending_muts_cnt = 0;
     for (const replica_ptr &r : get_all_primaries()) {
         auto confirmed = 
r->get_duplication_manager()->get_duplication_confirms_to_update();
         if (!confirmed.empty()) {
             req->confirm_list[r->get_gpid()] = std::move(confirmed);
         }
-        pending_muts_cnt += 
r->get_duplication_manager()->get_pending_mutations_count();
+        METRIC_SET(*(r->get_duplication_manager()), dup_pending_mutations);

Review Comment:
   Now that we can get the replica the metric belongs to, why not set the 
metric via `replica_ptr` directly?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to