{"record":{"id":"a97b7f3c206a2070","repo":"influxdata/influxdb","slug":"queries-not-supported-in-compactor-only-mode","errorCode":null,"errorMessage":"queries not supported in compactor only mode","messagePattern":"queries not supported in compactor only mode","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/lib.rs","lineNumber":57,"sourceCode":"use iox_time::Time;\nuse observability_deps::tracing::debug;\nuse schema::TIME_COLUMN_NAME;\nuse serde::{Deserialize, Serialize};\nuse std::{fmt::Debug, sync::Arc};\nuse thiserror::Error;\n\n#[derive(Debug, Error)]\npub enum Error {\n    #[error(\"object store path error: {0}\")]\n    ObjStorePath(#[from] object_store::path::Error),\n\n    #[error(\"write buffer error: {0}\")]\n    WriteBuffer(#[from] write_buffer::Error),\n\n    #[error(\"persister error: {0}\")]\n    Persister(#[from] persister::PersisterError),\n\n    #[error(\"queries not supported in compactor only mode\")]\n    CompactorOnly,\n\n    #[error(\"unexpected: {0:?}\")]\n    Anyhow(#[from] anyhow::Error),\n}\n\npub type Result<T, E = Error> = std::result::Result<T, E>;\n\npub trait WriteBuffer: Bufferer + ChunkContainer + DistinctCacheManager + LastCacheManager {}\n\n/// The buffer is for buffering data in memory and in the wal before it is persisted as parquet files in storage.\n#[async_trait]\npub trait Bufferer: Debug + Send + Sync + 'static {\n    /// Validates the line protocol, writes it into the WAL if configured, writes it into the in memory buffer\n    /// and returns the result with any lines that had errors and summary statistics.\n    async fn write_lp(\n        &self,\n        database: DatabaseName,","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/lib.rs#L39-L75","documentation":"The CompactorOnly variant is a fieldless error indicating queries were attempted against a server/component configured to run in compactor-only mode. In that mode the write buffer/query machinery is not initialized, so the query path is intentionally unsupported. It is a configuration-mismatch signal, not a data or I/O failure.","triggerScenarios":"Executing a query through a handle created for a compactor-only deployment (e.g. server started with a compactor-only flag/role) where the query interface is rejected unconditionally.","commonSituations":"Pointing a client/SDK at a compactor-only node instead of a full server or querier node; misconfiguring deployment roles in a split topology; running one binary with the wrong mode flag.","solutions":["Send queries to a node running in full or querier mode, not the compactor-only node","Change the node's configuration to enable query support if it should serve queries","Fix client connection strings/DNS so read traffic reaches query-capable instances","Check startup flags/config for the compactor-only setting and remove it if unintended"],"exampleFix":"// before\ninfluxdb3 serve --compactor-only  # then querying this node\n// after\ninfluxdb3 serve  # full mode (or target a querier node for queries)","handlingStrategy":"validation","validationCode":"// before sending queries, verify the node supports them\nif node_mode == NodeMode::CompactorOnly {\n    return Err(\"this node does not serve queries; use a querier/full node\");\n}","typeGuard":"fn supports_queries(mode: NodeMode) -> bool {\n    !matches!(mode, NodeMode::CompactorOnly)\n}","tryCatchPattern":"match client.query(sql).await {\n    Err(e) if e.to_string().contains(\"compactor only mode\") => {\n        // fail over to a query-capable endpoint\n        query_via_querier(sql).await\n    }\n    r => r,\n}","preventionTips":["Route read traffic only to full/querier nodes via service discovery or load balancer config","Double-check deployment role flags when provisioning split topologies","Add health/readiness probes that reflect query capability","Document node roles so operators don't point clients at compactors"],"tags":["rust","configuration","query"],"backgroundTag":"unsupported-operation","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}