Skip to content
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

rabbit_db: force_reset command is unsupported with Khepri #13217

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

dumbbell
Copy link
Member

@dumbbell dumbbell commented Feb 7, 2025

Why

The force_reset command simply removes local files on disk for the local node.

In the case of Ra, this can't work because the rest of the cluster does not know about the forced-reset node. Therefore the leader will continue to send append_entry commands to the reset node.

If that forced-reset node restarts and receives these messages, it will either join the cluster again (because it's on an older Raft term) or it will hit an assertion and exit (because it's on the same Raft term).

How

Given we can't really support this scenario and it has little value, the command will now return an error if someone attemps a force_reset with a node running Khepri.

This also deprecates the command: once Mnesia support is removed, the command will be removed at the same time. This is noted in the rabbitmqctl.8 manpage.

@dumbbell dumbbell added this to the 4.1.0 milestone Feb 7, 2025
@dumbbell dumbbell self-assigned this Feb 7, 2025
@dumbbell dumbbell mentioned this pull request Feb 7, 2025
@dumbbell dumbbell force-pushed the force_reset-command-unsupported-with-khepri branch from 4be4736 to f09dc93 Compare February 7, 2025 16:20
@dumbbell dumbbell marked this pull request as ready for review February 7, 2025 19:04
@dumbbell dumbbell force-pushed the force_reset-command-unsupported-with-khepri branch 2 times, most recently from eb54ce9 to 7cc69ae Compare February 10, 2025 10:57
[Why]
The `force_reset` command simply removes local files on disk for the
local node.

In the case of Ra, this can't work because the rest of the cluster does
not know about the forced-reset node. Therefore the leader will continue
to send `append_entry` commands to the reset node.

If that forced-reset node restarts and receives these messages, it will
either join the cluster again (because it's on an older Raft term) or it
will hit an assertion and exit (because it's on the same Raft term).

[How]
Given we can't really support this scenario and it has little value, the
command will now return an error if someone attemps a `force_reset` with
a node running Khepri.

This also deprecates the command: once Mnesia support is removed, the
command will be removed at the same time. This is noted in the
rabbitmqctl.8 manpage.
@dumbbell dumbbell force-pushed the force_reset-command-unsupported-with-khepri branch from 7cc69ae to c78aec7 Compare February 10, 2025 14:10
@dumbbell dumbbell merged commit 839a485 into main Feb 10, 2025
270 checks passed
@dumbbell dumbbell deleted the force_reset-command-unsupported-with-khepri branch February 10, 2025 18:55
@dumbbell dumbbell removed this from the 4.1.0 milestone Feb 11, 2025
michaelklishin pushed a commit that referenced this pull request Feb 12, 2025
…ed-with-khepri

rabbit_db: `force_reset` command is unsupported with Khepri

(cherry picked from commit 839a485)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant