jt2594838 commented on a change in pull request #1533:
URL: https://github.com/apache/incubator-iotdb/pull/1533#discussion_r458493154



##########
File path: 
cluster/src/main/java/org/apache/iotdb/cluster/server/member/RaftMember.java
##########
@@ -1564,4 +1582,33 @@ public void setAppendLogThreadPool(ExecutorService 
appendLogThreadPool) {
   public ExecutorService getAsyncThreadPool() {
     return asyncThreadPool;
   }
+
+  public interface OnCommitLogEventListener {
+
+    /**
+     * the callback method when committed log async success
+     */
+    void onSuccess();
+
+    /**
+     * @param e the exception raised when committed log async failed
+     */
+    void onError(Exception e);
+  }
+
+  public class AsyncCommitLogEvent implements OnCommitLogEventListener {
+
+    @Override
+    public void onSuccess() {
+      synchronized (syncLock) {
+        syncLock.notifyAll();
+      }
+    }
+
+    @Override
+    public void onError(Exception e) {
+      logger.error("async commit log failed, {}", e.toString());

Review comment:
       `"async commit log failed", e` is more generally used.




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


Reply via email to