HBASE-11342 The method isChildReadLock in class ZKInterProcessLockBase is wrong (Qianxi Zhang)
This commit is contained in:
parent
492f1f6d44
commit
98deb39ace
@ -246,7 +246,7 @@ public abstract class ZKInterProcessLockBase implements InterProcessLock {
|
|||||||
protected static boolean isChildReadLock(String child) {
|
protected static boolean isChildReadLock(String child) {
|
||||||
int idx = child.lastIndexOf(ZKUtil.ZNODE_PATH_SEPARATOR);
|
int idx = child.lastIndexOf(ZKUtil.ZNODE_PATH_SEPARATOR);
|
||||||
String suffix = child.substring(idx + 1);
|
String suffix = child.substring(idx + 1);
|
||||||
return suffix.startsWith(WRITE_LOCK_CHILD_NODE_PREFIX);
|
return suffix.startsWith(READ_LOCK_CHILD_NODE_PREFIX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user