Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19237 )
Change subject: [Flag] Check flags consistency when setting a flag ...................................................................... [Flag] Check flags consistency when setting a flag There are existing some dependencies between some flags. For example, if setting auto_rebalancing_enabled to true, unlock_experimental_flags must be set to true. Currently Kudu will not check flags consistency when setting a flag using GenericService::SetFlag() RPC. That will cause unsafe flags or experimental flags or flag group validators unavailable. Therefore this patch will check flags consistency when setting a flag. First try to set this flag, then check all flags consistency, if failed, roll back. This patch supports to check unsafe flags, experimental flags, flag group validators. Standard validator defined by DEFINE_validator() will be checked when calling google::SetCommandLineOption(). By the way, to support a group flag, for example, rpc_certificate_file, rpc_private_key_file, and rpc_ca_certificate_file, which all should be set at the same time, this patch will add a parameter: --skip_check_consistency to skip check consistency. There they can be set one by one. Change-Id: I9e6e37e0f4e72a2cc3d2316248961315f1757ebc Reviewed-on: http://gerrit.cloudera.org:8080/19237 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <[email protected]> --- M src/kudu/server/generic_service.cc M src/kudu/server/server_base.proto M src/kudu/tools/kudu-tool-test.cc M src/kudu/tools/tool_action_common.cc M src/kudu/tools/tool_action_master.cc M src/kudu/tools/tool_action_tserver.cc M src/kudu/util/flags.cc M src/kudu/util/flags.h 8 files changed, 157 insertions(+), 9 deletions(-) Approvals: Kudu Jenkins: Verified Alexey Serbin: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/19237 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9e6e37e0f4e72a2cc3d2316248961315f1757ebc Gerrit-Change-Number: 19237 Gerrit-PatchSet: 8 Gerrit-Owner: Wang Xixu <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Wang Xixu <[email protected]> Gerrit-Reviewer: Yifan Zhang <[email protected]>
