Skip to content

Commit 5e66beb

Browse files
authored
Remove assertAcked() from updateMinMasterNodes() (#113807)
When we're removing nodes there's a possibility for the cluster state update to succeed but acking to fail (e.g. if it was waiting for an ack from a removed node). Really there's no need to check for the acking of the update here, we're in Zen2-land already.
1 parent 0759402 commit 5e66beb

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@
166166
import static org.elasticsearch.test.NodeRoles.nonDataNode;
167167
import static org.elasticsearch.test.NodeRoles.onlyRole;
168168
import static org.elasticsearch.test.NodeRoles.removeRoles;
169-
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
170169
import static org.hamcrest.Matchers.equalTo;
171170
import static org.hamcrest.Matchers.greaterThan;
172171
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
@@ -2415,12 +2414,11 @@ private void updateMinMasterNodes(int eligibleMasterNodeCount) {
24152414
// there should be at least one master to update
24162415
logger.debug("updating min_master_nodes to [{}]", minMasterNodes);
24172416
try {
2418-
assertAcked(
2419-
client().admin()
2420-
.cluster()
2421-
.prepareUpdateSettings()
2422-
.setTransientSettings(Settings.builder().put(DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SETTING.getKey(), minMasterNodes))
2423-
);
2417+
client().admin()
2418+
.cluster()
2419+
.prepareUpdateSettings()
2420+
.setTransientSettings(Settings.builder().put(DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SETTING.getKey(), minMasterNodes))
2421+
.get(TimeValue.timeValueSeconds(30));
24242422
} catch (Exception e) {
24252423
throw new ElasticsearchException(
24262424
"failed to update minimum master node to [{}] (current masters [{}])",

0 commit comments

Comments
 (0)