-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Less coarse-grained locking for bindings add/remove operations #1900
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
All binding operations aquire special locks for destination and source. This is done to make sure bindings cannot be added or removed while being cleaned up. This means that adding and removing bindings for the same records may conflict. To avoid conflict the locks aquired during add/remove are now read locks. This should improve performance in case of concurrent bindings creation for the same resource.
Test: binding a queue to exchange 10 times in each process with different routing keys. Tested on the node, calling Time in microseconds, collected by
|
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.
This looks good but during our sync-up we learned that it is not yet ready for QA.
More testing:
As expected, with more nodes the difference is more visible. |
Let's wait for a bit and perhaps backport after |
Good job, @hairyhum 👍👍 |
|
Backported to |
Proposed Changes
All binding operations aquire special locks for destination and source.
This is done to make sure bindings cannot be added or removed while
being cleaned up.
This means that adding and removing bindings for the same records may
conflict.
To avoid conflict the locks aquired during add/remove are now read locks.
This should improve performance in case of concurrent bindings creation
for the same resource.
Types of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.
CONTRIBUTING.md
documentFurther Comments
This change needs some functional performance testing. It's suppose to improve the situation when multiple connections try to bind their queues (e.g. exclusive queues) to the same exchange concurrently.