[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Adar Dembo has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 12: (4 comments) http://gerrit.cloudera.org:8080/#/c/3609/12//COMMIT_MSG Commit Message: Line 20: possible; the only way a master can "lose" a cached TSDescriptor is if the > what about when a tserver restarts? is it still going to do a proper full T If the tserver restarts, it always issues a full TR as its first heartbeat. And if that heartbeat fails, it'll get retried until the server acknowledges it. That's always been the case; the subsequent patch just adds "if you see your master go from not_leader to leader, send a full TR". http://gerrit.cloudera.org:8080/#/c/3609/12/src/kudu/integration-tests/mini_cluster.cc File src/kudu/integration-tests/mini_cluster.cc: Line 289: auto ts = mini_tablet_server->server(); > should this verify that the TS process is running? (there's a getter for th I'm inclined to keep it the way it is. This is old code; my goal was to add the DO_NOT_MATCH_TSERVERS mode so I could use it in my integration test. I'll document that the tservers may not be running, though. Line 299: } > else LOG(FATAL) perhaps? or use a switch() so that you get a compilation er I'll use a switch. Note that the downside of using enum classes is that you can't use operator<< on the value (it doesn't implicit cast to an int). http://gerrit.cloudera.org:8080/#/c/3609/12/src/kudu/integration-tests/mini_cluster.h File src/kudu/integration-tests/mini_cluster.h: Line 145: // Match the tservers retrieved from each master against the tservers in > not sure what 'Match' means here. Is this a verification? (i.e that the cou OK, will elaborate in the comment. -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 12 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Todd Lipcon has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 12: (4 comments) http://gerrit.cloudera.org:8080/#/c/3609/12//COMMIT_MSG Commit Message: Line 20: possible; the only way a master can "lose" a cached TSDescriptor is if the what about when a tserver restarts? is it still going to do a proper full TR after the restart, due to some tserver-side logic? are we waiting on the later patch in this series to make sure that the tserver logic ensures a full TR after a leader change? http://gerrit.cloudera.org:8080/#/c/3609/12/src/kudu/integration-tests/mini_cluster.cc File src/kudu/integration-tests/mini_cluster.cc: Line 289: auto ts = mini_tablet_server->server(); should this verify that the TS process is running? (there's a getter for that). Worth documenting either way Line 299: } else LOG(FATAL) perhaps? or use a switch() so that you get a compilation error if you were to add a new matchmode http://gerrit.cloudera.org:8080/#/c/3609/12/src/kudu/integration-tests/mini_cluster.h File src/kudu/integration-tests/mini_cluster.h: Line 145: // Match the tservers retrieved from each master against the tservers in not sure what 'Match' means here. Is this a verification? (i.e that the count and uuids match, and otherwise a bad Status will return?) Could be more clear. -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 12 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Kudu Jenkins has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 12: -Verified Build Started http://104.196.14.100/job/kudu-gerrit/2611/ -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 12 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Kudu Jenkins has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 12: Build Started http://104.196.14.100/job/kudu-gerrit/2605/ -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 12 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Kudu Jenkins has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 11: Build Started http://104.196.14.100/job/kudu-gerrit/2594/ -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 11 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Hello Dan Burkert, Todd Lipcon, Kudu Jenkins, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/3609 to look at the new patch set (#11). 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 --- 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, 216 insertions(+), 124 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/09/3609/11 -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 11 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Dan Burkert has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 10: Code-Review+1 -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 10 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Hello Dan Burkert, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/3609 to look at the new patch set (#10). 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. An unfortunate side effect is that the "should this tserver register or send full tablet report?" dance is now more complicated; I tried to cover all cases in the modified unit test. I also snuck in a fix to TSManager::RegisterTS: it wasn't actually returning a TSDescriptor in its out parameter. Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 --- 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.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 12 files changed, 251 insertions(+), 94 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/09/3609/10 -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 10 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Todd Lipcon
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Adar Dembo has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 9: (1 comment) > (1 comment) > > Any way to system test this, like calling ListTabletServers against > a follower master? (or visiting its /tablet-servers web page?) I added a new test in master_replication-itest. Let me know if it doesn't fit the bill. http://gerrit.cloudera.org:8080/#/c/3609/9/src/kudu/master/catalog_manager.h File src/kudu/master/catalog_manager.h: PS9, Line 366: }; > DISALLOW_COPY_AND_ASSIGN Done -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 9 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Todd Lipcon has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 9: (1 comment) Any way to system test this, like calling ListTabletServers against a follower master? (or visiting its /tablet-servers web page?) http://gerrit.cloudera.org:8080/#/c/3609/9/src/kudu/master/catalog_manager.h File src/kudu/master/catalog_manager.h: PS9, Line 366: }; DISALLOW_COPY_AND_ASSIGN -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 9 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Adar Dembo has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 9: Verified+1 chrpath() failed. -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 9 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Kudu Jenkins has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 9: Build Started http://104.196.14.100/job/kudu-gerrit/2473/ -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 9 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Kudu Jenkins has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 7: Build Started http://104.196.14.100/job/kudu-gerrit/2445/ -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 7 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Dan Burkert has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 6: Code-Review+1 -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 6 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Adar Dembo has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 6: Verified+1 Two isolate failures and one chrpath failure. -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 6 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Kudu Jenkins has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 5: Build Started http://104.196.14.100/job/kudu-gerrit/2399/ -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Kudu Jenkins has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 3: Build Started http://104.196.14.100/job/kudu-gerrit/2312/ -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 3 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Adar Dembo has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/3609/2/src/kudu/master/catalog_manager.h File src/kudu/master/catalog_manager.h: Line 345: : catalog_(catalog), > indent 4 Done -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 2 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Kudu Jenkins has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 2: Build Started http://104.196.14.100/job/kudu-gerrit/2291/ -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 2 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Adar Dembo has posted comments on this change. Change subject: KUDU-1358 (part 1): master should accept heartbeat even if follower .. Patch Set 1: Filed KUDU-1521 for the Java test failure. -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1358 (part 1): master should accept heartbeat even if follower
Hello Dan Burkert, David Ribeiro Alves, Todd Lipcon, I'd like you to do a code review. Please visit http://gerrit.cloudera.org:8080/3609 to review the following change. 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. An unfortunate side effect is that the "should this tserver register or send full tablet report?" dance is now more complicated; I tried to cover all cases in the modified unit test. I also snuck in a fix to TSManager::RegisterTS: it wasn't actually returning a TSDescriptor in its out parameter. Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 --- 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 6 files changed, 172 insertions(+), 65 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/09/3609/1 -- To view, visit http://gerrit.cloudera.org:8080/3609 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I578674927b65b4171e8437de8515130e4a0ed139 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar DemboGerrit-Reviewer: Dan Burkert Gerrit-Reviewer: David Ribeiro Alves Gerrit-Reviewer: Todd Lipcon