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 "Todd Lipcon (JIRA)" <ji...@apache.org> on 2010/05/11 01:08:30 UTC

[jira] Created: (HDFS-1141) completeFile does not check lease ownership

completeFile does not check lease ownership
-------------------------------------------

                 Key: HDFS-1141
                 URL: https://issues.apache.org/jira/browse/HDFS-1141
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: name-node
    Affects Versions: 0.21.0
            Reporter: Todd Lipcon
            Assignee: Todd Lipcon
            Priority: Blocker


completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HDFS-1141) completeFile does not check lease ownership

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur updated HDFS-1141:
-----------------------------------

           Status: Resolved  (was: Patch Available)
     Hadoop Flags: [Reviewed]
    Fix Version/s: 0.22.0
       Resolution: Fixed

I just committed this. Thanks Todd!

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>             Fix For: 0.22.0
>
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866075#action_12866075 ] 

dhruba borthakur commented on HDFS-1141:
----------------------------------------

+1, code looks good. I will commit in a day unless somebody else has any other review comments.

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HDFS-1141) completeFile does not check lease ownership

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur resolved HDFS-1141.
------------------------------------

    Resolution: Fixed

Pulled into hadoop-0.20-append

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.20-append
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>             Fix For: 0.20-append, 0.22.0
>
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-1141:
------------------------------

    Status: Open  (was: Patch Available)

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866176#action_12866176 ] 

Tsz Wo (Nicholas), SZE commented on HDFS-1141:
----------------------------------------------

+1 thanks for working on it, Todd.

Minor: Look like that pendingFile won't be null since the checkLease(..) method below will throw a LeaseExpiredException when file == null.
{code}
//FSNamesystem
  private void checkLease(String src, String holder, INode file) 
                                                     throws IOException {

    if (file == null || file.isDirectory()) {
      Lease lease = leaseManager.getLease(holder);
      throw new LeaseExpiredException("No lease on " + src +
      ...
{code}

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866051#action_12866051 ] 

Todd Lipcon commented on HDFS-1141:
-----------------------------------

Test failure is the normal "port out of range: -1" shenanigans, nothing related to this patch.

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-1141:
------------------------------

    Status: Patch Available  (was: Open)

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866037#action_12866037 ] 

Todd Lipcon commented on HDFS-1141:
-----------------------------------

Yes, the LeaseExpiredException thrown by checkLease is informative - see FSNamesystem.checkLease. It will say "File does not exist" vs "File is not open for writing" vs "Lease mismatch" depending on the circumstance. This will make it to the log as well as back to the client (the prior implementation just gave back a generic IOE to the client saying it could not complete)

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-1141:
------------------------------

    Attachment: hdfs-1141-branch20.txt

Branch 20 patch for the HDFS-142-based append (not for commit to branch 20)

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866049#action_12866049 ] 

Hadoop QA commented on HDFS-1141:
---------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12444161/hdfs-1141.txt
  against trunk revision 942863.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 7 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    -1 core tests.  The patch failed core unit tests.

    -1 contrib tests.  The patch failed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/351/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/351/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/351/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/351/console

This message is automatically generated.

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-1141:
------------------------------

    Affects Version/s:     (was: 0.21.0)
                       0.20-append

This was determined to be invalid in trunk, but is necessary in branch-0.20-append

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.20-append
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>             Fix For: 0.22.0
>
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866256#action_12866256 ] 

Hadoop QA commented on HDFS-1141:
---------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12444208/hdfs-1141.txt
  against trunk revision 942863.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 7 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    -1 core tests.  The patch failed core unit tests.

    -1 contrib tests.  The patch failed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/354/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/354/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/354/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/354/console

This message is automatically generated.

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-1141:
------------------------------

    Attachment: hdfs-1141.txt

Here's a patch with just those test cases that apply to this bug from HDFS-1139.

Note: this does change the exception text coming out of completeFile to be more specific - now it actually contains "Lease mismatch" or "File is closed", etc, rather then the generic "Could not complete file" that it used to. I think this is a good thing, just wanted to note that it does have user-facing implications.

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HDFS-1141) completeFile does not check lease ownership

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur updated HDFS-1141:
-----------------------------------

    Fix Version/s: 0.20-append

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.20-append
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>             Fix For: 0.20-append, 0.22.0
>
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon reopened HDFS-1141:
-------------------------------


Oh wait, not unnecesary in trunk. But *also* necessary in branch-0.20 append :) I was thinking of that other similar JIRA about leases. Reopening for commit to 0.20-append

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.20-append
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>             Fix For: 0.22.0
>
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866023#action_12866023 ] 

dhruba borthakur commented on HDFS-1141:
----------------------------------------

I think the previous code clearly distinguished (via the log message) whether the file was a valid file that was already completed or whether it has a lease. Does the new log message work if the file is already closed?

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-1141:
------------------------------

    Attachment: hdfs-1141.txt

Updated patch based on Nicholas's feedback. I also removed CompleteFileStatus entirely, since we were only using the success/wait codes, it's easier to just use boolean.

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-1141:
------------------------------

    Status: Patch Available  (was: Open)

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866319#action_12866319 ] 

Todd Lipcon commented on HDFS-1141:
-----------------------------------

The failed tests are unrelated (TestNodeCounts passes locally). I'll file a JIRA for the TestNodeCounts failure separately if there isn't already one, since it's rather worrisome!

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866187#action_12866187 ] 

Todd Lipcon commented on HDFS-1141:
-----------------------------------

Thanks for taking a look, Nicolas.

bq. Minor: Look like that pendingFile won't be null since the checkLease(..) method below will throw a LeaseExpiredException when file == null.

Not sure what you're referring to - the patch removes the checks against pendingFile == null. We now check only for fileBlocks == null. Are you suggesting I remove fileBlocks and the associated null check? That seems reasonable, since fileBlocks itself isn't used outside the null check.

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HDFS-1141) completeFile does not check lease ownership

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866233#action_12866233 ] 

Tsz Wo (Nicholas), SZE commented on HDFS-1141:
----------------------------------------------

> Not sure what you're referring to ...
Oops, I mixed up pendingFile and fileBlocks.

I just have checked the codes.  fileBlocks also won't possibly be null, given that pendingFile is an INodeFileUnderConstruction.

+1 the new patch looks good.

> completeFile does not check lease ownership
> -------------------------------------------
>
>                 Key: HDFS-1141
>                 URL: https://issues.apache.org/jira/browse/HDFS-1141
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-1141-branch20.txt, hdfs-1141.txt, hdfs-1141.txt
>
>
> completeFile should check that the caller still owns the lease of the file that it's completing. This is for the 'testCompleteOtherLeaseHoldersFile' case in HDFS-1139.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.