[jira] [Updated] (ZOOKEEPER-1159) ClientCnxn does not propagate session expiration indication

2018-05-08 Thread Andor Molnar (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andor Molnar updated ZOOKEEPER-1159:

Fix Version/s: (was: 3.5.3)
   (was: 3.6.0)
   3.4.0

> ClientCnxn does not propagate session expiration indication
> ---
>
> Key: ZOOKEEPER-1159
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1159
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.0
>Reporter: Andrew Purtell
>Assignee: Andor Molnar
>Priority: Major
> Fix For: 3.4.0
>
>
> ClientCnxn does not always propagate session expiration indication up to 
> clients. If a reconnection attempt fails because the session has since 
> expired, the KeeperCode is still Disconnected, but shouldn't it be set to 
> Expired? Perhaps like so:
> {code}
> --- a/src/java/main/org/apache/zookeeper/ClientCnxn.java
> +++ b/src/java/main/org/apache/zookeeper/ClientCnxn.java
> @@ -1160,6 +1160,7 @@ public class ClientCnxn {
>  clientCnxnSocket.doTransport(to, pendingQueue, 
> outgoingQueue);
>  
>  } catch (Exception e) {
> +Event.KeeperState eventState = 
> Event.KeeperState.Disconnected;
>  if (closing) {
>  if (LOG.isDebugEnabled()) {
>  // closing so this is expected
> @@ -1172,6 +1173,7 @@ public class ClientCnxn {
>  // this is ugly, you have a better way speak up
>  if (e instanceof SessionExpiredException) {
>  LOG.info(e.getMessage() + ", closing socket 
> connection");
> +eventState = Event.KeeperState.Expired;
>  } else if (e instanceof SessionTimeoutException) {
>  LOG.info(e.getMessage() + RETRY_CONN_MSG);
>  } else if (e instanceof EndOfStreamException) {
> @@ -1191,7 +1193,7 @@ public class ClientCnxn {
>  if (state.isAlive()) {
>  eventThread.queueEvent(new WatchedEvent(
>  Event.EventType.None,
> -Event.KeeperState.Disconnected,
> +eventState,
>  null));
>  }
>  clientCnxnSocket.updateNow();
> {code}
> This affects HBase. HBase master and region server processes will shut down 
> by design if their session has expired, but will attempt to reconnect if they 
> think they have been disconnected. The above prevents proper termination.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ZOOKEEPER-1159) ClientCnxn does not propagate session expiration indication

2018-03-25 Thread Michael Han (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Han updated ZOOKEEPER-1159:
---
Priority: Major  (was: Blocker)

> ClientCnxn does not propagate session expiration indication
> ---
>
> Key: ZOOKEEPER-1159
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1159
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.0
>Reporter: Andrew Purtell
>Assignee: Andor Molnar
>Priority: Major
> Fix For: 3.5.4, 3.6.0
>
>
> ClientCnxn does not always propagate session expiration indication up to 
> clients. If a reconnection attempt fails because the session has since 
> expired, the KeeperCode is still Disconnected, but shouldn't it be set to 
> Expired? Perhaps like so:
> {code}
> --- a/src/java/main/org/apache/zookeeper/ClientCnxn.java
> +++ b/src/java/main/org/apache/zookeeper/ClientCnxn.java
> @@ -1160,6 +1160,7 @@ public class ClientCnxn {
>  clientCnxnSocket.doTransport(to, pendingQueue, 
> outgoingQueue);
>  
>  } catch (Exception e) {
> +Event.KeeperState eventState = 
> Event.KeeperState.Disconnected;
>  if (closing) {
>  if (LOG.isDebugEnabled()) {
>  // closing so this is expected
> @@ -1172,6 +1173,7 @@ public class ClientCnxn {
>  // this is ugly, you have a better way speak up
>  if (e instanceof SessionExpiredException) {
>  LOG.info(e.getMessage() + ", closing socket 
> connection");
> +eventState = Event.KeeperState.Expired;
>  } else if (e instanceof SessionTimeoutException) {
>  LOG.info(e.getMessage() + RETRY_CONN_MSG);
>  } else if (e instanceof EndOfStreamException) {
> @@ -1191,7 +1193,7 @@ public class ClientCnxn {
>  if (state.isAlive()) {
>  eventThread.queueEvent(new WatchedEvent(
>  Event.EventType.None,
> -Event.KeeperState.Disconnected,
> +eventState,
>  null));
>  }
>  clientCnxnSocket.updateNow();
> {code}
> This affects HBase. HBase master and region server processes will shut down 
> by design if their session has expired, but will attempt to reconnect if they 
> think they have been disconnected. The above prevents proper termination.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ZOOKEEPER-1159) ClientCnxn does not propagate session expiration indication

2017-03-13 Thread Michael Han (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Han updated ZOOKEEPER-1159:
---
Fix Version/s: (was: 3.5.3)
   3.5.4

> ClientCnxn does not propagate session expiration indication
> ---
>
> Key: ZOOKEEPER-1159
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1159
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.0
>Reporter: Andrew Purtell
>Assignee: Flavio Junqueira
>Priority: Blocker
> Fix For: 3.5.4, 3.6.0
>
>
> ClientCnxn does not always propagate session expiration indication up to 
> clients. If a reconnection attempt fails because the session has since 
> expired, the KeeperCode is still Disconnected, but shouldn't it be set to 
> Expired? Perhaps like so:
> {code}
> --- a/src/java/main/org/apache/zookeeper/ClientCnxn.java
> +++ b/src/java/main/org/apache/zookeeper/ClientCnxn.java
> @@ -1160,6 +1160,7 @@ public class ClientCnxn {
>  clientCnxnSocket.doTransport(to, pendingQueue, 
> outgoingQueue);
>  
>  } catch (Exception e) {
> +Event.KeeperState eventState = 
> Event.KeeperState.Disconnected;
>  if (closing) {
>  if (LOG.isDebugEnabled()) {
>  // closing so this is expected
> @@ -1172,6 +1173,7 @@ public class ClientCnxn {
>  // this is ugly, you have a better way speak up
>  if (e instanceof SessionExpiredException) {
>  LOG.info(e.getMessage() + ", closing socket 
> connection");
> +eventState = Event.KeeperState.Expired;
>  } else if (e instanceof SessionTimeoutException) {
>  LOG.info(e.getMessage() + RETRY_CONN_MSG);
>  } else if (e instanceof EndOfStreamException) {
> @@ -1191,7 +1193,7 @@ public class ClientCnxn {
>  if (state.isAlive()) {
>  eventThread.queueEvent(new WatchedEvent(
>  Event.EventType.None,
> -Event.KeeperState.Disconnected,
> +eventState,
>  null));
>  }
>  clientCnxnSocket.updateNow();
> {code}
> This affects HBase. HBase master and region server processes will shut down 
> by design if their session has expired, but will attempt to reconnect if they 
> think they have been disconnected. The above prevents proper termination.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ZOOKEEPER-1159) ClientCnxn does not propagate session expiration indication

2016-06-21 Thread Chris Nauroth (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Nauroth updated ZOOKEEPER-1159:
-
Fix Version/s: (was: 3.5.2)
   3.5.3

> ClientCnxn does not propagate session expiration indication
> ---
>
> Key: ZOOKEEPER-1159
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1159
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.0
>Reporter: Andrew Purtell
>Assignee: Flavio Junqueira
>Priority: Blocker
> Fix For: 3.6.0, 3.5.3
>
>
> ClientCnxn does not always propagate session expiration indication up to 
> clients. If a reconnection attempt fails because the session has since 
> expired, the KeeperCode is still Disconnected, but shouldn't it be set to 
> Expired? Perhaps like so:
> {code}
> --- a/src/java/main/org/apache/zookeeper/ClientCnxn.java
> +++ b/src/java/main/org/apache/zookeeper/ClientCnxn.java
> @@ -1160,6 +1160,7 @@ public class ClientCnxn {
>  clientCnxnSocket.doTransport(to, pendingQueue, 
> outgoingQueue);
>  
>  } catch (Exception e) {
> +Event.KeeperState eventState = 
> Event.KeeperState.Disconnected;
>  if (closing) {
>  if (LOG.isDebugEnabled()) {
>  // closing so this is expected
> @@ -1172,6 +1173,7 @@ public class ClientCnxn {
>  // this is ugly, you have a better way speak up
>  if (e instanceof SessionExpiredException) {
>  LOG.info(e.getMessage() + ", closing socket 
> connection");
> +eventState = Event.KeeperState.Expired;
>  } else if (e instanceof SessionTimeoutException) {
>  LOG.info(e.getMessage() + RETRY_CONN_MSG);
>  } else if (e instanceof EndOfStreamException) {
> @@ -1191,7 +1193,7 @@ public class ClientCnxn {
>  if (state.isAlive()) {
>  eventThread.queueEvent(new WatchedEvent(
>  Event.EventType.None,
> -Event.KeeperState.Disconnected,
> +eventState,
>  null));
>  }
>  clientCnxnSocket.updateNow();
> {code}
> This affects HBase. HBase master and region server processes will shut down 
> by design if their session has expired, but will attempt to reconnect if they 
> think they have been disconnected. The above prevents proper termination.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-1159) ClientCnxn does not propagate session expiration indication

2011-10-18 Thread Camille Fournier (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Camille Fournier updated ZOOKEEPER-1159:


Fix Version/s: (was: 3.4.0)
   3.5.0

 ClientCnxn does not propagate session expiration indication
 ---

 Key: ZOOKEEPER-1159
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1159
 Project: ZooKeeper
  Issue Type: Bug
  Components: java client
Affects Versions: 3.4.0
Reporter: Andrew Purtell
Priority: Blocker
 Fix For: 3.5.0


 ClientCnxn does not always propagate session expiration indication up to 
 clients. If a reconnection attempt fails because the session has since 
 expired, the KeeperCode is still Disconnected, but shouldn't it be set to 
 Expired? Perhaps like so:
 {code}
 --- a/src/java/main/org/apache/zookeeper/ClientCnxn.java
 +++ b/src/java/main/org/apache/zookeeper/ClientCnxn.java
 @@ -1160,6 +1160,7 @@ public class ClientCnxn {
  clientCnxnSocket.doTransport(to, pendingQueue, 
 outgoingQueue);
  
  } catch (Exception e) {
 +Event.KeeperState eventState = 
 Event.KeeperState.Disconnected;
  if (closing) {
  if (LOG.isDebugEnabled()) {
  // closing so this is expected
 @@ -1172,6 +1173,7 @@ public class ClientCnxn {
  // this is ugly, you have a better way speak up
  if (e instanceof SessionExpiredException) {
  LOG.info(e.getMessage() + , closing socket 
 connection);
 +eventState = Event.KeeperState.Expired;
  } else if (e instanceof SessionTimeoutException) {
  LOG.info(e.getMessage() + RETRY_CONN_MSG);
  } else if (e instanceof EndOfStreamException) {
 @@ -1191,7 +1193,7 @@ public class ClientCnxn {
  if (state.isAlive()) {
  eventThread.queueEvent(new WatchedEvent(
  Event.EventType.None,
 -Event.KeeperState.Disconnected,
 +eventState,
  null));
  }
  clientCnxnSocket.updateNow();
 {code}
 This affects HBase. HBase master and region server processes will shut down 
 by design if their session has expired, but will attempt to reconnect if they 
 think they have been disconnected. The above prevents proper termination.

--
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-1159) ClientCnxn does not propagate session expiration indication

2011-08-20 Thread Mahadev konar (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mahadev konar updated ZOOKEEPER-1159:
-

 Priority: Blocker  (was: Major)
Fix Version/s: 3.4.0

 ClientCnxn does not propagate session expiration indication
 ---

 Key: ZOOKEEPER-1159
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1159
 Project: ZooKeeper
  Issue Type: Bug
  Components: java client
Affects Versions: 3.4.0
Reporter: Andrew Purtell
Priority: Blocker
 Fix For: 3.4.0


 ClientCnxn does not always propagate session expiration indication up to 
 clients. If a reconnection attempt fails because the session has since 
 expired, the KeeperCode is still Disconnected, but shouldn't it be set to 
 Expired? Perhaps like so:
 {code}
 --- a/src/java/main/org/apache/zookeeper/ClientCnxn.java
 +++ b/src/java/main/org/apache/zookeeper/ClientCnxn.java
 @@ -1160,6 +1160,7 @@ public class ClientCnxn {
  clientCnxnSocket.doTransport(to, pendingQueue, 
 outgoingQueue);
  
  } catch (Exception e) {
 +Event.KeeperState eventState = 
 Event.KeeperState.Disconnected;
  if (closing) {
  if (LOG.isDebugEnabled()) {
  // closing so this is expected
 @@ -1172,6 +1173,7 @@ public class ClientCnxn {
  // this is ugly, you have a better way speak up
  if (e instanceof SessionExpiredException) {
  LOG.info(e.getMessage() + , closing socket 
 connection);
 +eventState = Event.KeeperState.Expired;
  } else if (e instanceof SessionTimeoutException) {
  LOG.info(e.getMessage() + RETRY_CONN_MSG);
  } else if (e instanceof EndOfStreamException) {
 @@ -1191,7 +1193,7 @@ public class ClientCnxn {
  if (state.isAlive()) {
  eventThread.queueEvent(new WatchedEvent(
  Event.EventType.None,
 -Event.KeeperState.Disconnected,
 +eventState,
  null));
  }
  clientCnxnSocket.updateNow();
 {code}
 This affects HBase. HBase master and region server processes will shut down 
 by design if their session has expired, but will attempt to reconnect if they 
 think they have been disconnected. The above prevents proper termination.

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