From e2b304a344abddc553d7aad48f54977f9c30086e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Programagor?= Date: Fri, 14 Sep 2018 18:40:11 +0200 Subject: [PATCH] [Monitoring] Properly Deduplicate Replica shards (#23183) Issue #23179 was caused by ignoring multiple replicas of the same shard, even if they are on different nodes. This commit fixes that. --- .../server/lib/elasticsearch/shards/get_shard_allocation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/monitoring/server/lib/elasticsearch/shards/get_shard_allocation.js b/x-pack/plugins/monitoring/server/lib/elasticsearch/shards/get_shard_allocation.js index e39e1181c5ed..4e75115a4841 100644 --- a/x-pack/plugins/monitoring/server/lib/elasticsearch/shards/get_shard_allocation.js +++ b/x-pack/plugins/monitoring/server/lib/elasticsearch/shards/get_shard_allocation.js @@ -24,7 +24,7 @@ export function handleResponse(response) { if (shard) { // note: if the request is for a node, then it's enough to deduplicate without primary, but for indices it displays both - const shardId = `${shard.index}-${shard.shard}-${shard.primary}-${shard.relocating_node}`; + const shardId = `${shard.index}-${shard.shard}-${shard.primary}-${shard.relocating_node}-${shard.node}`; if (!uniqueShards.has(shardId)) { shards.push(shard);