Repository navigation
Shard scaling v2 feature flag #6890
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -216,6 +216,8 @@ struct NodeConfigBuilder { | |
| default_index_root_uri: ConfigValue<Uri, QW_DEFAULT_INDEX_ROOT_URI>, | ||
| #[serde(default)] | ||
| enable_standalone_compactors: ConfigValue<bool, QW_ENABLE_STANDALONE_COMPACTORS>, | ||
| #[serde(default)] | ||
| enable_shard_scaling_v2: ConfigValue<bool, QW_ENABLE_SHARD_SCALING_V2>, | ||
|
Comment on lines
+219
to
+220
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Document the new AGENTS.md reference: AGENTS.md:L23-L24 Useful? React with 👍 / 👎. |
||
| #[serde(rename = "rest")] | ||
| #[serde(default)] | ||
| rest_config_builder: RestConfigBuilder, | ||
|
|
@@ -274,6 +276,7 @@ impl NodeConfigBuilder { | |
| }); | ||
|
|
||
| let enable_standalone_compactors = self.enable_standalone_compactors.resolve(env_vars)?; | ||
| let enable_shard_scaling_v2 = self.enable_shard_scaling_v2.resolve(env_vars)?; | ||
| let docs_clustering_config = | ||
| DocsClusteringConfigBuilder::build_optional(self.docs_clustering_config, env_vars)?; | ||
|
|
||
|
|
@@ -406,6 +409,7 @@ impl NodeConfigBuilder { | |
| jaeger_config: self.jaeger_config, | ||
| compactor_config: self.compactor_config, | ||
| enable_standalone_compactors, | ||
| enable_shard_scaling_v2, | ||
| docs_clustering_config, | ||
| }; | ||
|
|
||
|
|
@@ -545,6 +549,7 @@ impl Default for NodeConfigBuilder { | |
| metastore_read_replica_uri: default_metastore_read_replica_uri(), | ||
| default_index_root_uri: ConfigValue::none(), | ||
| enable_standalone_compactors: Default::default(), | ||
| enable_shard_scaling_v2: Default::default(), | ||
| rest_config_builder: RestConfigBuilder::default(), | ||
| health_config_builder: HealthConfigBuilder::default(), | ||
| grpc_config: GrpcConfig::default(), | ||
|
|
@@ -708,6 +713,7 @@ pub fn node_config_for_tests_from_ports( | |
| jaeger_config: JaegerConfig::default(), | ||
| compactor_config: CompactorConfig::default(), | ||
| enable_standalone_compactors: false, | ||
| enable_shard_scaling_v2: false, | ||
| docs_clustering_config: None, | ||
| } | ||
| } | ||
|
|
@@ -1115,6 +1121,7 @@ mod tests { | |
| "QW_ENABLE_STANDALONE_COMPACTORS".to_string(), | ||
| "true".to_string(), | ||
| ); | ||
| env_vars.insert("QW_ENABLE_SHARD_SCALING_V2".to_string(), "true".to_string()); | ||
| env_vars.insert( | ||
| "QW_METASTORE_URI".to_string(), | ||
| "postgresql://test-user:test-password@test-host:4321/test-db".to_string(), | ||
|
|
@@ -1187,6 +1194,7 @@ mod tests { | |
| "postgresql://test-user:test-password@test-host:4321/test-db" | ||
| ); | ||
| assert_eq!(config.default_index_root_uri, "s3://quickwit-indexes/prod"); | ||
| assert!(config.enable_shard_scaling_v2); | ||
| } | ||
|
|
||
| #[tokio::test] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document that this helper returns
falsewhen no live node provides the requested service. That non-vacuous behavior differs from the usual semantics implied byall_*_satisfy, and callers using it as a rollout gate can otherwise wait indefinitely when the role is intentionally absent; the unit test records the behavior but does not expose this hidden API contract to callers.AGENTS.md reference: AGENTS.md:L123-L126
Useful? React with 👍 / 👎.