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

Rename serialized MetadataServerKind::Raft variant to replicated and MetadataStoreClientOptions into MetadataClientOptions #2632

Merged

Conversation

tillrohrmann
Copy link
Contributor

Rename serialized MetadataServerKind::Raft variant to replicated

With this commit, the default way to configure the Raft based metadata server
is to configure metadata-server.type = "replicated".

Rename MetadataStoreClientOptions into MetadataClientOptions

This commit also moves some of the metadata client specific options back
under the [metadata-client] key. It tries to achieve backwards compatibility
with the previous configuration names. The metadata client used with the local
and the replicated metadata server is now called "native" ("embedded" still works
as an alias).

Copy link
Contributor

@pcholakov pcholakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup @tillrohrmann! I like "native metadata store", sounds good!

crates/types/src/config/metadata_server.rs Outdated Show resolved Hide resolved
.parse()
.expect("valid metadata store address")],
},
connect_timeout: Duration::from_secs(3).into(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you have better observations about how this behaves in practice but is 3s perhaps much too high for a connect timeout?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to observe and to adjust if this does not work out. We recently reduced it from 5s to 3s.

@@ -603,40 +624,38 @@ pub enum MetadataStoreClient {
)]
// TODO(azmy): Remove this Shadow struct once we no longer support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's preventing us from cleaning this up now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we still need it for backward compatibility.

@@ -806,6 +802,21 @@ pub struct CommonOptionsShadow {
initialization_timeout: humantime::Duration,
disable_telemetry: bool,

metadata_client: MetadataClientOptions,
// todo drop in version 1.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we should have a convention for such things that we can easily grep for 😅 todo(release:1.3.0): ...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, or an attribute that would automatically generate a warning if it is still being used #[deprecated(1.2.0, 1.3.0)]. I'll leave this for a follow-up.

With this commit, the default way to configure the Raft based metadata server
is to configure metadata-server.type = "replicated".
This commit also moves some of the metadata client specific options back
under the [metadata-client] key. It tries to achieve backwards compatibility
with the previous configuration names. The metadata client used with the local
and the replicated metadata server is now called "native" ("embedded" still works
as an alias).
@tillrohrmann tillrohrmann force-pushed the rename-raft-metadata-server branch from d37e6de to 7df62da Compare February 6, 2025 08:13
@tillrohrmann tillrohrmann merged commit 7df62da into restatedev:main Feb 6, 2025
17 checks passed
@tillrohrmann tillrohrmann deleted the rename-raft-metadata-server branch February 6, 2025 08:18
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.

2 participants