jvrao commented on a change in pull request #1106: BOOKKEEPER-1103 Add channel
TLS counters
URL: https://github.com/apache/bookkeeper/pull/1106#discussion_r165541744
##########
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 change looks more than adding counters. Unless I am missing some code
refactorization.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services