risingwavelabs/risingwave · error · ConnectorError

seek_to_latest is not supported for this connector

Error message

seek_to_latest is not supported for this connector

What it means

The connector's SplitEnumerator uses the default SourceEnumerator trait implementation of seek_to_latest, which is a stub that always errors. seek_to_latest is only implemented by connectors capable of discovering their latest offsets (e.g. Kafka); others (file, S3, etc.) never support it. It is used when starting a shareable/backfill source from the latest offset.

Solutions

  1. Use a connector that implements seek_to_latest (e.g. Kafka) for shared/backfill sources
  2. Disable the backfill/shared-source option so the engine does not call seek_to_latest
  3. Implement seek_to_latest for the custom connector's SplitEnumerator

Example fix

// before (custom connector)
// (no seek_to_latest override -> default error)
// after
async fn seek_to_latest(&mut self) -> Result<Vec<SplitImpl>> {
    Ok(vec![SplitImpl::MySplit(MySplit::new_latest())])
}
Defensive patterns

Strategy: try-catch

Validate before calling

let supported = matches!(connector, "kafka" | "pulsar");
if !supported { /* avoid enabling backfill/seek_to_latest path */ }

Try / catch

match enumerator.seek_to_latest().await {
    Err(e) if e.to_string().contains("seek_to_latest is not supported") => {
        // fall back to non-shareable source creation
    }
    other => other?,
}

Prevention

When it happens

Trigger: Calling seek_to_latest on a SplitEnumerator of a connector that did not override the default method; enabling source backfill / shared-source mode on a connector without latest-offset support.

Common situations: Creating a shared source (SOURCE_BACKFILL enabled) on a connector like S3/datagen/file where latest offsets cannot be queried; version where a connector lacks the trait override.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/02b410656a0660fb. Report an issue: GitHub.

Appendix: source

Thrown at src/connector/src/source/base.rs:621

        parser_config: ParserConfig,
        source_ctx: SourceContextRef,
        columns: Option<Vec<Column>>,
    ) -> crate::error::ConnectorResult<Self>;

    fn into_stream(self) -> BoxSourceChunkStream;

    fn into_event_stream(self) -> BoxSourceReaderEventStream {
        self.into_stream()
            .map_ok(SourceReaderEvent::DataChunk)
            .boxed()
    }

    fn backfill_info(&self) -> HashMap<SplitId, BackfillInfo> {
        HashMap::new()
    }

    async fn seek_to_latest(&mut self) -> Result<Vec<SplitImpl>> {
        Err(anyhow!("seek_to_latest is not supported for this connector").into())
    }
}

/// Information used to determine whether we should start and finish source backfill.
///
/// XXX: if a connector cannot provide the latest offsets (but we want to make it shareable),
/// perhaps we should ban blocking DDL for it.
#[derive(Debug, Clone)]
pub enum BackfillInfo {
    HasDataToBackfill {
        /// The last available offsets for each split (**inclusive**).
        ///
        /// This will be used to determine whether source backfill is finished when
        /// there are no _new_ messages coming from upstream `SourceExecutor`. Otherwise,
        /// blocking DDL cannot finish until new messages come.
        ///
        /// When there are upstream messages, we will use the latest offsets from the upstream.
        latest_offset: String,

View on GitHub (pinned to 6469eb736d)