HBASE-15030 Deadlock in master TableNamespaceManager while running IntegrationTestDDLMasterFailover
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8e0854c6 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8e0854c6 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8e0854c6 Branch: refs/heads/hbase-12439 Commit: 8e0854c64be553595b8ed44b9856a3d74ad3005f Parents: e00a04d Author: Matteo Bertozzi <matteo.berto...@cloudera.com> Authored: Wed Dec 23 09:46:18 2015 -0800 Committer: Matteo Bertozzi <matteo.berto...@cloudera.com> Committed: Wed Dec 23 09:46:18 2015 -0800 ---------------------------------------------------------------------- .../apache/hadoop/hbase/master/TableNamespaceManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/8e0854c6/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java index 4b36f59..bbeaf76 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java @@ -133,7 +133,7 @@ public class TableNamespaceManager { return nsTable; } - private synchronized boolean acquireSharedLock() throws IOException { + private boolean acquireSharedLock() throws IOException { try { return rwLock.readLock().tryLock(sharedLockTimeoutMs, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { @@ -141,11 +141,11 @@ public class TableNamespaceManager { } } - public synchronized void releaseSharedLock() { + public void releaseSharedLock() { rwLock.readLock().unlock(); } - public synchronized boolean acquireExclusiveLock() { + public boolean acquireExclusiveLock() { try { return rwLock.writeLock().tryLock(exclusiveLockTimeoutMs, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { @@ -153,7 +153,7 @@ public class TableNamespaceManager { } } - public synchronized void releaseExclusiveLock() { + public void releaseExclusiveLock() { rwLock.writeLock().unlock(); }