influxdata/influxdb · error · QueryExecutorError

invokded a method that is not implemented

Error message

invokded a method that is not implemented: {0}

What it means

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.

Solutions

  1. Read the &'static str in the message to identify which method is unimplemented
  2. Switch to an executor implementation that supports the method, or use the supported HTTP/query API route
  3. Implement the missing method if you maintain the executor impl
  4. Check influxdb3 issue tracker/version notes for the missing feature and upgrade

Example fix

// before
let executor = UnimplementedExecutor; // returns MethodNotImplemented("write")
executor.write_lines(lines).await?;
// after
let executor: Arc<dyn QueryExecutor> = Arc::new(RealQueryExecutor::new(...));
executor.write_lines(lines).await?;
Defensive patterns

Strategy: type-guard

Type guard

fn is_unimplemented(e: &QueryExecutorError) -> Option<&'static str> {
    if let QueryExecutorError::MethodNotImplemented(m) = e { Some(m) } else { None }
}

Try / catch

match executor.some_method(args).await {
    Err(QueryExecutorError::MethodNotImplemented(m)) => {
        log::warn!("method {m} unsupported by this executor; using fallback");
        fallback_path(args).await
    }
    other => other,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/0129a698173018a6. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_internal_api/src/query_executor.rs:35

use std::sync::Arc;
use trace::ctx::SpanContext;
use trace::span::{Span, SpanExt};
use trace_http::ctx::RequestLogContext;
use tracker::InstrumentedAsyncOwnedSemaphorePermit;

#[derive(Debug, thiserror::Error)]
pub enum QueryExecutorError {
    #[error("database not found: {db_name}")]
    DatabaseNotFound { db_name: String },
    #[error("error while planning query: {0}")]
    QueryPlanning(#[source] DataFusionError),
    #[error("error while executing plan: {0}")]
    ExecuteStream(#[source] DataFusionError),
    #[error("unable to compose record batches from databases: {0}")]
    DatabasesToRecordBatch(#[source] ArrowError),
    #[error("unable to compose record batches from retention policies: {0}")]
    RetentionPoliciesToRecordBatch(#[source] ArrowError),
    #[error("invokded a method that is not implemented: {0}")]
    MethodNotImplemented(&'static str),
    #[error(transparent)]
    Anyhow(#[from] anyhow::Error),
}

#[async_trait]
pub trait QueryExecutor: QueryDatabase + Debug + Send + Sync + 'static {
    async fn get_db_namespace(
        &self,
        database_name: &str,
        span_ctx: &Option<SpanContext>,
    ) -> Result<Arc<dyn QueryNamespace>, QueryExecutorError> {
        self.namespace(
            database_name,
            span_ctx.child_span("get_db_namespace"),
            false,
        )
        .await

View on GitHub (pinned to 06200ef96b)