You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2016/06/22 02:52:56 UTC

incubator-kudu git commit: catalog_manager: fix a locking error

Repository: incubator-kudu
Updated Branches:
  refs/heads/master a35d556d0 -> 5f7d79910


catalog_manager: fix a locking error

This lock acquisition took the wrong lock, which meant it didn't add any
protection against table/tablet visition races at all.

See commit 1681d9a for context.

Change-Id: I8db7a78309bb9182ae1fdb92485e8467b90a84b2
Reviewed-on: http://gerrit.cloudera.org:8080/3425
Tested-by: Kudu Jenkins
Reviewed-by: David Ribeiro Alves <dr...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/5f7d7991
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/5f7d7991
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/5f7d7991

Branch: refs/heads/master
Commit: 5f7d79910d8da492195b5c22a6d9a7911f950107
Parents: a35d556
Author: Adar Dembo <ad...@cloudera.com>
Authored: Tue Jun 21 12:48:27 2016 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Wed Jun 22 02:52:39 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/5f7d7991/src/kudu/master/catalog_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/catalog_manager.cc b/src/kudu/master/catalog_manager.cc
index e89d5b7..8aeb78e 100644
--- a/src/kudu/master/catalog_manager.cc
+++ b/src/kudu/master/catalog_manager.cc
@@ -715,7 +715,7 @@ void CatalogManager::Shutdown() {
   // any new tasks for those entries.
   TableInfoMap copy;
   {
-    std::lock_guard<simple_spinlock> l(state_lock_);
+    boost::shared_lock<LockType> l(lock_);
     copy = table_ids_map_;
   }
   for (const TableInfoMap::value_type &e : copy) {