This is an automated email from the ASF dual-hosted git repository.
mattisonchao pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.8 by this push:
new b062920b486 [fix][broker]Prevent StackOverFlowException in SHARED
subscription (#17053)
b062920b486 is described below
commit b062920b4869de8d2d474aad98d677457549701c
Author: Qiang Zhao <[email protected]>
AuthorDate: Fri Aug 12 09:48:26 2022 +0800
[fix][broker]Prevent StackOverFlowException in SHARED subscription (#17053)
---
.../service/persistent/PersistentDispatcherMultipleConsumers.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
index 189ef9ce853..37bc42570da 100644
---
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
+++
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
@@ -595,7 +595,9 @@ public class PersistentDispatcherMultipleConsumers extends
AbstractDispatcherMul
entry.release();
});
}
- readMoreEntries();
+ // We should not call readMoreEntries() recursively in the same thread
+ // as there is a risk of StackOverflowError
+ topic.getBrokerService().executor().execute(this::readMoreEntries);
}
@Override