kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject incubator-kudu git commit: lock_manager: fix TSAN error in LockTable::Resize()
Date Thu, 23 Jun 2016 19:49:25 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master 6894438a4 -> 5c0a762ab


lock_manager: fix TSAN error in LockTable::Resize()

This function was doing a non-atomic read of item_count_,
which is decremented outside the lock by Release().

I looped all_types-itest in TSAN which was previously
quite flaky and 50/50 passed:
http://dist-test.cloudera.org/job?job_id=todd.1466706366.9004

Change-Id: Id9d57c2b36bfa794cbd786641e456ad748c60941
Reviewed-on: http://gerrit.cloudera.org:8080/3469
Reviewed-by: Adar Dembo <adar@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/5c0a762a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/5c0a762a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/5c0a762a

Branch: refs/heads/master
Commit: 5c0a762ab5d4920d9ab5d03fa8c22c5b63609c7a
Parents: 6894438
Author: Todd Lipcon <todd@cloudera.com>
Authored: Thu Jun 23 11:22:57 2016 -0700
Committer: Todd Lipcon <todd@apache.org>
Committed: Thu Jun 23 19:49:08 2016 +0000

----------------------------------------------------------------------
 src/kudu/tablet/lock_manager.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/5c0a762a/src/kudu/tablet/lock_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/lock_manager.cc b/src/kudu/tablet/lock_manager.cc
index af48540..aee696d 100644
--- a/src/kudu/tablet/lock_manager.cc
+++ b/src/kudu/tablet/lock_manager.cc
@@ -228,7 +228,7 @@ void LockTable::ReleaseLockEntry(LockEntry *entry) {
 void LockTable::Resize() {
   // Calculate a new table size
   size_t new_size = 16;
-  while (new_size < item_count_) {
+  while (new_size < base::subtle::NoBarrier_Load(&item_count_)) {
     new_size <<= 1;
   }
 


Mime
View raw message