Mike Percy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8619 )

Change subject: WIP [catalog_manager] added 3-4-3 behavior
......................................................................


Patch Set 2:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/8619/2/src/kudu/consensus/quorum_util.cc
File src/kudu/consensus/quorum_util.cc:

http://gerrit.cloudera.org:8080/#/c/8619/2/src/kudu/consensus/quorum_util.cc@421
PS2, Line 421: peer.attrs().has_promote()
I don't think we need to rely on has_ since this defaults to false.


http://gerrit.cloudera.org:8080/#/c/8619/2/src/kudu/consensus/quorum_util.cc@450
PS2, Line 450:   for (const RaftPeerPB& peer : config.peers()) {
I find the logic a little tough to follow in here. Maybe it would be a little 
easier to follow if it was structured as 2 loops?

1. loop over the config and collect stats (number of healthy / failed voters, 
number of healthy / failed non-voters, number of nodes to replace)
2. decide whether any can be evicted, if not, return false
3. if a node can be evicted, loop again with a predicate indicating the 
criteria for the node to evict and return the first match.

Also, I wonder why we need a separate function for evicting voters and 
non-voters?


http://gerrit.cloudera.org:8080/#/c/8619/2/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:

http://gerrit.cloudera.org:8080/#/c/8619/2/src/kudu/master/catalog_manager.cc@204
PS2, Line 204: // TODO(aserbin): can we get a better name for this flag? 
Ideally, there should
i posted a patch at https://gerrit.cloudera.org/c/8626/ so maybe we can use 
that one everywhere


http://gerrit.cloudera.org:8080/#/c/8619/2/src/kudu/master/catalog_manager.cc@3007
PS2, Line 3007: member_type_(member_type)
this field only seems relevant for adding new replicas or a forced promotion / 
demotion


http://gerrit.cloudera.org:8080/#/c/8619/2/src/kudu/master/catalog_manager.cc@3198
PS2, Line 3198: peer->set_member_type(member_type_);
why is this field needed for an eviction?


http://gerrit.cloudera.org:8080/#/c/8619/2/src/kudu/master/catalog_manager.cc@3482
PS2, Line 3482: else {
              :             string to_evict;
              :             if
nit: we can make this an "else if" and avoid an additional level of nesting



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6f0469ac641bf7a03dbef01eaa3f1b58a5bf5d27
Gerrit-Change-Number: 8619
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Tue, 21 Nov 2017 23:24:41 +0000
Gerrit-HasComments: Yes

Reply via email to