You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/09/21 14:38:53 UTC

[GitHub] [ignite] ascherbakoff commented on a change in pull request #8254: IGNITE-13458 RebalancingPartitionsTotal metrics

ascherbakoff commented on a change in pull request #8254:
URL: https://github.com/apache/ignite/pull/8254#discussion_r492100353



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
##########
@@ -164,6 +164,10 @@ public GridDhtPartitionDemander(CacheGroupContext grp) {
         mreg.register("RebalancingPartitionsLeft", () -> rebalanceFut.partitionsLeft.get(),
             "The number of cache group partitions left to be rebalanced.");
 
+        mreg.register("RebalancingPartitionsTotal",
+            () -> rebalanceFut.rebalancingParts.values().stream().mapToInt(Set::size).sum(),

Review comment:
       This value is a constant and should be precomputed on future creation to make metrics overhead as low as possible.




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