-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Forbid fenced Container to stop ConcurrentContainer #3537
base: main
Are you sure you want to change the base?
Conversation
[DRAFT] Fixes #spring-projectsGH-3448 spring-projects#3448 Issue: Fenced Child Container could stop the running ConcurrentContainer Fix: Configure KafkaMessageListenerContainer (KMLC) to use ConcurrentMessagleListenerContainerRef instead ofConcurrentContainer. Internally, ConcurrentContainerRef checks if KMLC is fenced when stop operations are called on Concurrent Container. If KMLC is fenced, suppress the `stop` related operations. If KMLC is not fenced, delegate the stop call to ConcurrentContainer.
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.
I'm sorry. That's too many changes.
What is really the problem?
And why would KMLC
call the stop on its parent at all?
@LokeshAlamuri Thanks for the PR. Have you run into it as a bug in your application? We see that you have a test on the related issue. Is that enough to reproduce the issue? As @artembilan mentioned, this PR has many changes that touch the critical elements of the framework. Since we are about to go into an RC phase in our release cycle, we may not want to introduce any potential regression issues in core components unless they are critical bugs. Case in point - a recent change in this area accidentally slowed down one of our tests in a downstream framework, which we only noticed a few weeks later due to the subtle nature of the issue. Because of that reason, I would vote to revisit this issue in the next minor version after |
sobychacko artembilan Thanks a lot for allocating your time and reviewing the issue and draft version of PR I have submitted. As mentioned in the issue I have reported, this is possible in the following scenario. Configuration:
Scenario:
This is really a complex issue which would require changes in multiple files and APIs as well. This PR I have submitted could help in understanding the design issue and possible fix. The issue is not only with the |
Yes, the Junits I have submitted would be 100% sufficient to reproduce the issue. |
I shall follow your suggestions and provide the information required. |
can you confirm, please, that this piece of code from the
So, whenever the |
We can do that. But, still the container could be fenced when it is inside error handler but not at the point where planned fenced condition is verified. In that case, suggested fix will not work. This is a bit design issue, where problem is not just with |
I see, so even if we check for So, you probably right: something like proxy for the container to push to those APIs where we would check for |
[DRAFT]
Fixes #GH-3448
Issue: Fenced Child Container could stop the running ConcurrentContainer
Fix: Configure KafkaMessageListenerContainer (KMLC) to use ConcurrentMessagleListenerContainerRef instead of
ConcurrentContainer. Internally, ConcurrentContainerRef checks if KMLC is fenced when stop operations are called on Concurrent Container. If KMLC is fenced, suppress the
stop
related operations. If KMLC is not fenced, delegate the stop call to ConcurrentContainer.