[ https://issues.apache.org/jira/browse/ZOOKEEPER-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881313#action_12881313 ]
Sergey Doroshenko commented on ZOOKEEPER-784: --------------------------------------------- --- Question about session handling --- For now (latest patch) when r/o client connects to a partitioned server, new "fake" session is created for it -- fake because it exists only in this server. When server regains the quorum, during this session's revalidation it will be rejected as invalid since leader didn't see this it. >From users' point of view it'd be good to transparently upgrade such session >to a usual session. The idea is that if leader sees that given session is >invalid but also belongs to read-only client then it re-assigns new id to id >and sends this new id to the client. The idea is good but seems error-prone. For example, what to do with r/o clients that were partitioned (and connected to partitioned server) for longer than sess timeout? At leader their sessions have already been expired, so they should be rejected. Re-assigning new session to such clients doesn't look right. But the problem here is that when servers see an invalid session they can't tell if they never saw it or if they saw it but it was expired. So, if quorum rejects r/o session (which implies this session either was never seen by quorum or is expired), there are two options from users' point of view: * ZooKeeper object becomes invalid, and application should create a new one. Reliable and consistent with current ZK * server transparently re-assigns session id for such client. Seems to have many potential problems, as described above What do you think? > server-side functionality for read-only mode > -------------------------------------------- > > Key: ZOOKEEPER-784 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-784 > Project: Zookeeper > Issue Type: Sub-task > Reporter: Sergey Doroshenko > Assignee: Sergey Doroshenko > Attachments: ZOOKEEPER-784.patch, ZOOKEEPER-784.patch, > ZOOKEEPER-784.patch > > > As per http://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode , create > ReadOnlyZooKeeperServer which comes into play when peer is partitioned. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.