From c4deea44f36700f636b34348c525404ccc771cbc Mon Sep 17 00:00:00 2001 From: Alexander Chesnokov Date: Tue, 15 Oct 2024 17:07:10 +0300 Subject: [PATCH] IGNITE-23355 Fix clusterPartitionsCountByState metric failure if topology not initialized (#11582) --- .../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 46bdae17e8a7c..d5157063bff20 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 @@ private int nodePartitionsCountByState(UUID nodeId, GridDhtPartitionState state) private int clusterPartitionsCountByState(GridDhtPartitionState state) { GridDhtPartitionFullMap partFullMap = ctx.topology().partitionMap(true); + if (partFullMap == null) + return 0; + int cnt = 0; for (UUID nodeId : partFullMap.keySet())