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/11/16 09:28:39 UTC
[GitHub] [pulsar] BewareMyPower commented on pull request #18491: [fix] [client] Multi topic consumer receive null even if has backlog
BewareMyPower commented on PR #18491:
URL: https://github.com/apache/pulsar/pull/18491#issuecomment-1316675708
Could you also explain why the flaky test is caused by this reason? I added some logs:
```diff
diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/im
pl/MultiTopicsConsumerImpl.java
index 1853be55f9..809a590451 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
@@ -705,6 +705,7 @@ public class MultiTopicsConsumerImpl<T> extends ConsumerBase<T> {
@Override
public void redeliverUnacknowledgedMessages() {
internalPinnedExecutor.execute(() -> {
+ log.info("XYZ rededeliverUnacked");
CONSUMER_EPOCH.incrementAndGet(this);
consumers.values().stream().forEach(consumer -> {
consumer.redeliverUnacknowledgedMessages();
@@ -713,6 +714,7 @@ public class MultiTopicsConsumerImpl<T> extends ConsumerBase<T> {
clearIncomingMessages();
unAckedMessageTracker.clear();
});
+ log.info("XYZ resumeReceiving");
resumeReceivingFromPausedConsumersIfNeeded();
}
```
And in my local env, `resumeReceivingFromPausedConsumersIfNeeded` and `clearIncomingMessages` were all executed in the same thread:
```
2022-11-16T17:24:38,714 - INFO - [pulsar-client-internal-39-1:MultiTopicsConsumerImpl@717] - XYZ resumeReceiving
2022-11-16T17:24:38,718 - INFO - [pulsar-client-internal-39-1:MultiTopicsConsumerImpl@708] - XYZ rededeliverUnacked
```
--
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