You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Vinay (JIRA)" <ji...@apache.org> on 2013/12/14 18:40:06 UTC
[jira] [Updated] (HDFS-5669) Storage#tryLock() should check for
null before logging successfull message
[ https://issues.apache.org/jira/browse/HDFS-5669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vinay updated HDFS-5669:
------------------------
Attachment: HDFS-5669.patch
> Storage#tryLock() should check for null before logging successfull message
> --------------------------------------------------------------------------
>
> Key: HDFS-5669
> URL: https://issues.apache.org/jira/browse/HDFS-5669
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: datanode
> Affects Versions: 2.2.0
> Reporter: Vinay
> Assignee: Vinay
> Attachments: HDFS-5669.patch
>
>
> In the following code in Storage#tryLock(), there is a possibility that {{ file.getChannel().tryLock();}} returns null if the lock is acquired by some other process. In that case even though return value is null, a successfull message confuses.
> {code}try {
> res = file.getChannel().tryLock();
> file.write(jvmName.getBytes(Charsets.UTF_8));
> LOG.info("Lock on " + lockF + " acquired by nodename " + jvmName);
> } catch(OverlappingFileLockException oe) {{code}
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)