Skip to content

Commit

Permalink
Changing default no_master_block from write to metadata_write (#3621)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
(cherry picked from commit 07dc19d)
  • Loading branch information
gbbafna authored and github-actions[bot] committed Jul 1, 2022
1 parent c408a23 commit d5d083a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void testVerifyApiBlocksDuringPartition() throws Exception {
// continuously ping until network failures have been resolved. However
// It may a take a bit before the node detects it has been cut off from the elected cluster-manager
logger.info("waiting for isolated node [{}] to have no cluster-manager", isolatedNode);
assertNoClusterManager(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_WRITES, TimeValue.timeValueSeconds(30));
assertNoClusterManager(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_METADATA_WRITES, TimeValue.timeValueSeconds(30));

logger.info("wait until elected cluster-manager has been removed and a new 2 node cluster was from (via [{}])", isolatedNode);
ensureStableCluster(2, nonIsolatedNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class NoMasterBlockService {

public static final Setting<ClusterBlock> NO_MASTER_BLOCK_SETTING = new Setting<>(
"cluster.no_master_block",
"write",
"metadata_write",
NoMasterBlockService::parseNoClusterManagerBlock,
Property.Dynamic,
Property.NodeScope,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private void assertDeprecatedWarningEmitted() {

public void testBlocksWritesByDefault() {
createService(Settings.EMPTY);
assertThat(noClusterManagerBlockService.getNoMasterBlock(), sameInstance(NO_MASTER_BLOCK_WRITES));
assertThat(noClusterManagerBlockService.getNoMasterBlock(), sameInstance(NO_MASTER_BLOCK_METADATA_WRITES));
}

public void testBlocksWritesIfConfiguredBySetting() {
Expand Down

0 comments on commit d5d083a

Please sign in to comment.