Bankim Bhavsar has posted comments on this change. ( http://gerrit.cloudera.org:8080/17267 )
Change subject: [master][tool] KUDU-2181 Tool to orchestrate adding a master ...................................................................... Patch Set 2: (7 comments) http://gerrit.cloudera.org:8080/#/c/17267/2/src/kudu/tools/tool_action_common.cc File src/kudu/tools/tool_action_common.cc: http://gerrit.cloudera.org:8080/#/c/17267/2/src/kudu/tools/tool_action_common.cc@770 PS2, Line 770: CHECK(Env::Default()->FileExists(tool_abs_path)) > CHECK() was fine for test envrionments where the absence of the 'kudu' bina Very good point. Fixed. http://gerrit.cloudera.org:8080/#/c/17267/2/src/kudu/tools/tool_action_master.cc File src/kudu/tools/tool_action_master.cc: http://gerrit.cloudera.org:8080/#/c/17267/2/src/kudu/tools/tool_action_master.cc@172 PS2, Line 172: MonoTime deadline = MonoTime::Now() + MonoDelta::FromSeconds(FLAGS_wait_secs); : do { : Status wait_status = new_master->WaitNoBlock(); : if (!wait_status.IsTimedOut()) { : return Status::RuntimeError("Failed to bring up new master"); : } : if (is_catalog_mngr_running(proxy.get())) { : *new_master_out = std::move(new_master); : return Status::OK(); : } : SleepFor(MonoDelta::FromMilliseconds(100)); : } while (MonoTime::Now() < deadline); : : return Status::TimedOut("Timed out waiting for the new master to come up"); > I was relying on the destructor for the error cases but I guess it's better Done http://gerrit.cloudera.org:8080/#/c/17267/2/src/kudu/tools/tool_action_master.cc@191 PS2, Line 191: auto it = flags_map.find(flag_name); : if (it == flags_map.end()) { : return Status::NotFound(Substitute("Flag $0 not supplied", flag_name)); : } > nit: would FindOrNull() work here? Done. http://gerrit.cloudera.org:8080/#/c/17267/2/src/kudu/tools/tool_action_master.cc@363 PS2, Line 363: > nit: extra space Done http://gerrit.cloudera.org:8080/#/c/17267/2/src/kudu/tools/tool_action_master.cc@376 PS2, Line 376: kudu master > nit: "the Kudu Master logs" for consistency Done http://gerrit.cloudera.org:8080/#/c/17267/2/src/kudu/tools/tool_action_master.cc@403 PS2, Line 403: WARN_NOT_OK(new_master->KillAndWait(SIGTERM), "Failed stopping master"); > Here and below, why are we only warning here instead of returning an error? That's a fair point. My other thought was what can the user possibly do in such a case. But this addition process is designed to be idempotent and we can inform user to try killing the process on their end. http://gerrit.cloudera.org:8080/#/c/17267/2/src/kudu/tools/tool_action_master.cc@427 PS2, Line 427: kudu master lo > nit: sam here Done -- To view, visit http://gerrit.cloudera.org:8080/17267 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8f99cf2b3f1738c4127c7e7288beab61daf42e7b Gerrit-Change-Number: 17267 Gerrit-PatchSet: 2 Gerrit-Owner: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Wed, 07 Apr 2021 21:21:50 +0000 Gerrit-HasComments: Yes
