You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Fangmin Lv (JIRA)" <ji...@apache.org> on 2019/07/28 18:25:00 UTC

[jira] [Updated] (ZOOKEEPER-3472) Treat check request as a write request which needs to wait for the check txn commit from leader

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

Fangmin Lv updated ZOOKEEPER-3472:
----------------------------------
    Description: 
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, so it seems not a problem, but it could leave an issue there if the check API is exposed in the future.

  was:
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.


> 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.6.0, 3.5.5
>            Reporter: Fangmin Lv
>            Assignee: Fangmin Lv
>            Priority: Major
>             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, so it seems not a problem, 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)