HBASE-15030 Deadlock in master TableNamespaceManager while running IntegrationTestDDLMasterFailover

This commit is contained in:
Matteo Bertozzi 2015-12-23 09:46:18 -08:00
parent 59cca6297f
commit d65210d213

View File

@ -134,7 +134,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) {
@ -142,11 +142,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) {
@ -154,7 +154,7 @@ public class TableNamespaceManager {
}
}
public synchronized void releaseExclusiveLock() {
public void releaseExclusiveLock() {
rwLock.writeLock().unlock();
}