You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Uma Maheswara Rao G (JIRA)" <ji...@apache.org> on 2012/08/23 12:35:42 UTC

[jira] [Created] (BOOKKEEPER-378) ReplicationWorker may not get ZK watcher notification on UnderReplication ledger lock deletion.

Uma Maheswara Rao G created BOOKKEEPER-378:
----------------------------------------------

             Summary: ReplicationWorker may not get ZK watcher notification on UnderReplication ledger lock deletion.
                 Key: BOOKKEEPER-378
                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-378
             Project: Bookkeeper
          Issue Type: Sub-task
          Components: bookkeeper-auto-recovery
            Reporter: Uma Maheswara Rao G
            Assignee: Uma Maheswara Rao G
             Fix For: 4.2.0


This issue found with BK-248. see [comment|https://issues.apache.org/jira/browse/BOOKKEEPER-248?focusedCommentId=13439426&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13439426]

Issue is: 
1) Two Workers started and trying to get the lock for same ledger.
2) Both worker found that lock file does not exist.
3) both gone ahead for creating the lock node.
4) One worker failed with NodeExists exception

Then it is just removing the children from the list and go for latch wait for the watch notification.

But here unfortunately we added the watch on lockPath with exists check call. But that time lockPatch really did not exists. SO, the lock may be invalid. Then it will never get the notification when lock has been cleaned by other worker.
Here other worker partly replicated and now the current worker should take lock. But it can not get that notification as it added that watch when node does not exist.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-378) ReplicationWorker may not get ZK watcher notification on UnderReplication ledger lock deletion.

Posted by "Uma Maheswara Rao G (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uma Maheswara Rao G updated BOOKKEEPER-378:
-------------------------------------------

    Attachment: BOOKKEEPER-378.patch

Attached a patch with simple fix
Fix is straight forward, just need to add exists watcher again on NodeExistsException.

Test wise, BK-248 multiple worker test will block most of the times with this issue. So, let's push this change before BK-248 commits.
                
> ReplicationWorker may not get ZK watcher notification on UnderReplication ledger lock deletion.
> -----------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-378
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-378
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-auto-recovery
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-378.patch
>
>
> This issue found with BK-248. see [comment|https://issues.apache.org/jira/browse/BOOKKEEPER-248?focusedCommentId=13439426&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13439426]
> Issue is: 
> 1) Two Workers started and trying to get the lock for same ledger.
> 2) Both worker found that lock file does not exist.
> 3) both gone ahead for creating the lock node.
> 4) One worker failed with NodeExists exception
> Then it is just removing the children from the list and go for latch wait for the watch notification.
> But here unfortunately we added the watch on lockPath with exists check call. But that time lockPatch really did not exists. SO, the lock may be invalid. Then it will never get the notification when lock has been cleaned by other worker.
> Here other worker partly replicated and now the current worker should take lock. But it can not get that notification as it added that watch when node does not exist.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira