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

Bump Khepri to 0.17.1 #12753

Merged
merged 9 commits into from
Apr 9, 2025
Merged

Bump Khepri to 0.17.1 #12753

merged 9 commits into from
Apr 9, 2025

Conversation

the-mikedavis
Copy link
Contributor

@the-mikedavis the-mikedavis commented Nov 18, 2024

Update Khepri from 0.16.0 to 0.17.1 and khepri_mnesia_migration from 0.7.2 to 0.8.0.

Khepri release notes:

khepri_mnesia_migration release notes:
https://github.com/rabbitmq/khepri_mnesia_migration/releases/tag/v0.8.0

This pull request handles the breaking changes in Khepri 0.17.0.

It also uses a snapshot of an unreleased version of RabbitMQ 4.0.x to benefit from the improvement in khepri_mnesia_migration 0.7.2. This is only to reduce the chance of flaky tests in CI, it is not required to upgrade from 4.0.x to 4.2.0+.

@the-mikedavis the-mikedavis self-assigned this Nov 18, 2024
@the-mikedavis the-mikedavis force-pushed the md/khepri-0-17 branch 3 times, most recently from 6d289fe to cc6185d Compare November 25, 2024 16:28
@the-mikedavis the-mikedavis force-pushed the md/khepri-0-17 branch 6 times, most recently from 5cb0a79 to 42f571a Compare December 6, 2024 20:49
@dumbbell
Copy link
Contributor

Thank you for updating the branch!

I’m working on updating Ra in Khepri but there are small changes of behaviors that cause test flakes. I fixed one of them (Ra can reture {error, normal} after a Ra server exited), but not the second one yet (that new error causes a retry loop to retry until timeout).

@dumbbell
Copy link
Contributor

I fixed the bug in khepri_cluster.erl and merged the bump of Ra to 2.16.0.

Do you think we can update Khepri in RabbitMQ now? Perhaps we should focus on that and release Khepri 0.17.0 this week.

@the-mikedavis the-mikedavis force-pushed the md/khepri-0-17 branch 2 times, most recently from 1b8eec3 to f2f37d7 Compare January 29, 2025 15:42
@acogoluegnes
Copy link
Contributor

The upgrade to RA 2.16 in the broker seems to cause a flake (#13172) when the stream plugin uses a consistent read to check if some nodes are in maintenance node. Feel free to ping me when you think this PR is ready, I can run the stream plugin test suite against it to make sure the flake is gone.

@dumbbell
Copy link
Contributor

dumbbell commented Feb 7, 2025

I submitted #13217 to remove force_reset with Khepri. It will "fix" some test failures :-) The Khepri 0.17.0 update depends on it.

@dumbbell dumbbell force-pushed the md/khepri-0-17 branch 3 times, most recently from 7d4a03f to f3e2c31 Compare March 19, 2025 19:11
@dumbbell dumbbell force-pushed the md/khepri-0-17 branch 5 times, most recently from bea243e to 24eccc7 Compare April 2, 2025 10:43
@dumbbell dumbbell removed the bazel label Apr 2, 2025
@dumbbell dumbbell force-pushed the md/khepri-0-17 branch 6 times, most recently from cdf5bec to 6e6863a Compare April 8, 2025 13:38
the-mikedavis and others added 9 commits April 8, 2025 18:47
[Why]
In Khepri 0.17.0, `khepri_cluster:locally_known_members/1` and
`khepri_cluster:locally_known_node/1` were replaced with
`khepri_cluster:members/2` and `khepri_cluster:nodes/2` with `favor` set
to `low_latency` - this matches the interface for queries in Khepri.
[Why]
All callers of `khepri_adv` and `khepri_tx_adv` need updates to handle
the now uniform return type of `khepri:node_props_map()` in Khepri
0.17.0.

[How]
We don't need any compatibility code to handle "either the old return
type or the new return type" from the khepri_adv API because the
translation is done entirely in the "client side" code in Khepri -
meaning that the return value from the Ra server is the same but it is
translated differently by the functions in `khepri_adv`.

However, we need to adapt transaction functions because they may be
executed on different versions of Khepri and the behaviour of
`khepri_tx_adv` can be different. To take the possible change of return
value format, we use the new `khepri_tx:does_api_comply_with/1` to know
what to expect.
…i_db` enable function

[Why]
The feature flag enable function is called during the initial migration
or when a node is later added to a cluster.

In this latter situation, the cluster is already formed and the Mnesia
tables were already migrated. Syncing the cluster in this specific
situation might kick another node that is currently unreachable.

[How]
If the node running the enable function is already clustered, we skip
the cluster sync.
…rella

[Why]
This makes sure that nodes are clustered the same way, whether the tests
are executed with or without a secondary umbrella.
This is to make sure the old node uses the latest
khepri_mnesia_migration patch release.
@dumbbell dumbbell marked this pull request as ready for review April 9, 2025 08:06
@dumbbell dumbbell merged commit dc5a703 into main Apr 9, 2025
273 checks passed
@dumbbell dumbbell deleted the md/khepri-0-17 branch April 9, 2025 08:26
@dumbbell dumbbell changed the title Bump Khepri to 0.17.0 Bump Khepri to 0.17.1 Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants