You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2021/03/05 23:17:05 UTC

[GitHub] [helix] rabashizade commented on a change in pull request #1663: Track failures for async read/write in ZkClient

rabashizade commented on a change in pull request #1663:
URL: https://github.com/apache/helix/pull/1663#discussion_r588778308



##########
File path: zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/callback/ZkAsyncCallMonitorContext.java
##########
@@ -62,4 +62,18 @@ void recordAccess(String path) {
       }
     }
   }
+
+  /**
+   * Record the operation failure into the specified ZkClient monitor.
+   * @param path The monitored path
+   */
+  void recordFailure(String path) {
+    if (_monitor != null) {
+      if (_isRead) {
+        _monitor.recordFailure(path, ZkClientMonitor.AccessType.READ);

Review comment:
       Thanks, @NealSun96 for your suggestion. The reason I didn't write it that way is, as @zhangmeng916 suggested, the function above this one uses the same pattern so I kept it that way for consistency.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org