-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Make default exchange bindings implicit #1721
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
It seems like |
Routing from default exchange is performed without querying bindings and they cannot be unbound and only show in `rabbitmqctl list_bindings`. There is no point in keeping them and they are slowing down cleanup.
The min-masters locator was originally designed to count bindings, but this was confusing for people wanting to distribute queues rather than routes to queues. This was changed in 1d413ea to count only queues which have at least one binding. But queues always have bindings (default) and hence it's equivalent to listing queues. Since default bindings are removed the location was broken. This commit changes the location to actually list queues rather than bindings.
d5b490f
to
10013f5
Compare
Default bindings are not represented in the mnesia database but still expected in the management UI and the rabbitmqctl command.
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.
There are failures in the rabbitmq-management HTTP API suite.
So far I see two types of failures:
|
Fake bindings should have fixed that. I'll take a look. |
rabbit_binding:exists checks bindings table. Since default bindings are not in that table anymore, it should check for queue existence.
Fixed |
This avoids duplicates after an existing installation is upgraded. References #1721.
Versions before 3.8 create default bindings for queues in the database. Since #1721 they are replaced with placeholders only for list operations. We need to cleanup the bindings to improve binding performance with older queues. [#163224049]
Backport of c7d107d 10013f5 e01dc98 7ba04a6 In 3.8 queues will not create default bindings. Because default bindings are only used in list function, it should be safe to run in a mixed mode with 3.8. List functions should show implicit bindings for queues created in 3.8. Min master locator logic is simplified and with or without default bindings will have the same behaviour as before. Follow-up to #1721
…_destination/1` Follow-up to #1721. Even though the default exchange bindings are deleted at schema migration time, this filtering improves backwards compatibility for mixed version clusters.
This was backported to |
…_destination/1` Follow-up to #1721. Even though the default exchange bindings are deleted at schema migration time, this filtering improves backwards compatibility for mixed version clusters.
Split from #1715
Default bindings slow down queue creation and deletion and are not used in the actual routing logic. They are returned in some HTTP API endpoints though, therefore to merge this PR there should be some changes done in the management plugin.
There is no information in bindings which cannot be extracted from queues, which makes it possible to fake results for HTTP API. The question is should we do that or make the bindings result empty if there are no explicit bindings?
The definitions result does not contain default bindings BTW.