You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ma...@apache.org on 2022/08/25 09:52:11 UTC
[pulsar] branch branch-2.9 updated: [fix][broker]Prevent StackOverFlowException in SHARED subscription (#17053)
This is an automated email from the ASF dual-hosted git repository.
mattisonchao pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.9 by this push:
new 84124e2c0df [fix][broker]Prevent StackOverFlowException in SHARED subscription (#17053)
84124e2c0df is described below
commit 84124e2c0dff2f12cb210cc0dfda071c12e9f006
Author: Qiang Zhao <ma...@apache.org>
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 e6cc83ee4be..b5375d66492 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
@@ -604,7 +604,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