[jira] [Commented] (ZOOKEEPER-1675) Make sync a quorum operation
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13616138#comment-13616138 ] Jacky007 commented on ZOOKEEPER-1675: - what is different between the quorum sync and 'empty' set ? there is another problem that sync is a async, we ignore the result usually. If we connect to another server before get the response, the followed read may get a stale value. > Make sync a quorum operation > > > Key: ZOOKEEPER-1675 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1675 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.4.0, 3.5.0 >Reporter: Alexander Shraer > > sync + read is supposed to return at least the latest write that completes > before the sync starts. This is true if the leader doesn't change, but when > it does it may not work. The problem happens when the old leader L1 still > thinks that it is the leader but some other leader L2 was already elected and > committed some operations. Suppose that follower F is connected to L1 and > invokes a sync. Even though L1 responds to the sync, the recent operations > committed by L2 will not be flushed to F so a subsequent read on F will not > see these operations. > To prevent this we should broadcast the sync like updates. > This problem is also mentioned in Section 4.4 of the ZooKeeper peper (but the > proposed solution there is insufficient to solve the issue). -- 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] [Commented] (ZOOKEEPER-1675) Make sync a quorum operation
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13616477#comment-13616477 ] Alexander Shraer commented on ZOOKEEPER-1675: - Hi, Its pretty much the same as an empty write, and perhaps an easy way to implement it without introducing a new operation. Unlike writes, I don't think we want to log the syncs. Anyway, users can currently do "write + read" instead of "sync + read" to get strong semantics. Good point about the connection change. Yes, this is a problem. I'm not sure how this is implemented exactly, but intuitively we need the client to update its last-seen-zxid once the sync completes. This way if the connection change happens after the sync completes the client will only connect to someone at least as up-to-date as the sync. And if the connection switch happens before the sync completes then the sync will fail, which is also fine. Alex > Make sync a quorum operation > > > Key: ZOOKEEPER-1675 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1675 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.4.0, 3.5.0 >Reporter: Alexander Shraer > > sync + read is supposed to return at least the latest write that completes > before the sync starts. This is true if the leader doesn't change, but when > it does it may not work. The problem happens when the old leader L1 still > thinks that it is the leader but some other leader L2 was already elected and > committed some operations. Suppose that follower F is connected to L1 and > invokes a sync. Even though L1 responds to the sync, the recent operations > committed by L2 will not be flushed to F so a subsequent read on F will not > see these operations. > To prevent this we should broadcast the sync like updates. > This problem is also mentioned in Section 4.4 of the ZooKeeper peper (but the > proposed solution there is insufficient to solve the issue). -- 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] [Commented] (ZOOKEEPER-1675) Make sync a quorum operation
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13618591#comment-13618591 ] Jacky007 commented on ZOOKEEPER-1675: - sync is an asynchronous operation, we usually ignore the result. we may need a multi-op to make it atomic. > Make sync a quorum operation > > > Key: ZOOKEEPER-1675 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1675 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.4.0, 3.5.0 >Reporter: Alexander Shraer > > sync + read is supposed to return at least the latest write that completes > before the sync starts. This is true if the leader doesn't change, but when > it does it may not work. The problem happens when the old leader L1 still > thinks that it is the leader but some other leader L2 was already elected and > committed some operations. Suppose that follower F is connected to L1 and > invokes a sync. Even though L1 responds to the sync, the recent operations > committed by L2 will not be flushed to F so a subsequent read on F will not > see these operations. > To prevent this we should broadcast the sync like updates. > This problem is also mentioned in Section 4.4 of the ZooKeeper peper (but the > proposed solution there is insufficient to solve the issue). -- 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] [Commented] (ZOOKEEPER-1675) Make sync a quorum operation
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13618596#comment-13618596 ] Alexander Shraer commented on ZOOKEEPER-1675: - I don't think it matters whether its synchronous or asynchronous. I'm not suggesting that sync returns a value, so you can continue ignoring the result. I'm only proposing to change how sync is implemented internally. Following the sync the user will still invoke a read just like now. BTW, an alternative (which I think you're referring to) is to create a "strong read" that will return a value and will be atomic, but that doesn't solve the problem of sync. It can also be implemented using a multiop of sync+read as I think you're implying. > Make sync a quorum operation > > > Key: ZOOKEEPER-1675 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1675 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.4.0, 3.5.0 >Reporter: Alexander Shraer > > sync + read is supposed to return at least the latest write that completes > before the sync starts. This is true if the leader doesn't change, but when > it does it may not work. The problem happens when the old leader L1 still > thinks that it is the leader but some other leader L2 was already elected and > committed some operations. Suppose that follower F is connected to L1 and > invokes a sync. Even though L1 responds to the sync, the recent operations > committed by L2 will not be flushed to F so a subsequent read on F will not > see these operations. > To prevent this we should broadcast the sync like updates. > This problem is also mentioned in Section 4.4 of the ZooKeeper peper (but the > proposed solution there is insufficient to solve the issue). -- 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] [Commented] (ZOOKEEPER-1675) Make sync a quorum operation
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13618739#comment-13618739 ] Jacky007 commented on ZOOKEEPER-1675: - Sorry, it has nothing to do with correctness. What I want to tell is we may need more codes to achieve a really "strong read". > Make sync a quorum operation > > > Key: ZOOKEEPER-1675 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1675 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.4.0, 3.5.0 >Reporter: Alexander Shraer > > sync + read is supposed to return at least the latest write that completes > before the sync starts. This is true if the leader doesn't change, but when > it does it may not work. The problem happens when the old leader L1 still > thinks that it is the leader but some other leader L2 was already elected and > committed some operations. Suppose that follower F is connected to L1 and > invokes a sync. Even though L1 responds to the sync, the recent operations > committed by L2 will not be flushed to F so a subsequent read on F will not > see these operations. > To prevent this we should broadcast the sync like updates. > This problem is also mentioned in Section 4.4 of the ZooKeeper peper (but the > proposed solution there is insufficient to solve the issue). -- 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