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_feature_flags: Use cluster members hint for cluster sync (backport #8477) (backport #8479) #8487

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jun 6, 2023

This is an automatic backport of pull request #8479 done by Mergify.
Cherry-pick of a4bde35 has failed:

On branch mergify/bp/v3.11.x/pr-8479
Your branch is up to date with 'origin/v3.11.x'.

You are currently cherry-picking commit a4bde35908.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   deps/rabbit/src/rabbit_ff_controller.erl

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   deps/rabbit/src/rabbit_feature_flags.erl
	both modified:   deps/rabbit/test/feature_flags_v2_SUITE.erl

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

@mergify mergify bot added the conflicts label Jun 6, 2023
@dumbbell dumbbell force-pushed the mergify/bp/v3.11.x/pr-8479 branch from 6c637a3 to 364ac52 Compare June 6, 2023 09:21
[Why]
During peer discovery, when the feature flags state is synchronized on a
starting node that joins a cluster thanks to peer discovery, the list of
nodes returned by `rabbit_nodes:list_running()` is incorrect because
Mnesia is not initiliazed yet.

Because of that, the synchronization works on the wrong inventory of
feature flags. In the end, the states of feature flags is incorrect
across the cluster.

[How]
`rabbit_mnesia` passes a list of nodes to
`rabbit_feature_flags:sync_feature_flags_with_cluster/2`. We can use
this list, as we did in feature flags V1. This makes sure that the
synchronization works with a valid list of cluster members, in case the
cluster state is not ready yet.

V2: Filter the given list of nodes to only keep those where `rabbit` is
    running. This avoids trying to collect inventory from nodes which
    are stopped.

(cherry picked from commit 7c53958)
(cherry picked from commit a4bde35)
@dumbbell dumbbell force-pushed the mergify/bp/v3.11.x/pr-8479 branch from 364ac52 to fd9dec5 Compare June 6, 2023 10:40
@dumbbell dumbbell removed the conflicts label Jun 6, 2023
@dumbbell dumbbell added this to the 3.11.19 milestone Jun 6, 2023
@dumbbell dumbbell merged commit 2023a3c into v3.11.x Jun 6, 2023
@dumbbell dumbbell deleted the mergify/bp/v3.11.x/pr-8479 branch June 6, 2023 11:15
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.

1 participant