{"record":{"id":"daf744518dd9cfb4","repo":"quickwit-oss/quickwit","slug":"the-compactor-service-can-only-be-enabled-when","errorCode":null,"errorMessage":"the `compactor` service can only be enabled when `enable_standalone_compactors` is true (or `QW_ENABLE_STANDALONE_COMPACTORS=true`). With the default indexer-local merge pipeline, the compactor service must not be enabled.","messagePattern":"the `compactor` service can only be enabled when `enable_standalone_compactors` is true \\(or `QW_ENABLE_STANDALONE_COMPACTORS=true`\\)\\. With the default indexer-local merge pipeline, the compactor service must not be enabled\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-config/src/node_config/serialize.rs","lineNumber":414,"sourceCode":"        Ok(node_config)\n    }\n}\n\nfn validate(node_config: &NodeConfig) -> anyhow::Result<()> {\n    validate_identifier(\"cluster\", &node_config.cluster_id)?;\n    validate_node_id(&node_config.node_id)?;\n\n    if node_config.cluster_id == DEFAULT_CLUSTER_ID {\n        warn!(\"cluster ID is not set, falling back to default value `{DEFAULT_CLUSTER_ID}`\",);\n    }\n    if node_config.peer_seeds.is_empty() {\n        warn!(\"peer seeds are empty\");\n    }\n    validate_metastore_read_replica(node_config)?;\n    if node_config.is_service_enabled(QuickwitService::Compactor)\n        && !node_config.enable_standalone_compactors\n    {\n        bail!(\n            \"the `compactor` service can only be enabled when `enable_standalone_compactors` is \\\n             true (or `QW_ENABLE_STANDALONE_COMPACTORS=true`). With the default indexer-local \\\n             merge pipeline, the compactor service must not be enabled.\"\n        );\n    }\n    validate_disk_usage(node_config);\n    Ok(())\n}\n\n/// Validates the configuration of the [`QuickwitService::MetastoreReadReplica`] role and searcher\n/// read-replica routing.\n///\n/// The [`QuickwitService::MetastoreReadReplica`] role serves the same gRPC service as a read-only\n/// metastore, so it must run standalone and requires `metastore_read_replica_uri` to connect to.\nfn validate_metastore_read_replica(node_config: &NodeConfig) -> anyhow::Result<()> {\n    let read_replica_enabled =\n        node_config.is_service_enabled(QuickwitService::MetastoreReadReplica);\n    if read_replica_enabled {","sourceCodeStart":396,"sourceCodeEnd":432,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-config/src/node_config/serialize.rs#L396-L432","documentation":"Quickwit's node configuration validation rejects enabling the `compactor` service unless standalone compactors are explicitly enabled via `enable_standalone_compactors` (config) or `QW_ENABLE_STANDALONE_COMPACTORS=true` (env). By default, merge/compaction runs locally inside each indexer's pipeline, so listing a separate compactor service is a misconfiguration. The check runs in `validate()` during `build_and_validate`, so node startup fails fast.","triggerScenarios":"Starting a Quickwit node with `service: [compactor, ...]` in node config (or `QW_SERVICE=compactor`) while `enable_standalone_compactors` is false/unset.","commonSituations":"Operators copying a standalone-compactor deployment example without setting the flag; leftover `compactor` entries in configs from older versions; setting the QW_SERVICE env var to include compactor in docker-compose.","solutions":["Set `enable_standalone_compactors: true` in the node config (or env `QW_ENABLE_STANDALONE_COMPACTORS=true`) if you intend to run dedicated compactor nodes.","Remove `compactor` from the `service` list so compaction runs inside the indexers (default behavior).","Check environment overrides (`QW_SERVICE`, `QW_ENABLE_STANDALONE_COMPACTORS`) align with the YAML config."],"exampleFix":"# before\nservice: [searcher, compactor]\n\n# after (option A: standalone compactors)\nservice: [compactor]\nenable_standalone_compactors: true\n\n# after (option B: indexer-local compaction)\nservice: [searcher, indexer]","handlingStrategy":"validation","validationCode":"// before starting the node\nif services.contains(&QuickwitService::Compactor)\n    && !node_config.enable_standalone_compactors\n{\n    return Err(anyhow!(\n        \"compactor service requires enable_standalone_compactors=true \\\n         (or QW_ENABLE_STANDALONE_COMPACTORS=true)\"\n    ));\n}","typeGuard":null,"tryCatchPattern":"match NodeConfig::load_and_validate(&uri, &instance_name) {\n    Ok(cfg) => start_node(cfg),\n    Err(e) if e.to_string().contains(\"enable_standalone_compactors\") => {\n        eprintln!(\"fix node config: {}\", e);\n        std::process::exit(2);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Keep `compactor` out of the `service` list unless you deliberately run a standalone-compactor deployment.","Set QW_ENABLE_STANDALONE_COMPACTORS explicitly in deployment manifests when using compactor nodes.","Validate node config (build_and_validate / quickwit config check) before deploy."],"tags":["rust","config","quickwit"],"backgroundTag":"conflicting-config-options","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}