[jira] [Updated] (ZOOKEEPER-2927) Local session reconnect validation not forward to leader

2017-10-28 Thread Qihong Xu (JIRA)

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

Qihong Xu updated ZOOKEEPER-2927:
-
Description: 
When zookeeper quorum recovers from shutdown/crash, a client with a local 
session will reconnect to a random server in quorum. If this random-chosen 
server is not leader and does not own the local session previously, it will 
forward this session to leader for validation. And then if this is a global 
session, leader will update its owner, if not, leader adds Boolean false to 
packet and does nothing. 

Since our system involves mostly local session and has a large amount of 
connections, this procedure may be redundant and add potential pressure to 
leader. Is this reasonable for the reconnect scenario that local session 
validation not forward to leader, instead return by follower directly? 


  was:
When zookeeper quorum recovers from shutdown/crash, a client with a local 
session will reconnect to a random server in quorum. If this random-chosen 
server is not leader and does not own the local session previously, it will 
forward this session to leader for validation. And then if this is a global 
session, leader will update its owner, if not, leader adds Boolean false to 
packet and does nothing. 

Since our system involves mostly local session and has a large amount of 
connections, this procedure may be redundant and add potential pressure to 
leader. Is this reasonable for the reconnect scenario that local session does 
not forward to leader, instead return by follower directly? 



> Local session reconnect validation not forward to leader
> 
>
> Key: ZOOKEEPER-2927
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2927
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: java client, quorum, server
>Affects Versions: 3.5.3
> Environment: configuration management system based on zookeeper 3.5.3
>Reporter: Qihong Xu
>Priority: Minor
>
> When zookeeper quorum recovers from shutdown/crash, a client with a local 
> session will reconnect to a random server in quorum. If this random-chosen 
> server is not leader and does not own the local session previously, it will 
> forward this session to leader for validation. And then if this is a global 
> session, leader will update its owner, if not, leader adds Boolean false to 
> packet and does nothing. 
> Since our system involves mostly local session and has a large amount of 
> connections, this procedure may be redundant and add potential pressure to 
> leader. Is this reasonable for the reconnect scenario that local session 
> validation not forward to leader, instead return by follower directly? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


ZooKeeper-trunk-openjdk7 - Build # 1680 - Failure

2017-10-28 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-openjdk7/1680/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 65.52 MB...]
[junit] 2017-10-28 20:02:04,952 [myid:] - WARN  [New I/O boss 
#18:ClientCnxnSocketNetty$ZKClientHandler@439] - Exception caught: [id: 
0x45c5baa8] EXCEPTION: java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11222
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11222
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
[junit] at java.lang.Thread.run(Thread.java:748)
[junit] 2017-10-28 20:02:04,952 [myid:] - INFO  [New I/O boss 
#18:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2017-10-28 20:02:04,953 [myid:127.0.0.1:11222] - INFO  
[main-SendThread(127.0.0.1:11222):ClientCnxn$SendThread@1231] - channel for 
sessionid 0x1045389b93c is lost, closing socket connection and attempting 
reconnect
[junit] 2017-10-28 20:02:05,086 [myid:127.0.0.1:11286] - INFO  
[main-SendThread(127.0.0.1:11286):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11286. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-10-28 20:02:05,086 [myid:] - INFO  [New I/O boss 
#2007:ClientCnxnSocketNetty$1@127] - future isn't success, cause: {}
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11286
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
[junit] at java.lang.Thread.run(Thread.java:748)
[junit] 2017-10-28 20:02:05,087 [myid:] - WARN  [New I/O boss 
#2007:ClientCnxnSocketNetty$ZKClientHandler@439] - Exception caught: [id: 
0x7cfabfe5] EXCEPTION: java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11286
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:11286
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at