You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Jim Fulton (Created) (JIRA)" <ji...@apache.org> on 2011/12/04 20:06:39 UTC

[jira] [Created] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
-------------------------------------------------------------------------------------------------------------------------------

                 Key: ZOOKEEPER-1318
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
             Project: ZooKeeper
          Issue Type: Bug
          Components: contrib-bindings
    Affects Versions: 3.3.3
         Environment: Mac OS X (at least)
            Reporter: Jim Fulton


In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.


>>> zookeeper.state(h)
-112
>>> zookeeper.get_children(h, '/')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
SystemError: error return without exception set

Let me know if you'd like me to work on a patch.

--
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] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Henry Robinson updated ZOOKEEPER-1318:
--------------------------------------

    Attachment: ZOOKEEPER-1318.patch

Updated patch - InvalidStateException was already declared, just not dealt with in err_to_exception.

This is a very simple patch, and tests are hard to write for session expired exceptions; also we don't have coverage for similar cases with other exceptions. 
                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>            Assignee: Henry Robinson
>             Fix For: 3.3.6, 3.4.4, 3.5.0
>
>         Attachments: ZOOKEEPER-1318.patch, ZOOKEEPER-1318.patch
>
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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] [Commented] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Patrick Hunt commented on ZOOKEEPER-1318:
-----------------------------------------

Yes, that seems fine to me given the constraints and that it was manually verified. +1 Thanks Michi.
                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>            Assignee: Henry Robinson
>             Fix For: 3.3.6, 3.4.4, 3.5.0
>
>         Attachments: ZOOKEEPER-1318.patch, ZOOKEEPER-1318.patch
>
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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] [Commented] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Nikita Vetoshkin commented on ZOOKEEPER-1318:
---------------------------------------------

Seems a bit quiet here :) Error happens due to missing case in {{err_to_exception}} function. What exception type should be set?
                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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] [Commented] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Henry Robinson commented on ZOOKEEPER-1318:
-------------------------------------------

Although a test would be ideal, as I mentioned above:

* SessionExpired tests are tricky to write
* This patch is trivial
* We don't have coverage of this type ('does the correct exception get thrown') in most other places for zkpython
                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>            Assignee: Henry Robinson
>             Fix For: 3.3.6, 3.4.4, 3.5.0
>
>         Attachments: ZOOKEEPER-1318.patch, ZOOKEEPER-1318.patch
>
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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] [Commented] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Hadoop QA commented on ZOOKEEPER-1318:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12525110/ZOOKEEPER-1318.patch
  against trunk revision 1331246.

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

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +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 (version 1.3.9) 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: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1055//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1055//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1055//console

This message is automatically generated.
                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>            Assignee: Henry Robinson
>             Fix For: 3.3.6, 3.4.4, 3.5.0
>
>         Attachments: ZOOKEEPER-1318.patch, ZOOKEEPER-1318.patch
>
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Henry Robinson updated ZOOKEEPER-1318:
--------------------------------------

    Attachment: ZOOKEEPER-1318.patch

The error is a missing InvalidStateException. I've added the exception type, and confirmed that it show up when session expiration occurs. 
                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>         Attachments: ZOOKEEPER-1318.patch
>
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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] [Commented] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Hadoop QA commented on ZOOKEEPER-1318:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12525100/ZOOKEEPER-1318.patch
  against trunk revision 1331246.

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

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +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 (version 1.3.9) 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: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1054//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1054//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1054//console

This message is automatically generated.
                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>            Assignee: Henry Robinson
>             Fix For: 3.3.6, 3.4.4, 3.5.0
>
>         Attachments: ZOOKEEPER-1318.patch
>
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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] [Commented] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Hudson commented on ZOOKEEPER-1318:
-----------------------------------

Integrated in ZooKeeper-trunk #1552 (See [https://builds.apache.org/job/ZooKeeper-trunk/1552/])
    ZOOKEEPER-1318. In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly (henryr via michim) (Revision 1336467)

     Result = SUCCESS
michim : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1336467
Files : 
* /zookeeper/trunk/CHANGES.txt
* /zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c

                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>            Assignee: Henry Robinson
>             Fix For: 3.3.6, 3.4.4, 3.5.0
>
>         Attachments: ZOOKEEPER-1318.patch, ZOOKEEPER-1318.patch
>
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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] [Commented] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Michi Mutsuzaki commented on ZOOKEEPER-1318:
--------------------------------------------

+1

Henry's justification for not having a test seems reasonable to me. Pat, would it be ok if I commit this?

Thanks!
--Michi
                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>            Assignee: Henry Robinson
>             Fix For: 3.3.6, 3.4.4, 3.5.0
>
>         Attachments: ZOOKEEPER-1318.patch, ZOOKEEPER-1318.patch
>
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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] [Commented] (ZOOKEEPER-1318) In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly

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

Henry Robinson commented on ZOOKEEPER-1318:
-------------------------------------------

Hi Jim - 

Good catch! By all means, feel free to work on a patch :)

Thanks,

Henry
                
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1318
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1318
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: Mac OS X (at least)
>            Reporter: Jim Fulton
>
> In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly.
> >>> zookeeper.state(h)
> -112
> >>> zookeeper.get_children(h, '/')
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> SystemError: error return without exception set
> Let me know if you'd like me to work on a patch.

--
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