[ 
https://issues.apache.org/jira/browse/HDFS-5944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13930951#comment-13930951
 ] 

Brandon Li commented on HDFS-5944:
----------------------------------

I forgot to append the jira number when doing the back porting.
Usually I don't forget. But, sorry for this one. Here are the log entries in 
branch-2 and 2.4.

For branch-2:
r1570372 | brandonli | 2014-02-20 14:32:49 -0800 (Thu, 20 Feb 2014) | 1 line

Merging change r1570366 from trunk

For branch-2.4:
r1570377 | brandonli | 2014-02-20 14:40:00 -0800 (Thu, 20 Feb 2014) | 1 line

Merging change r1570372 from branch-2

> LeaseManager:findLeaseWithPrefixPath can't handle path like /a/b/ right and 
> cause SecondaryNameNode failed do checkpoint
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-5944
>                 URL: https://issues.apache.org/jira/browse/HDFS-5944
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 1.2.0, 2.2.0
>            Reporter: zhaoyunjiong
>            Assignee: zhaoyunjiong
>             Fix For: 1.3.0, 2.4.0
>
>         Attachments: HDFS-5944-branch-1.2.patch, HDFS-5944.patch, 
> HDFS-5944.test.txt, HDFS-5944.trunk.patch
>
>
> In our cluster, we encountered error like this:
> java.io.IOException: saveLeases found path 
> /XXX/20140206/04_30/_SUCCESS.slc.log but is not under construction.
>       at 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.saveFilesUnderConstruction(FSNamesystem.java:6217)
>       at 
> org.apache.hadoop.hdfs.server.namenode.FSImageFormat$Saver.save(FSImageFormat.java:607)
>       at 
> org.apache.hadoop.hdfs.server.namenode.FSImage.saveCurrent(FSImage.java:1004)
>       at 
> org.apache.hadoop.hdfs.server.namenode.FSImage.saveNamespace(FSImage.java:949)
> What happened:
> Client A open file /XXX/20140206/04_30/_SUCCESS.slc.log for write.
> And Client A continue refresh it's lease.
> Client B deleted /XXX/20140206/04_30/
> Client C open file /XXX/20140206/04_30/_SUCCESS.slc.log for write
> Client C closed the file /XXX/20140206/04_30/_SUCCESS.slc.log
> Then secondaryNameNode try to do checkpoint and failed due to failed to 
> delete lease hold by Client A when Client B deleted /XXX/20140206/04_30/.
> The reason is a bug in findLeaseWithPrefixPath:
>      int srclen = prefix.length();
>      if (p.length() == srclen || p.charAt(srclen) == Path.SEPARATOR_CHAR) {
>         entries.put(entry.getKey(), entry.getValue());
>       }
> Here when prefix is /XXX/20140206/04_30/, and p is 
> /XXX/20140206/04_30/_SUCCESS.slc.log, p.charAt(srcllen) is '_'.
> The fix is simple, I'll upload patch later.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to