Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/18124 )
Change subject: KUDU-2915: add tool to unregister a tablet server ...................................................................... Patch Set 6: (1 comment) http://gerrit.cloudera.org:8080/#/c/18124/5/src/kudu/master/master_service.cc File src/kudu/master/master_service.cc: http://gerrit.cloudera.org:8080/#/c/18124/5/src/kudu/master/master_service.cc@355 PS5, Line 355: rpc->RespondFailure(s); : return; : } : } : : Status s = server_->ts_manager()->UnregisterTServer(ts_uuid, force_unregister_live_tserver); : if (PREDICT_FALSE(!s.ok() && !s.IsNotFound())) { : // Ignore the NotFound error to make this RPC retriable and effectively idempotent. : rpc->RespondFailure(s); : > Maybe it's not necessary to keep the run-time state consistent with system Another thought to consider: perhaps we should consider separating this into multiple tools, or at least separate RPCs -- one that removes tserver states on the leader, the other that unregisters all masters. I understand baking this all into a single RPC is convenient, but I think it makes the failure semantics confusing. If we go this route, we can use a AsyncLeaderMasterRpc to handle leader retries automatically, and only upon successfully writing to the leader we could proceed with unregistering on all masters. What do you think? -- To view, visit http://gerrit.cloudera.org:8080/18124 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If1f5c2979a8d14428f4bcc8e850c57ce228c793a Gerrit-Change-Number: 18124 Gerrit-PatchSet: 6 Gerrit-Owner: Yifan Zhang <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: Zoltan Chovan <[email protected]> Gerrit-Comment-Date: Fri, 21 Jan 2022 01:37:48 +0000 Gerrit-HasComments: Yes
