Skip to content

Commit de01dfd

Browse files
committed
Add asserts
1 parent 58112aa commit de01dfd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,12 +1004,14 @@ private static DiscoveryNode findSourceNodeForReshardSplitRecovery(
10041004
ShardRouting sourceShardRouting = routingTable.shardRoutingTable(sourceShardId).primaryShard();
10051005

10061006
if (sourceShardRouting.active() == false) {
1007+
assert false : sourceShardRouting;
10071008
logger.trace("can't find reshard split source node because source shard {} is not active.", sourceShardRouting);
10081009
return null;
10091010
}
10101011

10111012
DiscoveryNode sourceNode = nodes.get(sourceShardRouting.currentNodeId());
10121013
if (sourceNode == null) {
1014+
assert false : "Source node for reshard does not exist: " + sourceShardRouting.currentNodeId();
10131015
logger.trace(
10141016
"can't find reshard split source node because source shard {} is assigned to an unknown node.",
10151017
sourceShardRouting

0 commit comments

Comments
 (0)