You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Scott Wang (JIRA)" <ji...@apache.org> on 2010/02/25 13:02:27 UTC
[jira] Created: (ZOOKEEPER-682) Event is not processed when the
watcher is set to watch "/" if chrooted
Event is not processed when the watcher is set to watch "/" if chrooted
-----------------------------------------------------------------------
Key: ZOOKEEPER-682
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-682
Project: Zookeeper
Issue Type: Bug
Components: java client
Affects Versions: 3.2.2
Reporter: Scott Wang
After the event notification response from server is received, the client will convert the server path to the client path if chrooted by:
event.setPath(serverPath.substring(chrootPath.length());
If chrootPath and serverPath are the same, then the event's path will be set to a null string.
But the key of the watcher's map is "/", not a null string, so the watcher will not get notified at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-682) Event is not processed when the
watcher is set to watch "/" if chrooted
Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840987#action_12840987 ]
Mahadev konar commented on ZOOKEEPER-682:
-----------------------------------------
+1 the patch looks good. Pat you are right that the c api already takes care of it and also has a test included for it.
> Event is not processed when the watcher is set to watch "/" if chrooted
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-682
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-682
> Project: Zookeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.2.2
> Reporter: Scott Wang
> Assignee: Scott Wang
> Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-682.patch, ZOOKEEPER-682.patch
>
>
> After the event notification response from server is received, the client will convert the server path to the client path if chrooted by:
> event.setPath(serverPath.substring(chrootPath.length());
> If chrootPath and serverPath are the same, then the event's path will be set to a null string.
> But the key of the watcher's map is "/", not a null string, so the watcher will not get notified at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-682) Event is not processed when the
watcher is set to watch "/" if chrooted
Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt updated ZOOKEEPER-682:
-----------------------------------
Priority: Blocker (was: Major)
Fix Version/s: 3.3.0
Assignee: Scott Wang
Blocker for 3.3.0, we should ensure that the c client doesn't have similar issues.
> Event is not processed when the watcher is set to watch "/" if chrooted
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-682
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-682
> Project: Zookeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.2.2
> Reporter: Scott Wang
> Assignee: Scott Wang
> Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-682.patch
>
>
> After the event notification response from server is received, the client will convert the server path to the client path if chrooted by:
> event.setPath(serverPath.substring(chrootPath.length());
> If chrootPath and serverPath are the same, then the event's path will be set to a null string.
> But the key of the watcher's map is "/", not a null string, so the watcher will not get notified at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-682) Event is not processed when the
watcher is set to watch "/" if chrooted
Posted by "Scott Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Wang updated ZOOKEEPER-682:
---------------------------------
Attachment: ZOOKEEPER-682.patch
Java test case related to this problem is added to the patch attached.
The code provides the similar functionality in the c client is investigated:
The sub_string function checks if server_path and chroot path are the same and returns "/" if they are the same, so it seems that this problem does not occur on the c client.
However, I don't know how to add the test case of this problem to the test cases in c. Anyone can help?
> Event is not processed when the watcher is set to watch "/" if chrooted
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-682
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-682
> Project: Zookeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.2.2
> Reporter: Scott Wang
> Assignee: Scott Wang
> Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-682.patch, ZOOKEEPER-682.patch
>
>
> After the event notification response from server is received, the client will convert the server path to the client path if chrooted by:
> event.setPath(serverPath.substring(chrootPath.length());
> If chrootPath and serverPath are the same, then the event's path will be set to a null string.
> But the key of the watcher's map is "/", not a null string, so the watcher will not get notified at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-682) Event is not processed when the
watcher is set to watch "/" if chrooted
Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt updated ZOOKEEPER-682:
-----------------------------------
Status: Patch Available (was: Open)
Thanks Scott. I looked at the c tests and it looks to me like we are testing this case (reviewer please verify).
Submitting, let's see how hudson does with this.
> Event is not processed when the watcher is set to watch "/" if chrooted
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-682
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-682
> Project: Zookeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.2.2
> Reporter: Scott Wang
> Assignee: Scott Wang
> Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-682.patch, ZOOKEEPER-682.patch
>
>
> After the event notification response from server is received, the client will convert the server path to the client path if chrooted by:
> event.setPath(serverPath.substring(chrootPath.length());
> If chrootPath and serverPath are the same, then the event's path will be set to a null string.
> But the key of the watcher's map is "/", not a null string, so the watcher will not get notified at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-682) Event is not processed when the
watcher is set to watch "/" if chrooted
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840011#action_12840011 ]
Hadoop QA commented on ZOOKEEPER-682:
-------------------------------------
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12437463/ZOOKEEPER-682.patch
against trunk revision 915956.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 3 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 passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/124/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/124/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/124/console
This message is automatically generated.
> Event is not processed when the watcher is set to watch "/" if chrooted
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-682
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-682
> Project: Zookeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.2.2
> Reporter: Scott Wang
> Assignee: Scott Wang
> Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-682.patch, ZOOKEEPER-682.patch
>
>
> After the event notification response from server is received, the client will convert the server path to the client path if chrooted by:
> event.setPath(serverPath.substring(chrootPath.length());
> If chrootPath and serverPath are the same, then the event's path will be set to a null string.
> But the key of the watcher's map is "/", not a null string, so the watcher will not get notified at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-682) Event is not processed when the
watcher is set to watch "/" if chrooted
Posted by "Scott Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Wang updated ZOOKEEPER-682:
---------------------------------
Attachment: ZOOKEEPER-682.patch
Proposed patch attached
> Event is not processed when the watcher is set to watch "/" if chrooted
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-682
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-682
> Project: Zookeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.2.2
> Reporter: Scott Wang
> Attachments: ZOOKEEPER-682.patch
>
>
> After the event notification response from server is received, the client will convert the server path to the client path if chrooted by:
> event.setPath(serverPath.substring(chrootPath.length());
> If chrootPath and serverPath are the same, then the event's path will be set to a null string.
> But the key of the watcher's map is "/", not a null string, so the watcher will not get notified at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-682) Event is not processed when the
watcher is set to watch "/" if chrooted
Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahadev konar updated ZOOKEEPER-682:
------------------------------------
Resolution: Fixed
Hadoop Flags: [Reviewed]
Status: Resolved (was: Patch Available)
I just committed this. thanks scott!
> Event is not processed when the watcher is set to watch "/" if chrooted
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-682
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-682
> Project: Zookeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.2.2
> Reporter: Scott Wang
> Assignee: Scott Wang
> Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-682.patch, ZOOKEEPER-682.patch
>
>
> After the event notification response from server is received, the client will convert the server path to the client path if chrooted by:
> event.setPath(serverPath.substring(chrootPath.length());
> If chrootPath and serverPath are the same, then the event's path will be set to a null string.
> But the key of the watcher's map is "/", not a null string, so the watcher will not get notified at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-682) Event is not processed when the
watcher is set to watch "/" if chrooted
Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838503#action_12838503 ]
Patrick Hunt commented on ZOOKEEPER-682:
----------------------------------------
We need to add a test for this case. We should add it to both the c and java.
> Event is not processed when the watcher is set to watch "/" if chrooted
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-682
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-682
> Project: Zookeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.2.2
> Reporter: Scott Wang
> Assignee: Scott Wang
> Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-682.patch
>
>
> After the event notification response from server is received, the client will convert the server path to the client path if chrooted by:
> event.setPath(serverPath.substring(chrootPath.length());
> If chrootPath and serverPath are the same, then the event's path will be set to a null string.
> But the key of the watcher's map is "/", not a null string, so the watcher will not get notified at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.