[
https://issues.apache.org/jira/browse/HDFS-14843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16937020#comment-16937020
]
Hudson commented on HDFS-14843:
-------------------------------
SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #17371 (See
[https://builds.apache.org/job/Hadoop-trunk-Commit/17371/])
HDFS-14843. Double Synchronization in BlockReportLeaseManager. (inigoiri: rev
afa1006a537e1fc1adb5005cbdf4e4d8d9e98b22)
* (edit)
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockReportLeaseManager.java
> Double Synchronization in BlockReportLeaseManager
> -------------------------------------------------
>
> Key: HDFS-14843
> URL: https://issues.apache.org/jira/browse/HDFS-14843
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
> Fix For: 3.3.0
>
> Attachments: HDFS-14843.1.patch
>
>
> {code:java|title=BlockReportLeaseManager.java}
> private synchronized long getNextId() {
> long id;
> do {
> id = nextId++;
> } while (id == 0);
> return id;
> }
> {code}
> This is a private method and is synchronized, however, it is only be accessed
> from an already-synchronized method. No need to double-synchronize.
> https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockReportLeaseManager.java#L183-L189
> https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockReportLeaseManager.java#L227
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]