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

fix potential race conditions in ModelObjectPool #125

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

mksergiy
Copy link
Contributor

@mksergiy mksergiy commented Dec 1, 2024

This PR fixes #123


Rebus is MIT-licensed. The code submitted in this pull request needs to carry the MIT license too. By leaving this text in, I hereby acknowledge that the code submitted in the pull request has the MIT license and can be merged with the Rebus codebase.

@CLAassistant
Copy link

CLAassistant commented Dec 1, 2024

CLA assistant check
All committers have signed the CLA.

@mookid8000
Copy link
Member

Hi @mksergiy , thanks for contributing!

It looks like a couple of tests are failing - did you try to run the tests locally? and did they work?

@mksergiy
Copy link
Contributor Author

mksergiy commented Dec 17, 2024

Hi @mksergiy , thanks for contributing!

It looks like a couple of tests are failing - did you try to run the tests locally? and did they work?

Yes, I ran the tests locally and didn’t find any issues. Today, I decided to double-check, and while the tests do run successfully, they fail in debug mode in my environment. After some investigation, I discovered that the main problem is the slow publishing of messages in parallel to the RabbitMQ queue when PublisherConfirms = true.

Since the failing test (CheckMaximumDegreeOfParallelism) is designed to test parallel message processing rather than message publishing, I recommend setting SetPublisherConfirms(false) for the RabbitMQ transport. This resolved the test failures for me in debug mode.

@mookid8000 mookid8000 merged commit 6d44441 into rebus-org:master Dec 18, 2024
2 checks passed
@mookid8000
Copy link
Member

Excellent work 🙂 👍

It's out as Rebus.RabbitMq.9.4.1. on NuGet.org now

Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible Race Condition in ModelObjectPool
3 participants