Skip to content

Commit 62bdc83

Browse files
committed
Assert write thread pool stats are present
1 parent 8ad414b commit 62bdc83

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/src/main/java/org/elasticsearch/cluster/routing/allocation/WriteLoadConstraintMonitor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public void onNewInfo(ClusterInfo clusterInfo) {
8181
clusterInfo.getNodeUsageStatsForThreadPools().forEach((nodeId, usageStats) -> {
8282
final NodeUsageStatsForThreadPools.ThreadPoolUsageStats writeThreadPoolStats = usageStats.threadPoolUsageStatsMap()
8383
.get(ThreadPool.Names.WRITE);
84+
assert writeThreadPoolStats != null : "Write thread pool is not publishing usage stats for node [" + nodeId + "]";
8485
if (writeThreadPoolStats.maxThreadPoolQueueLatencyMillis() > writeLoadConstraintSettings.getQueueLatencyThreshold().millis()) {
8586
nodeIdsExceedingLatencyThreshold.add(nodeId);
8687
}

0 commit comments

Comments
 (0)