Store stats can be `null` if e.g. the shard was already closed when the stats where retrieved. Don't record those shards in the sizes map to fix an NPE in this case.
This commit is contained in:
parent
16642f1c74
commit
f8f08ba3a7
|
@ -331,6 +331,9 @@ public class InternalClusterInfoService implements ClusterInfoService, ClusterSt
|
|||
newShardRoutingToDataPath.put(shardRouting, s.getDataPath());
|
||||
|
||||
final StoreStats storeStats = s.getStats().getStore();
|
||||
if (storeStats == null) {
|
||||
continue;
|
||||
}
|
||||
final long size = storeStats.sizeInBytes();
|
||||
final long reserved = storeStats.getReservedSize().getBytes();
|
||||
|
||||
|
|
Loading…
Reference in New Issue