You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ba...@apache.org on 2021/03/31 20:01:49 UTC
[kudu] 01/02: [master] Remove
FLAGS_master_consensus_allow_status_msg_for_failed_peer
This is an automated email from the ASF dual-hosted git repository.
bankim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 72489cd65885af731b73d180596bf7854273f891
Author: Bankim Bhavsar <ba...@cloudera.com>
AuthorDate: Thu Mar 11 16:12:35 2021 -0800
[master] Remove FLAGS_master_consensus_allow_status_msg_for_failed_peer
FLAGS_master_consensus_allow_status_msg_for_failed_peer goes
hand-in-hand with FLAGS_master_support_change_config
so removing it and using the common FLAGS_master_support_change_config
instead.
This reduces the need for additional validation when orchestrating
the add master flow.
Change-Id: I72b37ba9ff3c48bce532ad3d037d341c2c36bb9f
Reviewed-on: http://gerrit.cloudera.org:8080/17180
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Tested-by: Kudu Jenkins
---
src/kudu/master/dynamic_multi_master-test.cc | 13 +++++--------
src/kudu/master/master_service.cc | 3 ++-
src/kudu/master/sys_catalog.cc | 12 ++++--------
3 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/src/kudu/master/dynamic_multi_master-test.cc b/src/kudu/master/dynamic_multi_master-test.cc
index 478c38e..f1e051d 100644
--- a/src/kudu/master/dynamic_multi_master-test.cc
+++ b/src/kudu/master/dynamic_multi_master-test.cc
@@ -834,9 +834,7 @@ TEST_P(ParameterizedAddMasterTest, TestAddMasterSysCatalogCopy) {
SKIP_IF_SLOW_NOT_ALLOWED();
vector<HostPort> master_hps;
- NO_FATALS(StartClusterWithSysCatalogGCed(
- &master_hps,
- {"--master_consensus_allow_status_msg_for_failed_peer"}));
+ NO_FATALS(StartClusterWithSysCatalogGCed(&master_hps));
ASSERT_OK(CreateTable(cluster_.get(), kTableName));
// Bring up the new master and add to the cluster.
@@ -1064,11 +1062,10 @@ TEST_P(ParameterizedRecoverMasterTest, TestRecoverDeadMasterSysCatalogCopy) {
vector<HostPort> master_hps;
NO_FATALS(StartClusterWithSysCatalogGCed(
&master_hps,
- {"--master_consensus_allow_status_msg_for_failed_peer",
- // Keeping RPC timeouts short to quickly detect downed servers.
- // This will put the health status into an UNKNOWN state until the point
- // where they are considered FAILED.
- "--consensus_rpc_timeout_ms=2000",
+ // Keeping RPC timeouts short to quickly detect downed servers.
+ // This will put the health status into an UNKNOWN state until the point
+ // where they are considered FAILED.
+ {"--consensus_rpc_timeout_ms=2000",
"--follower_unavailable_considered_failed_sec=4"}));
// Verify that existing masters are running as VOTERs.
diff --git a/src/kudu/master/master_service.cc b/src/kudu/master/master_service.cc
index a596b0e..aa83654 100644
--- a/src/kudu/master/master_service.cc
+++ b/src/kudu/master/master_service.cc
@@ -98,7 +98,8 @@ TAG_FLAG(master_support_authz_tokens, hidden);
DEFINE_bool(master_support_change_config, false,
"Whether the master supports adding/removing master servers dynamically.");
TAG_FLAG(master_support_change_config, hidden);
-TAG_FLAG(master_support_change_config, unsafe);
+TAG_FLAG(master_support_change_config, advanced);
+TAG_FLAG(master_support_change_config, runtime);
DEFINE_bool(master_support_ignore_operations, true,
"Whether the cluster supports support ignore operations.");
diff --git a/src/kudu/master/sys_catalog.cc b/src/kudu/master/sys_catalog.cc
index ebb3c3d..71506e2 100644
--- a/src/kudu/master/sys_catalog.cc
+++ b/src/kudu/master/sys_catalog.cc
@@ -95,13 +95,6 @@ DEFINE_string(master_address_add_new_master, "",
TAG_FLAG(master_address_add_new_master, unsafe);
TAG_FLAG(master_address_add_new_master, hidden);
-DEFINE_bool(master_consensus_allow_status_msg_for_failed_peer, false,
- "Allows status-only Raft messages to be sent to a master peer in FAILED_UNRECOVERABLE "
- "state.");
-TAG_FLAG(master_consensus_allow_status_msg_for_failed_peer, advanced);
-TAG_FLAG(master_consensus_allow_status_msg_for_failed_peer, hidden);
-TAG_FLAG(master_consensus_allow_status_msg_for_failed_peer, runtime);
-
DECLARE_bool(master_support_change_config);
DECLARE_int64(rpc_max_message_size);
@@ -480,7 +473,10 @@ Status SysCatalogTable::SetupTablet(
consensus::ServerContext server_ctx{/*quiescing*/nullptr,
master_->num_raft_leaders(),
master_->raft_pool(),
- &FLAGS_master_consensus_allow_status_msg_for_failed_peer};
+ // Allow sending status-only Raft messages to a master peer
+ // in FAILED_UNRECOVERABLE state if we allow dynamically
+ // adding/removing masters.
+ &FLAGS_master_support_change_config};
RETURN_NOT_OK_SHUTDOWN(tablet_replica_->Init(std::move(server_ctx)),
"failed to initialize system catalog replica");