Todd Lipcon has submitted this change and it was merged. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower ......................................................................
KUDU-1358 (part 1): master should accept heartbeat even if follower This patch changes the master's heartbeat acceptance code so that heartbeats are not rejected outright if the master is a follower. To be specific, tablet reports are ignored, but heartbeats are processed just enough to warm the TSDescriptor cache. That way, if this master is elected leader, it can respond to a CreateTable() even before the first round of heartbeats. I reduced the complexity of the "should this tserver register or send a full tablet report?" dance by removing TSDescriptor.has_tablet_report_. It was used to guarantee a full tablet report in the event that 1) the tserver is sending incremental tablet reports, and 2) the master has already registered the tserver. I don't think this exact sequence of events is actually possible; the only way a master can "lose" a cached TSDescriptor is if the master is restarted, at which point it loses the tserver registration too. Plus, all the unit tests passed (in slow mode). I also snuck in a fix to TSManager::RegisterTS: it wasn't actually returning a TSDescriptor in its out parameter. Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Reviewed-on: http://gerrit.cloudera.org:8080/3609 Tested-by: Kudu Jenkins Reviewed-by: Todd Lipcon <[email protected]> --- M src/kudu/integration-tests/alter_table-test.cc M src/kudu/integration-tests/master_replication-itest.cc M src/kudu/integration-tests/mini_cluster.cc M src/kudu/integration-tests/mini_cluster.h M src/kudu/integration-tests/registration-test.cc M src/kudu/integration-tests/table_locations-itest.cc M src/kudu/master/catalog_manager.cc M src/kudu/master/catalog_manager.h M src/kudu/master/master-test.cc M src/kudu/master/master_service.cc M src/kudu/master/ts_descriptor.cc M src/kudu/master/ts_descriptor.h M src/kudu/master/ts_manager.cc 13 files changed, 226 insertions(+), 125 deletions(-) Approvals: Todd Lipcon: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 14 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
