-
Notifications
You must be signed in to change notification settings - Fork 4k
Make it possible to shrink only a subset of quorum queues by providing a naming pattern #15021
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
Make it possible to shrink only a subset of quorum queues by providing a naming pattern #15021
Conversation
|
Some members of the core team cannot be convinced that "mass shrinking" of replicated queues is a good idea. This PR like can be reimplemented as a custom plugin, both the CLI part and the QQ-related functions that run on RabbitMQ nodes. |
|
@michaelklishin hello! 👋 i'm not sure if the purpose of these changes has been understood? Our current problem is the "mass shrinking" which we cant avoid when using these default helper shrink functions provided by rabbitmq.
This change is actually helping reduce "mass shrinking", by adding extra clauses to reduce the number of queues shrunk (matching a smaller set, instead of just shrinking "everything"). Without these changes, the shrink all will shrink everything across the broker/cluster with no option to reduce the QQ blast radius for the user.
We're happy to implement things via plugins. But our current problem is the "mass shrinking" which we cant avoid from the broker. Here, we are providing a means to reduce "mass shrinking" of everything on the broker (current shrink all ends up shrinking even queues which dont need to be shrunk when recovering from disaster). |
|
One final note: together #13873 #15166 with #grow these public API extensions allow a custom plugin to
Exposing these new options to |
Make it possible to shrink only a subset of quorum queues by providing a naming pattern (backport #15021)
Proposed Changes
Hello Rabbit Team! 👋
These changes extend the QQ force shrink operations to use regx for queue names on shrink (globally or per vhost). There cases where in the event of Quorum Queues being in a bad state (e.g no leader or bad multiple partitions), only a set need be shrunk on emergency disaster recovery operations, to prevent and rescue total message loss before queue is either re-grown or permanently deleted and re-declared. The extension (to the existing operations) allows the following:
Default will match all queues as existing behaviour. This change will help rescue only a specific set of queues without necessarily shrinking everything (which can take a longtime on heavily loaded brokers). We are really keen on having this available for recovery procedures to help prevent message loss. Please take a look, thanks!
Types of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply.You can also fill these out after creating the PR.
This is simply a reminder of what we are going to look for before merging your code.
CONTRIBUTING.mddocumentFurther Comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution
you did and what alternatives you considered, etc.