{"record":{"id":"0129a698173018a6","repo":"influxdata/influxdb","slug":"invokded-a-method-that-is-not-implemented-0","errorCode":null,"errorMessage":"invokded a method that is not implemented: {0}","messagePattern":"invokded a method that is not implemented: (.+?)","errorType":"exception","errorClass":"QueryExecutorError","httpStatus":null,"severity":"error","filePath":"influxdb3_internal_api/src/query_executor.rs","lineNumber":35,"sourceCode":"use std::sync::Arc;\nuse trace::ctx::SpanContext;\nuse trace::span::{Span, SpanExt};\nuse trace_http::ctx::RequestLogContext;\nuse tracker::InstrumentedAsyncOwnedSemaphorePermit;\n\n#[derive(Debug, thiserror::Error)]\npub enum QueryExecutorError {\n    #[error(\"database not found: {db_name}\")]\n    DatabaseNotFound { db_name: String },\n    #[error(\"error while planning query: {0}\")]\n    QueryPlanning(#[source] DataFusionError),\n    #[error(\"error while executing plan: {0}\")]\n    ExecuteStream(#[source] DataFusionError),\n    #[error(\"unable to compose record batches from databases: {0}\")]\n    DatabasesToRecordBatch(#[source] ArrowError),\n    #[error(\"unable to compose record batches from retention policies: {0}\")]\n    RetentionPoliciesToRecordBatch(#[source] ArrowError),\n    #[error(\"invokded a method that is not implemented: {0}\")]\n    MethodNotImplemented(&'static str),\n    #[error(transparent)]\n    Anyhow(#[from] anyhow::Error),\n}\n\n#[async_trait]\npub trait QueryExecutor: QueryDatabase + Debug + Send + Sync + 'static {\n    async fn get_db_namespace(\n        &self,\n        database_name: &str,\n        span_ctx: &Option<SpanContext>,\n    ) -> Result<Arc<dyn QueryNamespace>, QueryExecutorError> {\n        self.namespace(\n            database_name,\n            span_ctx.child_span(\"get_db_namespace\"),\n            false,\n        )\n        .await","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_internal_api/src/query_executor.rs#L17-L53","documentation":"QueryExecutorError::MethodNotImplemented is thrown when code invokes a QueryExecutor trait method whose implementation is a stub that unconditionally returns this error. Note the typo 'invokded' exists in the message. It signals the requested executor capability is not supported by this executor implementation.","triggerScenarios":"Calling a QueryExecutor trait method (e.g. a write path, metadata method, or alternate execute variant) on an executor implementation that has not implemented it, typically via the &'static str passed at the call site.","commonSituations":"Using the internal API executor with an InfluxQL/legacy path that the executor does not implement; code paths reachable after a refactor where a trait impl was replaced with todo-style stubs; feature-gated functionality compiled without its implementation.","solutions":["Read the &'static str in the message to identify which method is unimplemented","Switch to an executor implementation that supports the method, or use the supported HTTP/query API route","Implement the missing method if you maintain the executor impl","Check influxdb3 issue tracker/version notes for the missing feature and upgrade"],"exampleFix":"// before\nlet executor = UnimplementedExecutor; // returns MethodNotImplemented(\"write\")\nexecutor.write_lines(lines).await?;\n// after\nlet executor: Arc<dyn QueryExecutor> = Arc::new(RealQueryExecutor::new(...));\nexecutor.write_lines(lines).await?;","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"fn is_unimplemented(e: &QueryExecutorError) -> Option<&'static str> {\n    if let QueryExecutorError::MethodNotImplemented(m) = e { Some(m) } else { None }\n}","tryCatchPattern":"match executor.some_method(args).await {\n    Err(QueryExecutorError::MethodNotImplemented(m)) => {\n        log::warn!(\"method {m} unsupported by this executor; using fallback\");\n        fallback_path(args).await\n    }\n    other => other,\n}","preventionTips":["Check which QueryExecutor methods your implementation actually implements before calling","Prefer executor impls with full trait coverage for your query paths","Avoid legacy/InfluxQL paths on executors that do not support them","Keep trait stubs marked clearly in code review"],"tags":["rust","trait","not-implemented","query-executor"],"backgroundTag":"method-not-implemented","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"}