Hello Yifan Zhang, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22612
to look at the new patch set (#2).
Change subject: WIP KUDU-3651 fix race condition in TabletReplica::Stop()
......................................................................
WIP KUDU-3651 fix race condition in TabletReplica::Stop()
WIP:
* make sure all the tests pass
This patch addresses a race condition in TabletReplica::Stop(). Before
this patch, new operations might be accepted by a tablet replica right
after calling OpTracker::WaitForAllToFinish() and before completing the
shutdown of the replica's prepare pool token.
The race has been manifesting itself at least as a flakiness in various
test scenarios in txn_participant-test [1]. In one particular instance,
the following TSAN warnings were issued while running the
TxnParticipantTest.TestBeginCommitAnchorsOnFlush scenario:
WARNING: ThreadSanitizer: data race (pid=4116)
Write of size 8 at 0x7b4400027688 by main thread:
#0 std::__1::__vector_base<kudu::MemTracker*,
std::__1::allocator<kudu::MemTracker*> >::__destruct_at_end(kudu::MemTracker**)
...
#3 std::__1::vector<kudu::MemTracker*,
std::__1::allocator<kudu::MemTracker*> >::~vector()
#4 kudu::MemTracker::~MemTracker() mem_tracker.cc:83:1
...
#9 kudu::tablet::OpTracker::~OpTracker()
#10 kudu::tablet::TabletReplica::~TabletReplica()
...
#16
scoped_refptr<kudu::tablet::TabletReplica>::reset(kudu::tablet::TabletReplica*)
#17 kudu::tablet::TabletReplicaTestBase::RestartReplica(bool)
Previous read of size 8 at 0x7b4400027688 by thread T20 (mutexes: write
M1047222376632167904):
#0 std::__1::vector<kudu::MemTracker*,
std::__1::allocator<kudu::MemTracker*> >::end()
#1 kudu::MemTracker::Release(long)
#2 kudu::tablet::OpTracker::Release(kudu::tablet::OpDriver*)
#3 kudu::tablet::OpDriver::Finalize()
#4 kudu::tablet::OpDriver::ApplyTask()
#5 kudu::tablet::OpDriver::ApplyAsync()::$_2::operator()()
...
[1]
http://dist-test.cloudera.org:8080/test_drilldown?test_name=txn_participant-test
Change-Id: I993015bf73ad8fe84a864b8b3c030e1be00e26e0
---
M src/kudu/tablet/tablet_replica.cc
1 file changed, 12 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/22612/2
--
To view, visit http://gerrit.cloudera.org:8080/22612
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I993015bf73ad8fe84a864b8b3c030e1be00e26e0
Gerrit-Change-Number: 22612
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <[email protected]>