Adar Dembo has posted comments on this change.

Change subject: [tools] Implement a manual leader_step_down for a tablet
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4533/6/src/kudu/tools/kudu-admin-test.cc
File src/kudu/tools/kudu-admin-test.cc:

PS6, Line 222: while (current_leader == new_leader && --num_retries > 0);
> Bunch of things I narrowed down here this morning:
Note that BuildAndStart() wait for all tablets to reach the state of RUNNING in 
the master. For that to happen, each tablet has to have elected a leader. So 
just before the call to leader_step_down we can guarantee that at least one 
leader election happened, though we can't guarantee that there's a leader 
_right now_.

I think your pseudocode is a little dangerous because if for some reason 
there's another hidden bug that causes leader_step_down to fail, we won't see 
it. What if you whitelisted the "Illegal state: not currently a leader" case 
and allowed the ::Call() result to be either that, or Status::OK()? Wouldn't 
that give you the best of both worlds?


-- 
To view, visit http://gerrit.cloudera.org:8080/4533
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia046a28a2008f4f5d1e955f57752a32a1ddc5ab8
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dinesh Bhat <din...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <d...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <din...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to