You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/13 05:16:02 UTC

[GitHub] [pulsar] HQebupt commented on a diff in pull request #16546: [fix][broker]check the cursor status when handling flowPermits

HQebupt commented on code in PR #16546:
URL: https://github.com/apache/pulsar/pull/16546#discussion_r919656030


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java:
##########
@@ -278,6 +279,11 @@ private synchronized void internalConsumerFlow(Consumer consumer) {
                 log.debug("[{}-{}] Ignoring flow control message since consumer is waiting for cursor to be rewinded",
                         name, consumer);
             }
+        } else if (((ManagedCursorImpl) cursor).resetCursorInProgress()) {
+            if (log.isDebugEnabled()) {
+                log.debug("[{}-{}] Ignoring flow control message since cursor reset in progress - cursor {}",
+                        name, consumer, cursor.getName());
+            }

Review Comment:
   It makes sense. We have to check the seek request status before ack. I have an idea: add a similar status like `resetCursorInProgress `in `ConsumerImpl`. Client has to check the status before sending ack request. How about it ? @codelipenghui 



-- 
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@pulsar.apache.org

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