Skip to content
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

ARTEMIS-3622 MQTT can deadlock on client cxn/discxn #4909

Merged
merged 1 commit into from
May 21, 2024

Conversation

jbertram
Copy link
Contributor

This commit fixes the deadlock described on ARTEMIS-3622 by moving the synchronization "up" a level from the MQTTSession to the MQTTConnectionManager. It also eliminates the synchronization on the MQTTSessionState in the MQTTConnectionManager because it's no longer needed. This change should not only eliminate the deadlock, but improve performance relatively as well.

There is no test associated with this commit as I wasn't able to reproduce the deadlock with any kind of straight-forward test. There was a test linked on the Jira, but it involved intrusive and fragile scaffolding and wasn't ultimately tenable. That said, I did test this fix with that test and it was successful. In any case, I think static analysis should be sufficient here as the changes are pretty straight-forward.

This commit fixes the deadlock described on ARTEMIS-3622 by moving the
synchronization "up" a level from the MQTTSession to the
MQTTConnectionManager. It also eliminates the synchronization on the
MQTTSessionState in the MQTTConnectionManager because it's no longer
needed. This change should not only eliminate the deadlock, but improve
performance relatively as well.

There is no test associated with this commit as I wasn't able to
reproduce the deadlock with any kind of straight-forward test. There was
a test linked on the Jira, but it involved intrusive and fragile
scaffolding and wasn't ultimately tenable. That said, I did test this
fix with that test and it was successful. In any case, I think static
analysis should be sufficient here as the changes are pretty
straight-forward.
@gemmellr gemmellr merged commit 3c058e9 into apache:main May 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants