Mike Percy has posted comments on this change. Change subject: KUDU-1330: Add a tool to unsafely recover from loss of majority replicas ......................................................................
Patch Set 7: (9 comments) http://gerrit.cloudera.org:8080/#/c/6066/7/src/kudu/consensus/raft_consensus.cc File src/kudu/consensus/raft_consensus.cc: PS7, Line 1328: UNLOCKED why _UNLOCKED? PS7, Line 1328: . nit: missing space after period Line 1680: s = StatusFromPB(consensus_resp.error().status()); Is there a specific error type you are looking for here? Should we consider adding tests for failure cases? http://gerrit.cloudera.org:8080/#/c/6066/7/src/kudu/tools/kudu-admin-test.cc File src/kudu/tools/kudu-admin-test.cc: Line 159: TEST_F(AdminCliTest, TestReplaceConfigOnSingleFollower) { Please add test comments with a brief summary of the test. PS7, Line 172: find You need to use equal_range() here: https://stackoverflow.com/questions/9046922/unordered-multimap-iterating-the-result-of-find-yields-elements-with-differe PS7, Line 193: TServerDetails* follower1 = nullptr; : TServerDetails* follower2 = nullptr; : vector<TServerDetails*> tservers; : AppendValuesFromMap(active_tablet_servers, &tservers); : for (TServerDetails* ts : tservers) { : if (ts->uuid() != leader_ts->uuid()) { : if (follower1 == nullptr) { : follower1 = ts; : } else { : follower2 = ts; : } : } : } This is duplicated multiple times in this file. Can you extract out some of these helper functions to avoid so much copy and paste? Line 224: Maybe shut down the master, first wait until # committed voters is 1, then bring up the master and do these other waiting checks. PS7, Line 255: timeout How about kTimeout here and elsewhere, also I think at least 30 seconds is required to avoid flakiness on AWS sometimes Line 348: TEST_F(AdminCliTest, TestReplaceConfigOnLeaderWithPendingConfig) { Can we add a version for a follower with a pending config? -- To view, visit http://gerrit.cloudera.org:8080/6066 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I908d8c981df74d56dbd034e72001d379fb314700 Gerrit-PatchSet: 7 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Dinesh Bhat <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Dinesh Bhat <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-HasComments: Yes
