You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/02/12 20:23:40 UTC

[GitHub] kishorekasi commented on a change in pull request #1106: Issue 1103: Add channel TLS counters

kishorekasi commented on a change in pull request #1106: Issue 1103: Add channel TLS counters
URL: https://github.com/apache/bookkeeper/pull/1106#discussion_r167675446
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 ##########
 @@ -937,6 +954,23 @@ void errorOut(final CompletionKey key, final int rc) {
         }
     }
 
+    /**
+     * Errors out pending ops from per channel bookie client. As the channel
+     * is being closed, all the operations waiting on the connection
+     * will be sent to completion with error.
+     */
+    void errorOutPendingOps(int rc) {
+        Queue<GenericCallback<PerChannelBookieClient>> oldPendingOps;
+        synchronized (this) {
+            oldPendingOps = pendingOps;
+            pendingOps = new ArrayDeque<>();
+        }
+
+        for (GenericCallback<PerChannelBookieClient> pendingOp : oldPendingOps) {
+            pendingOp.operationComplete(rc, PerChannelBookieClient.this);
+        }
+    }
 
 Review comment:
   This is part of another PR(#1109 ), which is currently in review. Once we merge this to master, it should go away.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services