Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15224 )
Change subject: [test] fix flake in TsTabletManagerITest::TestTableStats ...................................................................... [test] fix flake in TsTabletManagerITest::TestTableStats Sometimes the leader replica of a tablet can change its role prior to receiving StepDown request, so the test outputs somelike like: I0214 18:13:07.095886 5028 raft_consensus.cc:572] T a32ee1063340424db8a7e7ea6aedcfa1 P ddfa34be67fd4a40b26218185403580c [term 3 FOLLOWER]: Rejecting request to step down while not leader src/kudu/integration-tests/ts_tablet_manager-itest.cc:818: Failure Failed Bad status: Illegal state: Code NOT_THE_LEADER: Not currently leader To avoid test flakiness it makes sense to continue with next tablet when observing such an error. To verify the fix, I ran the scenario in TSAN configuration with and without this patch: before: 16 NOT_THE_LEADER failures in 256 runs after: 0 NOT_THE_LEADER failures in 256 runs Note, however: even after one source of flakiness is gone, this scenario is still very flaky. In addition, I revised other tests where LeaderStepDown() might fail due to fluctuating leadership and updated them accordingly. Change-Id: Ibbd6652cdcb30f8899767dfb932cc402cf739115 Reviewed-on: http://gerrit.cloudera.org:8080/15224 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <a...@cloudera.com> --- M src/kudu/integration-tests/raft_consensus-itest.cc M src/kudu/integration-tests/raft_consensus_election-itest.cc M src/kudu/integration-tests/raft_consensus_nonvoter-itest.cc M src/kudu/integration-tests/tombstoned_voting-stress-test.cc M src/kudu/integration-tests/ts_tablet_manager-itest.cc 5 files changed, 75 insertions(+), 32 deletions(-) Approvals: Kudu Jenkins: Verified Adar Dembo: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/15224 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibbd6652cdcb30f8899767dfb932cc402cf739115 Gerrit-Change-Number: 15224 Gerrit-PatchSet: 6 Gerrit-Owner: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120)