Hello Kudu Jenkins, Abhishek Chennaka,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/21779

to look at the new patch set (#2).

Change subject: [tablet] fix race in RowSetMetadata::id()
......................................................................

[tablet] fix race in RowSetMetadata::id()

This patch fixes a race in access to the RowSetMetadata::id_ field
in the rollback scenario in the MajorCompactDeltaStoresWithColumnIds()
method of the DiskRowSet class.  It shouldn't be a big deal on x86_64
machines since 64-bit integer operations are atomic there, but it
might be a real issue on aarch64 systems.

The thread sanitizer reported the following warning when running the
MultiThreadedHybridClockTabletTest.UpdateNoMergeCompaction scenario
of the mt-tablet-test:

  Read of size 8 at 0x7b3400014780 by thread T30 (mutexes: write M76293278759445
9152, write M7098002):
    #0 kudu::tablet::RowSetMetadata::id() const 
src/kudu/tablet/rowset_metadata.h:100:31 (libtablet.so+0x346faa)
    #1 kudu::tablet::RowSetTree::Reset(...) 
src/kudu/tablet/rowset_tree.cc:190:48 (libtablet.so+0x4bf666)
    #2 kudu::tablet::Tablet::ModifyRowSetTree(...) 
src/kudu/tablet/tablet.cc:1490:3 (libtablet.so+0x323755)
    #3 kudu::tablet::Tablet::AtomicSwapRowSetsUnlocked(...) 
src/kudu/tablet/tablet.cc:1504:3 (libtablet.so+0x3239bc)
    #4 kudu::tablet::Tablet::AtomicSwapRowSets(...) 
src/kudu/tablet/tablet.cc:1496:3 (libtablet.so+0x3238f9)
    ...

  Previous write of size 8 at 0x7b3400014780 by thread T12 (mutexes: write 
M625572878699880144, write M530715863088620288, write M525367769810683784):
    #0 kudu::tablet::RowSetMetadata::LoadFromPB(...) 
src/kudu/tablet/rowset_metadata.cc:77:7 (libtablet.so+0x4f9f03)
    #1 
kudu::tablet::DiskRowSet::MajorCompactDeltaStoresWithColumnIds(...)::$_0::operator()()
 const src/kudu/tablet/diskrowset.cc:603:23 (libtablet.so+0x46eddf)
    #2 
kudu::ScopedCleanup<kudu::tablet::DiskRowSet::MajorCompactDeltaStoresWithColumnIds(...)::$_0>::~ScopedCleanup()
 src/kudu/util/scoped_cleanup.h:51:7 (libtablet.so+0x46cc5a)
    #3 kudu::tablet::DiskRowSet::MajorCompactDeltaStoresWithColumnIds(...) 
src/kudu/tablet/diskrowset.cc:636:1 (libtablet.so+0x46c5c9)
    #4 kudu::tablet::DiskRowSet::MajorCompactDeltaStores(...) 
src/kudu/tablet/diskrowset.cc:570:10 (libtablet.so+0x46c013)
    ...

Change-Id: I4b09575616e754b7dbb24586293f128e361b9360
SUMMARY: ThreadSanitizer: data race src/kudu/tablet/rowset_metadata.h:100:31 in 
kudu::tablet::RowSetMetadata::id() const
---
M src/kudu/tablet/rowset_metadata.cc
M src/kudu/tablet/rowset_metadata.h
2 files changed, 16 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/79/21779/2
--
To view, visit http://gerrit.cloudera.org:8080/21779
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4b09575616e754b7dbb24586293f128e361b9360
Gerrit-Change-Number: 21779
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to