You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/09/16 17:10:43 UTC

[GitHub] [bookkeeper] michaeljmarshall commented on a diff in pull request #3486: Check if channel closed before processing read request

michaeljmarshall commented on code in PR #3486:
URL: https://github.com/apache/bookkeeper/pull/3486#discussion_r973228658


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadEntryProcessorV3.java:
##########
@@ -249,6 +249,12 @@ protected ReadResponse getReadResponse() {
     public void safeRun() {
         requestProcessor.getRequestStats().getReadEntrySchedulingDelayStats().registerSuccessfulEvent(
             MathUtils.elapsedNanos(enqueueNanos), TimeUnit.NANOSECONDS);
+        if (!channel.isOpen()) {
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Dropping read request for closed channel: {}", channel);
+            }
+            return;

Review Comment:
   Yes, great catch! Thank you. I definitely should have caught that since I just fixed the same bug last week.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org