-
Notifications
You must be signed in to change notification settings - Fork 615
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
GH-2675: DefaultBinding isRunning enhancements #2838
Conversation
- Instead of relying on the lifecycle object's isRunning method which could possibly be synchronized and cause a contention for the lock, maintain the running state separately inside DefaultBinding via a field (similar to how it tracks the pausable state). Without this change, in the pollable Kafka consumer based applications, there is a possiblity for a longer wait when queyring the binding status in DefaultBinding (for example via the binding actuator endpoint) due to this aforementioned lock contention. Resolves spring-cloud#2675
This needs to be fixed in Spring Integration, not here. cc/ @artembilan |
@garyrussell @artembilan What do you think about temporarily having this change here? If it's not worth it, we will close this PR here. |
I'm sorry, I fail to determine what is wrong and what should be fixed in the |
@artembilan The deadlock happens when the |
Closing this in lieu of spring-projects/spring-integration#8778 |
I think we can just change the lifecycle synchronization to use an I am not sure why it is set to true after creating the consumer (in |
The |
Right; we. should also call |
Instead of relying on the lifecycle object's isRunning method which could possibly be synchronized and cause a contention for the lock, maintain the running state separately inside DefaultBinding via a field (similar to how it tracks the pausable state).
Without this change, in the pollable Kafka consumer based applications, there is a possiblity for a longer wait when queyring the binding status in DefaultBinding (for example via the binding actuator endpoint) due to this aforementioned lock contention.
Resolves #2675