You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/06/23 02:07:30 UTC
[2/3] incubator-kudu git commit: KUDU-1491. Address TSAN warning for
compaction
KUDU-1491. Address TSAN warning for compaction
This adds a missing memory barrier that was exposed when I removed
TSAN suppressions for mutation lists. Without the patch, TSAN
failed on mt-tablet-test a few percent of the time. With the patch,
I looped it 50 times with no failures:
http://dist-test.cloudera.org/job?job_id=todd.1466638821.4940
Change-Id: I42d2566eca096da172440ce3a88d0393dda9d324
Reviewed-on: http://gerrit.cloudera.org:8080/3454
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/19e78f72
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/19e78f72
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/19e78f72
Branch: refs/heads/master
Commit: 19e78f727fa66316833c513b528f389b006ce419
Parents: 7b280a0
Author: Todd Lipcon <to...@cloudera.com>
Authored: Wed Jun 22 16:41:26 2016 -0700
Committer: Todd Lipcon <to...@apache.org>
Committed: Thu Jun 23 00:47:42 2016 +0000
----------------------------------------------------------------------
src/kudu/tablet/compaction.cc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/19e78f72/src/kudu/tablet/compaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction.cc b/src/kudu/tablet/compaction.cc
index 8f4a131..9243337 100644
--- a/src/kudu/tablet/compaction.cc
+++ b/src/kudu/tablet/compaction.cc
@@ -506,8 +506,9 @@ class MergeCompactionInput : public CompactionInput {
}
static void AdvanceToLastInList(const Mutation** m) {
- while ((*m)->next() != nullptr) {
- *m = (*m)->next();
+ const Mutation* next;
+ while ((next = (*m)->acquire_next()) != nullptr) {
+ *m = next;
}
}
@@ -883,7 +884,7 @@ Status ReupdateMissedDeltas(const string &tablet_name,
for (const Mutation *mut = row.redo_head;
mut != nullptr;
- mut = mut->next()) {
+ mut = mut->acquire_next()) {
RowChangeListDecoder decoder(mut->changelist());
RETURN_NOT_OK(decoder.Init());