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

[Backport 2.x] Fix flaky SearchScrollWithFailingNodesIT #10536

Merged
merged 1 commit into from
Oct 10, 2023
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 @@ -317,8 +317,8 @@ public void testThreeNodesNoClusterManagerBlock() throws Exception {
);
Settings nonClusterManagerDataPathSettings1 = internalCluster().dataPathSettings(nonClusterManagerNodes.get(0));
Settings nonClusterManagerDataPathSettings2 = internalCluster().dataPathSettings(nonClusterManagerNodes.get(1));
internalCluster().stopRandomNonClusterManagerNode();
internalCluster().stopRandomNonClusterManagerNode();
internalCluster().stopRandomNodeNotCurrentClusterManager();
internalCluster().stopRandomNodeNotCurrentClusterManager();

logger.info("--> verify that there is no cluster-manager anymore on remaining node");
// spin here to wait till the state is set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void testClusterJoinDespiteOfPublishingIssues() throws Exception {

// shutting down the nodes, to avoid the leakage check tripping
// on the states associated with the commit requests we may have dropped
internalCluster().stopRandomNonClusterManagerNode();
internalCluster().stopRandomNodeNotCurrentClusterManager();
}

public void testClusterFormingWithASlowNode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void testScanScrollWithShardExceptions() throws Exception {
assertThat(numHits, equalTo(100L));
clearScroll("_all");

internalCluster().stopRandomNonClusterManagerNode();
internalCluster().stopRandomDataNode();

searchResponse = client().prepareSearch().setQuery(matchAllQuery()).setSize(10).setScroll(TimeValue.timeValueMinutes(1)).get();
assertThat(searchResponse.getSuccessfulShards(), lessThan(searchResponse.getTotalShards()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,7 @@ public synchronized void stopCurrentClusterManagerNode() throws IOException {
/**
* Stops any of the current nodes but not the cluster-manager node.
*/
public synchronized void stopRandomNonClusterManagerNode() throws IOException {
public synchronized void stopRandomNodeNotCurrentClusterManager() throws IOException {
NodeAndClient nodeAndClient = getRandomNodeAndClient(new NodeNamePredicate(getClusterManagerName()).negate());
if (nodeAndClient != null) {
logger.info(
Expand All @@ -1841,11 +1841,11 @@ public synchronized void stopCurrentMasterNode() throws IOException {
/**
* Stops any of the current nodes but not the cluster-manager node.
*
* @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #stopRandomNonClusterManagerNode()}
* @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #stopRandomNodeNotCurrentClusterManager()}
*/
@Deprecated
public synchronized void stopRandomNonMasterNode() throws IOException {
stopRandomNonClusterManagerNode();
public synchronized void stopRandomNodeNotCurrentMaster() throws IOException {
stopRandomNodeNotCurrentClusterManager();
}

/**
Expand All @@ -1860,7 +1860,7 @@ public void stopAllNodes() {
}
int totalClusterManagerNodes = numClusterManagerNodes();
while (totalClusterManagerNodes > 1) {
stopRandomNonClusterManagerNode();
stopRandomNodeNotCurrentClusterManager();
totalClusterManagerNodes -= 1;
}
stopCurrentClusterManagerNode();
Expand Down
Loading