Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/9052 )
Change subject: WIP [master] no half-baked responses on ConnectoToMaster ...................................................................... Patch Set 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/9052/2/src/kudu/master/master_service.cc File src/kudu/master/master_service.cc: http://gerrit.cloudera.org:8080/#/c/9052/2/src/kudu/master/master_service.cc@463 PS2, Line 463: // Do not send half-baked responses from leader master when its catalog : // manager is not in proper state yet. > I'm not sure this is by design. My point is that in case if a leader is no So it seems like we thought we had a world with the two states { FOLLOWER, LEADER } but we actually have a world with the three states { FOLLOWER, FOLLOWER_TRANSITIONING_TO_LEADER, LEADER }. This patch identifies the new state, but what I don't like about it is that it returns an error while in that state when no error is returned while in the other two states. Instead of doing this, what if we treated role == LEADER && !leader_status.ok() the same as role == FOLLOWER? That is, do resp->set_role(FOLLOWER), do resp->add_master_addrs() as before, and skip the KUDU-1924 stuff below? It's not "wrong" per se; it just means this master will be considered a FOLLOWER by the client during the (short) transition to LEADER. Clients should already handle the scenario when all masters are FOLLOWER because they're doing a leader election; this just prolongs that state slightly. http://gerrit.cloudera.org:8080/#/c/9052/2/src/kudu/master/master_service.cc@488 PS2, Line 488: // TODO(KUDU-1924): it seems there is some window when 'role' is LEADER but > That's about some different case, actually -- when leader_status.ok() but n Hmm, but the message is consistent with the bug you're addressing ("a short window wherein the master is LEADER but isn't done initializing"). -- To view, visit http://gerrit.cloudera.org:8080/9052 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib9c906863f5f0e1995041281b122135e1b2cd3a4 Gerrit-Change-Number: 9052 Gerrit-PatchSet: 2 Gerrit-Owner: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Dan Burkert <d...@cloudera.com> Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Comment-Date: Fri, 19 Jan 2018 22:32:50 +0000 Gerrit-HasComments: Yes