fix(config): apply --service override before disk-usage validation#6594
Draft
hushy wants to merge 2 commits into
Draft
fix(config): apply --service override before disk-usage validation#6594hushy wants to merge 2 commits into
hushy wants to merge 2 commits into
Conversation
A searcher node started with `--service searcher` could log a misleading "data dir volume too small" warning at startup, comparing its volume against the indexer split-store and ingest queue disk budgets. A searcher does not use those budgets, so the warning was wrong and misleading. The cause was validation order: the CLI `--service` override was applied after `load_node_config()` had already run validation, so the disk-usage check ran against the default (all-services) set and counted indexer/ingest budgets. This threads the service override through `load_node_config_with_env` into `build_and_validate`, applying it where `enabled_services` is resolved, before validation. The override takes precedence over the config file and env vars, matching the previous post-load behavior. Co-Authored-By: Claude <noreply@anthropic.com>
756a09e to
f8fb91a
Compare
Member
|
I think a better approach would be to move these disk size checks in the init of each individual services:
The warning should also be improved to specify on which device the size estimation is based. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A searcher node started with
--service searchercould log a misleading "data dir volume too small" warning at startup, comparing its volume against the indexer split-store and ingest queue disk budgets. A searcher does not use those budgets, so the warning was wrong and misleading.The cause was validation order: the CLI
--serviceoverride was applied afterload_node_config()had already run validation, so the disk-usage check ran against the default all-in-one service set and counted indexer/ingest budgets.What changed
QW_ENABLED_SERVICESand the config file, matching the previous post-load behaviorIntegration-test follow-up
Applying overrides before validation exposed an invalid setup in the CLI integration-test helper. It passed
QuickwitService::supported_services(), which includes the standalonecompactor, while its config leftenable_standalone_compactorsdisabled. That only appeared to work previously because the override was applied after validation.The helper now uses the normal default all-in-one service set, which intentionally excludes the standalone compactor. A code comment documents why
supported_services()must not be used there.How was this PR tested?
cargo test -p quickwit-cli --test cli --features=metrics -- --test-threads=1(18 passed, 1 ignored)cargo +nightly fmt --all -- --checkgit diff --check