-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix: Prevent StackOverFlowException in SHARED subscription #16078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lhotari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this might mitigate the problem, I think that this might have a significant performance impact.
An alternative solution would be to have a threadlocal counter that counts the "depth" of readMoreEntries calls and schedules the call to the executor only when a given threshold is exceeded.
|
Could you provide more analysis about how does it happen? |
|
if depth is exceeded, we dispatch it to another thread,maybe it will fail again in another thread. maybe we should abort the invoke when reaching up to the max depth? |
we found this in our production env. when all consumers disconnected, and then connect again, it may occur. |
|
I found a similar fix just now, see #14121. Could you also share your point on this PR? @eolivelli Actually I'm a little confused in which case should |
|
@leizhiyuan Please provide a correct documentation label for your PR. |
|
The pr had no activity for 30 days, mark with Stale label. |
|
Since it takes a long time and the code differences are too large, I will close this PR. |
(If this PR fixes a github issue, please add
Fixes #<xyz>.)Fixes #16074
(or if this PR is one task of a github issue, please add
Master Issue: #<xyz>to link to the master issue.)Master Issue: #
Motivation
Explain here the context, and why you're making that change. What is the problem you're trying to solve.
Modifications
Describe the modifications you've done.
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation
Check the box below or label this PR directly.
Need to update docs?
doc-required(Your PR needs to update docs and you will update later)
doc-not-needed(Please explain why)
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)