[
https://issues.apache.org/jira/browse/HBASE-11342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031366#comment-14031366
]
Hudson commented on HBASE-11342:
--------------------------------
SUCCESS: Integrated in HBase-0.98 #336 (See
[https://builds.apache.org/job/HBase-0.98/336/])
HBASE-11342 The method isChildReadLock in class ZKInterProcessLockBase is wrong
(Qianxi Zhang) (stack: rev 267ad3b99320ef80d646e0ba95bff58e8612abda)
*
hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/lock/ZKInterProcessLockBase.java
> The method isChildReadLock in class ZKInterProcessLockBase is wrong
> -------------------------------------------------------------------
>
> Key: HBASE-11342
> URL: https://issues.apache.org/jira/browse/HBASE-11342
> Project: HBase
> Issue Type: Bug
> Components: Zookeeper
> Affects Versions: 0.99.0, 0.98.3
> Reporter: Qianxi Zhang
> Assignee: Qianxi Zhang
> Priority: Minor
> Fix For: 0.99.0, 0.98.4
>
> Attachments: HBASE_11342.patch
>
>
> The method isChildReadLock in class ZKInterProcessLockBase may be wrong,
> which determines whether the lock is readLock or not. So we should compare
> the node name with READ_LOCK_CHILD_NODE_PREFIX rather than
> WRITE_LOCK_CHILD_NODE_PREFIX. Since there is no other method to invoke the
> method "isChildReadLock" now, we have not encountered an error.
> {code}
> protected static boolean isChildReadLock(String child) {
> int idx = child.lastIndexOf(ZKUtil.ZNODE_PATH_SEPARATOR);
> String suffix = child.substring(idx + 1);
> return suffix.startsWith(WRITE_LOCK_CHILD_NODE_PREFIX);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)