Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1046,14 +1046,24 @@ private static DiscoveryNode findSourceNodeForReshardSplitRecovery(
return null;
}

if (sourceShardRouting.relocatingNodeId() != null) {
DiscoveryNode sourceNode = nodes.get(sourceShardRouting.relocatingNodeId());
if (sourceNode == null) {
logger.trace(
"can't find relocation reshard split source node for shard {} because it is assigned to an unknown node [{}].",
sourceShardRouting.shardId(),
sourceShardRouting.relocatingNodeId()
);
}
return sourceNode;
}
DiscoveryNode sourceNode = nodes.get(sourceShardRouting.currentNodeId());
if (sourceNode == null) {
assert false : "Source node for reshard does not exist: " + sourceShardRouting.currentNodeId();
logger.trace(
"can't find reshard split source node because source shard {} is assigned to an unknown node.",
sourceShardRouting.shortSummary()
);
return null;
}
return sourceNode;
}
Expand Down