Skip to content

Conversation

@dumbbell
Copy link
Collaborator

@dumbbell dumbbell commented Jan 13, 2023

The new rabbit_db_cluster module sits on top of rabbit_mnesia and provide an API with all cluster-related functions.

rabbit_mnesia should be called directly inside Mnesia-specific code only, rabbit_mnesia_rename or classic mirrored queues for instance. Otherwise, rabbit_db_cluster must be used.

Several modules, in particular in rabbitmq_cli, continue to call rabbit_mnesia as a fallback option if the rabbit_db_cluster module unavailable. This will be the case when the CLI will interact with an older RabbitMQ version.

This is a follow-up to #6430. It depends on #7058. It is a preparation step to be able to change the database layer.

@dumbbell dumbbell added this to the 3.12.0 milestone Jan 13, 2023
@dumbbell dumbbell self-assigned this Jan 13, 2023
@dumbbell dumbbell force-pushed the move-clustering-functions-to-rabbit_db branch 2 times, most recently from ddf638d to 74ca25b Compare January 19, 2023 12:28
@dumbbell dumbbell force-pushed the move-clustering-functions-to-rabbit_db branch 6 times, most recently from f4e8504 to 6258637 Compare February 14, 2023 09:22
@dumbbell dumbbell modified the milestones: 3.12.0, 3.13.0 Feb 14, 2023
@dumbbell dumbbell force-pushed the move-clustering-functions-to-rabbit_db branch 3 times, most recently from 0ea635e to 21cff15 Compare February 21, 2023 16:05
@dumbbell dumbbell marked this pull request as ready for review February 21, 2023 16:18
@dumbbell dumbbell force-pushed the move-clustering-functions-to-rabbit_db branch from 21cff15 to f30b43c Compare February 21, 2023 16:37
@dumbbell dumbbell force-pushed the move-clustering-functions-to-rabbit_db branch from f30b43c to fab106b Compare February 21, 2023 17:50
the-mikedavis
the-mikedavis previously approved these changes Feb 21, 2023
dcorbacho
dcorbacho previously approved these changes Feb 22, 2023
…sia`

These functions extend the functionality of `erlang:is_process_alive/1`
to take into account the node a process is running on and its cluster
membership.

These functions are moved away from `rabbit_mnesia` because we don't
want `rabbit_mnesia` to be a central piece of RabbitMQ.

Classic-mirrored-queue-related modules continue to use `rabbit_mnesia`
functions, therefore relying on Mnesia, because they depend entirely on
Mnesia anyway. They will go away at the same time as our use of Mnesia.
So by keeping this code untouched, we avoid possible regressions.
This new module sits on top of `rabbit_mnesia` and provide an API with
all cluster-related functions.

`rabbit_mnesia` should be called directly inside Mnesia-specific code
only, `rabbit_mnesia_rename` or classic mirrored queues for instance.
Otherwise, `rabbit_db_cluster` must be used.

Several modules, in particular in `rabbitmq_cli`, continue to call
`rabbit_mnesia` as a fallback option if the `rabbit_db_cluster` module
unavailable. This will be the case when the CLI will interact with an
older RabbitMQ version.

This will help with the introduction of a new database backend.
... instead of using an internal implementation.

The plugins are `rabbitmq_peer_discovery_common` and
`rabbitmq_sharding`.

References #7058.
@dumbbell dumbbell dismissed stale reviews from dcorbacho and the-mikedavis via cd2b4c7 February 22, 2023 14:28
@dumbbell dumbbell force-pushed the move-clustering-functions-to-rabbit_db branch from fab106b to cd2b4c7 Compare February 22, 2023 14:28
@dumbbell dumbbell merged commit 9918b03 into main Feb 22, 2023
@dumbbell dumbbell deleted the move-clustering-functions-to-rabbit_db branch February 22, 2023 15:46
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.

4 participants