zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [zookeeper] branch master updated: ZOOKEEPER-3472: Treat check request as a write request which needs to wait for the check txn commit from leader
Date Mon, 05 Aug 2019 23:41:49 GMT
This is an automated email from the ASF dual-hosted git repository.

hanm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 1d4aaf7  ZOOKEEPER-3472: Treat check request as a write request which needs to wait
for the check txn commit from leader
1d4aaf7 is described below

commit 1d4aaf7ca292c565f8c77ae5dc980ef6e8e246f1
Author: Fangmin Lyu <fangmin@apache.org>
AuthorDate: Mon Aug 5 16:41:44 2019 -0700

    ZOOKEEPER-3472: Treat check request as a write request which needs to wait for the check
txn commit from leader
    
    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.
    
    There is no explicit API exposed for check, but it could leave an issue there if the check
API is exposed in the future.
    
    Also because the check API is not exposed, we cannot write an E2E test for check here.
    
    Author: Fangmin Lyu <fangmin@apache.org>
    
    Reviewers: Michael Han <hanm@apache.org>
    
    Closes #1026 from lvfangmin/ZOOKEEPER-3472
---
 .../main/java/org/apache/zookeeper/server/quorum/CommitProcessor.java    | 1 +
 1 file changed, 1 insertion(+)

diff --git a/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/CommitProcessor.java
b/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/CommitProcessor.java
index 22b8956..d8c2de5 100644
--- a/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/CommitProcessor.java
+++ b/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/CommitProcessor.java
@@ -186,6 +186,7 @@ public class CommitProcessor extends ZooKeeperCriticalThread implements
             case OpCode.reconfig:
             case OpCode.multi:
             case OpCode.setACL:
+            case OpCode.check:
                 return true;
             case OpCode.sync:
                 return matchSyncs;


Mime
View raw message