kezhuw commented on code in PR #2070:
URL: https://github.com/apache/zookeeper/pull/2070#discussion_r1338288233


##########
zookeeper-server/src/test/java/org/apache/zookeeper/test/SkipErrorTxnTest.java:
##########
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zookeeper.test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.number.OrderingComparison.greaterThan;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import java.util.concurrent.CompletableFuture;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.server.ZooKeeperServer;
+import org.apache.zookeeper.server.quorum.QuorumPeer;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+public class SkipErrorTxnTest extends QuorumBase {
+    protected boolean skipErrorTxn() {
+        return true;
+    }
+
+    @BeforeEach
+    @Override
+    public void setUp() throws Exception {
+        // TODO: setup an follower as observer master.

Review Comment:
   I am working on this. I could be a bit late due to my personal schedule.



##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Follower.java:
##########
@@ -159,6 +159,22 @@ protected void processPacket(QuorumPacket qp) throws 
Exception {
         case Leader.PING:
             ping(qp);
             break;
+        case Leader.SKIP:
+            // It is sad that we have no breadcrumbs to route packet back to 
origin. Basically, we have choices:
+            // 1. Attach breadcrumbs to outstanding request.
+            //    This request protocol changes and protocol version bumping.

Review Comment:
   I think we could also cover #2069 if we want to go this way. I prefer this 
actually. We will inevitably introduce protocol in long term future. If so, why 
now ? But it still could be a separate issue before 3.10.0.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to