[
https://issues.apache.org/jira/browse/HDFS-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vinay updated HDFS-5372:
------------------------
Attachment: HDFS-5372.patch
uploading a simple patch to
1. remove hasReadOrWriteLock()
2. and returning true for hasReadLock() in case writeLock is held.
Apology for uploading the patch even though issue is assigned. Since it was
about one month without any update, so attached a simple patch.
Please review.
> In FSNamesystem, hasReadLock() returns false if the current thread holds the
> write lock
> ---------------------------------------------------------------------------------------
>
> Key: HDFS-5372
> URL: https://issues.apache.org/jira/browse/HDFS-5372
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Tsz Wo (Nicholas), SZE
> Attachments: HDFS-5372.patch
>
>
> This bug was discovered by [~vinayrpet] in [this
> comment|https://issues.apache.org/jira/browse/HDFS-5283?focusedCommentId=13796752&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13796752].
> In FSNamesystem, there are hasReadLock() and hasReadOrWriteLock(). However,
> when a thread holds the write lock, the read lock is not required for reading
> data. So hasReadLock() and hasReadOrWriteLock() actually are the same.
--
This message was sent by Atlassian JIRA
(v6.1#6144)