hanm commented on a change in pull request #1172: ZOOKEEPER-3594: Ability to 
skip proposing requests with error transactions
URL: https://github.com/apache/zookeeper/pull/1172#discussion_r360631463
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/Request.java
 ##########
 @@ -462,4 +476,48 @@ public String getUsers() {
         }
         return users.toString();
     }
+
+    /**
+     * This will check if the request's handler supports skip feature,
+     * the information that is passed from Learner to LearnerMaster using 
protocol version info
+     *
+     * See 
org.apache.zookeeper.server.quorum.QuorumZooKeeperServer.PROTOCOL_VERSION
+     *
+     */
+    public boolean canSkip() {
+        return skipRequestHandler != null;
 
 Review comment:
   Wouldn't this always return true? As far as I can see skipRequestHandler 
will never be null as it's set by `setSkipRequestHandler`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to