Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11251 )

Change subject: KUDU-2245 Graceful leadership transfer
......................................................................


Patch Set 10:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/11251/10/src/kudu/tools/tool_replica_util.cc
File src/kudu/tools/tool_replica_util.cc:

http://gerrit.cloudera.org:8080/#/c/11251/10/src/kudu/tools/tool_replica_util.cc@296
PS10, Line 296:     // We should consult the leader for the most up-to-date 
consensus state.
              :     string new_leader_uuid;
              :     HostPort new_leader_hp;
              :     RETURN_NOT_OK(GetTabletLeader(client, tablet_id, 
&new_leader_uuid, &new_leader_hp));
I think this is racy, regardless of the way how leadership changes -- 
gracefully or abrupt.  Why not to rely on the logic at line 313 instead?


http://gerrit.cloudera.org:8080/#/c/11251/10/src/kudu/tools/tool_replica_util.cc@305
PS10, Line 305: leader_uuid
If leader changed and new leader UUID is detected, why still to keep this old 
leader uuid in the if() clause?


http://gerrit.cloudera.org:8080/#/c/11251/10/src/kudu/tools/tool_replica_util.cc@310
PS10, Line 310: proxy
> 'proxy' was constructed at L149, with old leader info. If leadership had ac
I think this code is executed when no DoLeaderStepDown() was called above (see 
from_ts_uuid != leader_uuid).  I'm not sure that analysis of pre-commit failure 
is correct.

Also, if the leadership has changed, wouldn't the verification below  return 
Status::Incomplete?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic97343af9eb349556424c999799ed5e2941f0083
Gerrit-Change-Number: 11251
Gerrit-PatchSet: 10
Gerrit-Owner: Will Berkeley <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Fengling Wang <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Will Berkeley <[email protected]>
Gerrit-Comment-Date: Mon, 24 Sep 2018 02:12:39 +0000
Gerrit-HasComments: Yes

Reply via email to