Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/9627 )
Change subject: WIP: KUDU-2342. consensus: use tighter bound for non-voter promotion ...................................................................... Patch Set 1: (6 comments) http://gerrit.cloudera.org:8080/#/c/9627/1/src/kudu/consensus/consensus_queue.cc File src/kudu/consensus/consensus_queue.cc: http://gerrit.cloudera.org:8080/#/c/9627/1/src/kudu/consensus/consensus_queue.cc@913 PS1, Line 913: TrackedPeer* peer, parameter ordering nit: maybe, place this 'out' parameter after the 'in' ones? http://gerrit.cloudera.org:8080/#/c/9627/1/src/kudu/consensus/consensus_queue.cc@958 PS1, Line 958: const ConsensusStatusPB& status) { nit: maybe, add a DCHECK() to make sure the necessary lock are held while entering this method? http://gerrit.cloudera.org:8080/#/c/9627/1/src/kudu/consensus/consensus_queue.cc@959 PS1, Line 959: if (queue_state_.mode == PeerMessageQueue::LEADER && : peer->last_exchange_status == PeerStatus::OK) { readability nit: maybe, return right away if the condition yields false? if (queue_state_.mode != PeerMessageQueue::LEADER || peer->last_exchange_status != PeerStatus::OK) { return; } ... http://gerrit.cloudera.org:8080/#/c/9627/1/src/kudu/consensus/consensus_queue.cc@974 PS1, Line 974: prev_peer_state.last_received.index() should we ignore this if it's -1? http://gerrit.cloudera.org:8080/#/c/9627/1/src/kudu/consensus/consensus_queue.cc@976 PS1, Line 976: status.last_received_current_leader() Sometimes I see OpId index equal to -1. Should we ignore such cases as well? http://gerrit.cloudera.org:8080/#/c/9627/1/src/kudu/consensus/consensus_queue.cc@977 PS1, Line 977: last_batch_size Is this safe enough if the peer was receiving heartbeats from some strayed leader? -- To view, visit http://gerrit.cloudera.org:8080/9627 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iff517f01d6dc25eb15d01593dd57b7dc0dd25956 Gerrit-Change-Number: 9627 Gerrit-PatchSet: 1 Gerrit-Owner: Mike Percy <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Comment-Date: Wed, 14 Mar 2018 20:13:50 +0000 Gerrit-HasComments: Yes
