Mike Percy has posted comments on this change. ( http://gerrit.cloudera.org:8080/8709 )
Change subject: KUDU-2230: the leader is always a viable voter ...................................................................... Patch Set 5: Code-Review+1 (3 comments) looks good, just a couple nits http://gerrit.cloudera.org:8080/#/c/8709/5/src/kudu/consensus/consensus_queue.cc File src/kudu/consensus/consensus_queue.cc: http://gerrit.cloudera.org:8080/#/c/8709/5/src/kudu/consensus/consensus_queue.cc@428 PS5, Line 428: // Only consider a peer to be a viable voter if... : // ...its last exchange was successful : viable &= peer->last_exchange_status == PeerStatus::OK; : : // ...the peer is up to date with the latest majority. : // : // This indicates that it's actively participating in majorities and likely to : // replicate a config change immediately when we propose it. : viable &= peer->last_received.index() >= queue_state_.majority_replicated_index; : : // ...we have communicated successfully with it recently. : // : // This handles the case where the tablet has had no recent writes and therefore : // even a replica that is down would have participated in the latest majority. : auto unreachable_time = now - peer->last_communication_time; : viable &= unreachable_time.ToMilliseconds() < FLAGS_consensus_rpc_timeout_ms; perhaps just wrap this part in the if-statement? i.e. // The local peer is always viable. if (uuid != local_peer_pb_.permanent_uuid()) { viable &= ... ... } http://gerrit.cloudera.org:8080/#/c/8709/5/src/kudu/integration-tests/tablet_replacement-itest.cc File src/kudu/integration-tests/tablet_replacement-itest.cc: http://gerrit.cloudera.org:8080/#/c/8709/5/src/kudu/integration-tests/tablet_replacement-itest.cc@337 PS5, Line 337: Substitute("--consensus_rpc_timeout_ms=$0", kTimeout.ToMilliseconds()), can we shorten consensus_rpc_timeout_ms to maybe 3 seconds or 5 seconds? http://gerrit.cloudera.org:8080/#/c/8709/5/src/kudu/integration-tests/tablet_replacement-itest.cc@399 PS5, Line 399: SleepFor(kTimeout); is it really necessary to sleep for 15 seconds in this test? -- To view, visit http://gerrit.cloudera.org:8080/8709 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id200ec8e562e2b21c8eef09e7b38a8d85d23239c Gerrit-Change-Number: 8709 Gerrit-PatchSet: 5 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Comment-Date: Fri, 01 Dec 2017 08:59:12 +0000 Gerrit-HasComments: Yes
