Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/8564 )
Change subject: Deflake tablet_replica-test anchor and transaction count assertions ...................................................................... Deflake tablet_replica-test anchor and transaction count assertions Various assertions in this test failed to account for the fact that, when a transaction finishes, its callback is triggered before it unregisters itself from the transaction tracker. This means that, if we wait for the callback and then immediately consult the transaction tracker (or log anchor registry) we may still see the transaction, causing the assertion to fail. The fix here is to simply wrap such assertions with ASSERT_EVENTUALLY. Prior to the test change, if I added a 10ms sleep in TransactionDriver::Finalize() between callling the callback and releasing the transaction from the tracker, I'd get consistent failures. Now I can add such a sleep and the test still passes. Change-Id: Icee241077558a16b8a5076ab0c059362e8e6f035 Reviewed-on: http://gerrit.cloudera.org:8080/8564 Reviewed-by: Alexey Serbin <aser...@cloudera.com> Reviewed-by: Mike Percy <mpe...@apache.org> Tested-by: Todd Lipcon <t...@apache.org> --- M src/kudu/tablet/tablet_replica-test.cc 1 file changed, 20 insertions(+), 11 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved Mike Percy: Looks good to me, approved Todd Lipcon: Verified -- To view, visit http://gerrit.cloudera.org:8080/8564 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icee241077558a16b8a5076ab0c059362e8e6f035 Gerrit-Change-Number: 8564 Gerrit-PatchSet: 2 Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Todd Lipcon <t...@apache.org>