You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2008/09/08 23:03:44 UTC

[jira] Created: (ZOOKEEPER-137) client watcher objects can lose events

client watcher objects can lose events
--------------------------------------

                 Key: ZOOKEEPER-137
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-137
             Project: Zookeeper
          Issue Type: Bug
          Components: java client
    Affects Versions: 3.0.0
            Reporter: Patrick Hunt
            Assignee: Patrick Hunt
             Fix For: 3.0.0


if a single watcher (A) is registered on a single node for both a getdata and exists watch the second watch event may be lost:

1) getdata("node", A)
2) setdata("node"...)
3) exists("node", A)
4) delete("node"...)

if watch events for 2 is processed on the client (zookeeper.java, zkwatcher) after 3 completes then the zkwatcher process event method will clear the watch and the subsequent operation's (4) event will be ignored

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


[jira] Updated: (ZOOKEEPER-137) client watcher objects can lose events

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

Patrick Hunt updated ZOOKEEPER-137:
-----------------------------------

    Attachment: ZOOKEEPER-137.patch

This patch adds a new WatcherTest to verify the failure condition. I've updated the clientcnxn code (and zookeeper.java) to correctly materialize the watchers that need to process an incoming watch event.

All tests now pass, including the new test case that explicitly verifies this case.

Note: hudson has been seeing intermittent failures due to this issue. ClientTest was occasionally failing due to missing events.

> client watcher objects can lose events
> --------------------------------------
>
>                 Key: ZOOKEEPER-137
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-137
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.0.0
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-137.patch
>
>
> if a single watcher (A) is registered on a single node for both a getdata and exists watch the second watch event may be lost:
> 1) getdata("node", A)
> 2) setdata("node"...)
> 3) exists("node", A)
> 4) delete("node"...)
> if watch events for 2 is processed on the client (zookeeper.java, zkwatcher) after 3 completes then the zkwatcher process event method will clear the watch and the subsequent operation's (4) event will be ignored

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


[jira] Commented: (ZOOKEEPER-137) client watcher objects can lose events

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634473#action_12634473 ] 

Hudson commented on ZOOKEEPER-137:
----------------------------------

Integrated in ZooKeeper-trunk #94 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/94/])

> client watcher objects can lose events
> --------------------------------------
>
>                 Key: ZOOKEEPER-137
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-137
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.0.0
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-137.patch
>
>
> if a single watcher (A) is registered on a single node for both a getdata and exists watch the second watch event may be lost:
> 1) getdata("node", A)
> 2) setdata("node"...)
> 3) exists("node", A)
> 4) delete("node"...)
> if watch events for 2 is processed on the client (zookeeper.java, zkwatcher) after 3 completes then the zkwatcher process event method will clear the watch and the subsequent operation's (4) event will be ignored

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


[jira] Updated: (ZOOKEEPER-137) client watcher objects can lose events

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

Benjamin Reed updated ZOOKEEPER-137:
------------------------------------

    Hadoop Flags: [Reviewed]

+1 Looks good

> client watcher objects can lose events
> --------------------------------------
>
>                 Key: ZOOKEEPER-137
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-137
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.0.0
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-137.patch
>
>
> if a single watcher (A) is registered on a single node for both a getdata and exists watch the second watch event may be lost:
> 1) getdata("node", A)
> 2) setdata("node"...)
> 3) exists("node", A)
> 4) delete("node"...)
> if watch events for 2 is processed on the client (zookeeper.java, zkwatcher) after 3 completes then the zkwatcher process event method will clear the watch and the subsequent operation's (4) event will be ignored

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


[jira] Updated: (ZOOKEEPER-137) client watcher objects can lose events

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

Benjamin Reed updated ZOOKEEPER-137:
------------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed revision 698734.

> client watcher objects can lose events
> --------------------------------------
>
>                 Key: ZOOKEEPER-137
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-137
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.0.0
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-137.patch
>
>
> if a single watcher (A) is registered on a single node for both a getdata and exists watch the second watch event may be lost:
> 1) getdata("node", A)
> 2) setdata("node"...)
> 3) exists("node", A)
> 4) delete("node"...)
> if watch events for 2 is processed on the client (zookeeper.java, zkwatcher) after 3 completes then the zkwatcher process event method will clear the watch and the subsequent operation's (4) event will be ignored

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


[jira] Updated: (ZOOKEEPER-137) client watcher objects can lose events

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

Patrick Hunt updated ZOOKEEPER-137:
-----------------------------------

    Status: Patch Available  (was: Open)

Please review and commit this.

> client watcher objects can lose events
> --------------------------------------
>
>                 Key: ZOOKEEPER-137
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-137
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.0.0
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-137.patch
>
>
> if a single watcher (A) is registered on a single node for both a getdata and exists watch the second watch event may be lost:
> 1) getdata("node", A)
> 2) setdata("node"...)
> 3) exists("node", A)
> 4) delete("node"...)
> if watch events for 2 is processed on the client (zookeeper.java, zkwatcher) after 3 completes then the zkwatcher process event method will clear the watch and the subsequent operation's (4) event will be ignored

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