Fangmin Lv created ZOOKEEPER-3472:
-------------------------------------
Summary: Treat check request as a write request which needs to
wait for the check txn commit from leader
Key: ZOOKEEPER-3472
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3472
Project: ZooKeeper
Issue Type: Improvement
Components: server
Affects Versions: 3.5.5, 3.6.0
Reporter: Fangmin Lv
Assignee: Fangmin Lv
Fix For: 3.6.0
Check op is usually used as a sub op in multi, but from the ZooKeeper server
implementation it can also called separately, the learner will forward this
request to leader, and the leader will check the version with the given version
in the request, and generate a txn (error) in the quorum.
This is kind of a heavier sync to make sure when the client check on a learner,
it is syncing up to date with leader when the check request is being processed.
The learner need to wait for this remote commit before reply to client in
FinalRequestProcessor.
There is no explicit API exposed for check, from the logic this seems correct
and safe to change, but it could leave an issue there if the check API is
exposed in the future.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)