Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark node seen task as successful #106502

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
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 @@ -70,7 +70,6 @@ public void testShardStatusStaysCompleteAfterNodeLeaves() throws Exception {
* Similar to the previous test, but ensures that the status stays at `COMPLETE` when the node is offline when the shutdown is
* registered. This may happen if {@link NodeSeenService} isn't working as expected.
*/
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/76689")
public void testShardStatusStaysCompleteAfterNodeLeavesIfRegisteredWhileNodeOffline() throws Exception {
assumeTrue("must be on a snapshot build of ES to run in order for the feature flag to be set", Build.current().isSnapshot());
final String nodeToRestartName = internalCluster().startNode();
Expand All @@ -92,7 +91,7 @@ public Settings onNodeStopped(String nodeName) throws Exception {
NodesInfoResponse nodes = clusterAdmin().prepareNodesInfo().clear().get();
assertThat(nodes.getNodes().size(), equalTo(1));

assertNodeShutdownStatus(nodeToRestartId, COMPLETE);
assertBusy(() -> { assertNodeShutdownStatus(nodeToRestartId, COMPLETE); });
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public ClusterState execute(BatchExecutionContext<SetSeenNodesShutdownTask> batc
var nodesNotPreviouslySeen = new HashSet<>();
for (final var taskContext : batchExecutionContext.taskContexts()) {
nodesNotPreviouslySeen.addAll(taskContext.getTask().nodesNotPreviouslySeen());
taskContext.success(() -> {});
}

var nodes = initialState.nodes();
Expand Down