Adar Dembo has posted comments on this change.

Change subject: KUDU-1927 [master] always send IPKI CA certificate
......................................................................


Patch Set 1:

(5 comments)

Haven't looked at the test yet.

http://gerrit.cloudera.org:8080/#/c/6356/1/src/kudu/master/master_service.cc
File src/kudu/master/master_service.cc:

Line 396:   if (!l.CheckIsInitializedOrRespond(resp, rpc)) {
What if we replaced this with CheckIsInitializedAndIsLeaderOrRespond()? 
Couldn't we omit all of the logic below then?

I think the catch is that if that call fails, we probably still want to set 
resp->role() to something (like UNKNOWN_ROLE). We have the opportunity to do 
that before returning, though.


PS1, Line 401: (
Nit: don't need extra parens here.


PS1, Line 410:     const Status s(Status::ServiceUnavailable(
             :         "not yet ready to serve the request as the leader 
master"));
Just respond with l.leader_status() directly.


Line 415:     LOG(INFO) << "Detected transient state; responding with: " << 
s.ToString();
Probably overkill.


Line 416:     return;
IIUC, the response is (status: ServiceUnavailable, role: LEADER, code: 
NOT_THE_LEADER). Isn't it weird to set role to LEADER in this case? Why not 
UNKNOWN_ROLE or FOLLOWER, as mentioned in KUDU-1927?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a20e6da6531091fcc597af58a7bbf01a8847f5
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-HasComments: Yes

Reply via email to