This is an automated email from the ASF dual-hosted git repository.

timoninmaxim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new c4deea44f36 IGNITE-23355 Fix clusterPartitionsCountByState metric 
failure if topology not initialized (#11582)
c4deea44f36 is described below

commit c4deea44f36700f636b34348c525404ccc771cbc
Author: Alexander Chesnokov <[email protected]>
AuthorDate: Tue Oct 15 17:07:10 2024 +0300

    IGNITE-23355 Fix clusterPartitionsCountByState metric failure if topology 
not initialized (#11582)
---
 .../apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java
index 46bdae17e8a..d5157063bff 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java
@@ -314,6 +314,9 @@ public class CacheGroupMetricsImpl {
     private int clusterPartitionsCountByState(GridDhtPartitionState state) {
         GridDhtPartitionFullMap partFullMap = 
ctx.topology().partitionMap(true);
 
+        if (partFullMap == null)
+            return 0;
+
         int cnt = 0;
 
         for (UUID nodeId : partFullMap.keySet())

Reply via email to