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

[jira] [Created] (ZOOKEEPER-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
----------------------------------------------------------------------------------------------------------------------

                 Key: ZOOKEEPER-1202
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
             Project: ZooKeeper
          Issue Type: Improvement
          Components: java client
    Affects Versions: 3.4.0
            Reporter: Matthias Spycher
            Assignee: Matthias Spycher


ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.

- ClientCnxnState is new and enforces certain state transitions
- ZooKeeper.isExpired() is new
- ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
- The SendThread terminates the EventThread on a call to close() via the event-of-death
- Polymorphism is used to handle internal exceptions (SendIOExceptions)
- The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Mahadev konar updated ZOOKEEPER-1202:
-------------------------------------

    Fix Version/s: 3.5.0
    
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZOOKEEPER-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment: ZOOKEEPER-1202.patch

Changed ClientCloseTest.testExpiration() to wait for expiration.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher commented on ZOOKEEPER-1202:
---------------------------------------------

Ok, let me change the test a bit to wait until the session is expired. Thanks Camille.

                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment:     (was: ZOOKEEPER-1202.patch)
    
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Hadoop QA commented on ZOOKEEPER-1202:
--------------------------------------

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

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

    +1 tests included.  The patch appears to include 21 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 (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 failed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/841//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/841//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/841//console

This message is automatically generated.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment: ZOOKEEPER-1202.patch

Added Apache License comment to new files.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment: ZOOKEEPER-1202.patch

Grant license to ASF.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher commented on ZOOKEEPER-1202:
---------------------------------------------

ClientCloseTest.testExpiration() is failing here, but I'm unable to reproduce this on my system (Windows 7).

Patrick, can you take a look and let me know if there's a better way to ensure the server expires the client's session in the testExpiration() method.
>From the logs it appears the SessionExpiredException wasn't thrown on the client-side (which happens every time on my system).
Thanks.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment: ZOOKEEPER-1202.patch

Updated against trunk
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch, ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment: ZOOKEEPER-1202.patch

> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment:     (was: ZOOKEEPER-1202.patch)
    
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Hadoop QA commented on ZOOKEEPER-1202:
--------------------------------------

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

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

    +1 tests included.  The patch appears to include 21 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 (version 1.3.9) warnings.

    -1 release audit.  The applied patch generated 28 release audit warnings (more than the trunk's current 24 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/839//testReport/
Release audit warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/839//artifact/trunk/patchprocess/patchReleaseAuditProblems.txt
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/839//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/839//console

This message is automatically generated.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment:     (was: ZOOKEEPER-1202.patch)
    
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Hadoop QA commented on ZOOKEEPER-1202:
--------------------------------------

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

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

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

    -1 patch.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/830//console

This message is automatically generated.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Hadoop QA commented on ZOOKEEPER-1202:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12508008/ZOOKEEPER-1202.patch
  against trunk revision 1214571.

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

    +1 tests included.  The patch appears to include 21 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 (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/842//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/842//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/842//console

This message is automatically generated.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment:     (was: ZOOKEEPER-1202.patch)
    
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment:     (was: ZOOKEEPER-1202.patch)
    
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Hadoop QA commented on ZOOKEEPER-1202:
--------------------------------------

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

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

    +1 tests included.  The patch appears to include 12 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 (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 failed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/586//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/586//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/586//console

This message is automatically generated.

> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment: ZOOKEEPER-1202.patch

Apply same state check to other tests in ClientCloseTest. Increase timeout to 5s.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Camille Fournier commented on ZOOKEEPER-1202:
---------------------------------------------

I think you might just need a longer TIMEOUT for that awaitTermination... the thread can sleep for up to 1s in the sendThread run loop before trying to reconnect, so on those slow build machines you might just need a bit more wiggle room. We don't see it even trying to connect until > 2s after the session was closed.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment: ZOOKEEPER-1202.patch

Missed a file -- trying again.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Hadoop QA commented on ZOOKEEPER-1202:
--------------------------------------

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

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

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

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

    -1 javac.  The patch appears to cause tar ant target to fail.

    -1 findbugs.  The patch appears to cause Findbugs (version 1.3.9) to fail.

    +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 passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/838//testReport/
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/838//console

This message is automatically generated.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Hadoop QA commented on ZOOKEEPER-1202:
--------------------------------------

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

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

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

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

    -1 javac.  The patch appears to cause tar ant target to fail.

    -1 findbugs.  The patch appears to cause Findbugs (version 1.3.9) to fail.

    +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 passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/837//testReport/
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/837//console

This message is automatically generated.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch, ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment:     (was: ZOOKEEPER-1202.patch)
    
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Hadoop QA commented on ZOOKEEPER-1202:
--------------------------------------

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

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

    +1 tests included.  The patch appears to include 21 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 (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 failed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/840//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/840//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/840//console

This message is automatically generated.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher commented on ZOOKEEPER-1202:
---------------------------------------------

In this latest patch I've left out the polymorphic exception handling for clarity.

I also ran into some issues with unit tests that I fixed:
ClientPortBindTest was updated to deal with IPv6 loopback addresses which many cause exceptions on bind().
LoadFromLogTest had a potential race that has been fixed.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch, ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment: ZOOKEEPER-1202.patch

One more try -- it helps to run svn diff in the correct workspace...
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Patrick Hunt commented on ZOOKEEPER-1202:
-----------------------------------------

can you refresh the patch, not applying to trunk.
                
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>         Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

--
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-1202) Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability

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

Matthias Spycher updated ZOOKEEPER-1202:
----------------------------------------

    Attachment:     (was: ZOOKEEPER-1202.patch)
    
> Prevent certain state transitions in Java client on close(); improve exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1202
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Matthias Spycher
>            Assignee: Matthias Spycher
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the closing flag ensures that the client will close, its state may end up in CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from blocking

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