-
Notifications
You must be signed in to change notification settings - Fork 149
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
Initial RabbitMQ 4.0 support (Mnesia only) #291
Conversation
Copied from rabbitmq-server @ 19af2f649c aka v4.0.2
@gomoripeti can you please tweak the wording to say something like
I don't see why this plugin cannot start Mnesia and create its tables even when Khepri is used in general, so we should explain that this is the current state of things, not a fundamental incompatibility. |
sure I will update the text. I also meant to write what you say that this is the current state only (the CI tests fail with the sam bazel reason as previous nightly tests, unfortunately I don't know bazel so don't know how to address) |
@gomoripeti this repo hasn't migrated off of BuildBuddy but that's not super relevant. CI will move back to Make fairly soon, including for RabbitMQ itself, for reasons that have nothing to do with Bazel or its capabilities. |
@gomoripeti the conclusion on our team is that this plugin should switch to schema API modules such as Can you please look into that before we merge this PR? |
The implementation is taken from `rabbit_exchange_type_consistent_hash`
I updated the functions used by However I don't fully understand the reason for this recovery. As far as I can trace, |
@gomoripeti |
With this change, the plugin works against 4.0 with Mnesia and that's fine to merge this part alone. However, as soon as I enable Khepri, routing specifically fails with an exception:
|
@gomoripeti I'd like to see Khepri support land before cutting a new release, at least unless we discover something really difficult to address. In the exception above, it's the table that does not exist. The plugin must create it (ensure it exists) on boot. It's a reasonable requirement to restart the nodes or disable and re-enable the plugin after enabling Khepri, or not enable it before moving to Khepri. |
EDIT: after re-reading your message I see you do mention the reasonable requirements. I think there are two issues to address related to khepri (and I intentionally reduced the scope of this PR to when
I can imagine a limited solution (only addressing 1.) as a next step where it is documented that one needs to disable this plugin before khepri migration and enable it after with delayed messages lost. As you mention this is acceptable I will shortly submit a followup PR for this |
@gomoripeti we can add a list of table-exceptions that won't be removed by the Khepri migration function but at least for now, re-enabling the plugin or a cluster restart sounds acceptable to me. |
The list of Mnesia tables to migrate is explicit and exhaustive; see the However, after the migration, Mnesia is stopped and its files are deleted in the case the node rejoins a Mnesia-based cluster. We would need to figure out a way to reset just enough of Mnesia to not interfere with other users of Mnesia. |
Proposed Changes
Minimal changes for a plugin version that can run with RabbitMQ 4.0 (with Mnesia metadata store)
Related to #290
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
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.