BewareMyPower commented on code in PR #24741:
URL: https://github.com/apache/pulsar/pull/24741#discussion_r2352965744


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java:
##########
@@ -154,20 +153,16 @@ protected void cancelPendingRead() {
         }
     }
 
-    @Override
-    public void readEntriesComplete(final List<Entry> entries, Object obj) {
-        executor.execute(() -> internalReadEntriesComplete(entries, obj));
-    }
-
-    private synchronized void internalReadEntriesComplete(final List<Entry> 
entries, Object obj) {
-        ReadEntriesCtx readEntriesCtx = (ReadEntriesCtx) obj;
-        Consumer readConsumer = readEntriesCtx.getConsumer();
-        long epoch = readEntriesCtx.getEpoch();
-        readEntriesCtx.recycle();
+    private synchronized void readEntriesComplete(List<Entry> entries, 
Consumer readConsumer, long epoch) {
         if (log.isDebugEnabled()) {
             log.debug("[{}-{}] Got messages: {}", name, readConsumer, 
entries.size());
         }
 
+        if (!havePendingRead) {
+            log.warn("[{}-{}] There is no pending read when entries {} are 
called", name, readConsumer,

Review Comment:
   I choose to remove these logs, `havePendingRead` seems never helpful and 
maybe we can replace it with a better design in future. For now, adding such 
logs for debugging is also not meaningful



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

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

Reply via email to