risingwavelabs/risingwave · error · SinkError::Config

RisingWave is not compiled with feature `sink-{}`

Error message

RisingWave is not compiled with feature `sink-{}`

What it means

RisingWave gates each sink connector behind a compile-time cargo feature (e.g. sink-turbopuffer, sink-kafka). When a sink type is requested but its feature was not enabled in the build, err_feature_not_enabled returns this config error instead of a working sink. It is raised during sink creation/validation (try_from, enforce_secret/enforce_one, log sinker construction) and is purely a build-configuration issue, not a runtime or SQL issue.

Source

Thrown at src/connector/src/sink/utils.rs:51

pub(crate) mod dummy {

    use std::collections::BTreeMap;
    use std::fmt::{Debug, Formatter};
    use std::marker::PhantomData;

    use anyhow::anyhow;
    use phf::{Set, phf_set};
    use tokio::sync::mpsc::UnboundedSender;

    use crate::connector_common::IcebergSinkCompactionUpdate;
    use crate::enforce_secret::EnforceSecret;
    use crate::error::ConnectorResult;
    use crate::sink::prelude::*;
    use crate::sink::{LogSinker, SinkCommitCoordinator, SinkLogReader};

    #[allow(dead_code)]
    pub fn err_feature_not_enabled(sink_name: &'static str) -> SinkError {
        SinkError::Config(anyhow!(
            "RisingWave is not compiled with feature `sink-{}`",
            sink_name
        ))
    }

    /// Implement this trait will bring a dummy `impl Sink` for the type which always returns an error.
    pub trait FeatureNotEnabledSinkMarker: Send + 'static {
        #[allow(dead_code)]
        const SINK_NAME: &'static str;
    }

    /// A dummy coordinator that always returns an error.
    #[allow(dead_code)]
    pub struct FeatureNotEnabledLogSinker<S: FeatureNotEnabledSinkMarker>(PhantomData<S>);
    #[async_trait::async_trait]
    impl<S: FeatureNotEnabledSinkMarker> LogSinker for FeatureNotEnabledLogSinker<S> {
        async fn consume_log_and_sink(self, _log_reader: impl SinkLogReader) -> Result<!> {
            Err(err_feature_not_enabled(S::SINK_NAME))

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Rebuild with the feature enabled, e.g. `cargo build --features sink-kafka` (or use `./risedev build` with the default feature set).
  2. Use the official all-in-one `risingwave` binary/docker image, which enables all sink features.
  3. Verify the feature list with `cargo metadata` or the build log to confirm the sink feature was compiled in.

Example fix

// before
cargo build -p risingwave --no-default-features --features rw-static-link
// after
cargo build -p risingwave --no-default-features --features rw-static-link,sink-turbopuffer
Defensive patterns

Strategy: validation

Validate before calling

// verify the binary supports the connector before issuing CREATE SINK:
// risingwave says available connectors can be checked in docs; for custom builds check features:
// cargo tree -p risingwave --features sink-kafka >/dev/null && echo enabled

Try / catch

match create_sink_result {
    Err(e) if e.to_string().contains("not compiled with feature") => {
        println!("connector unavailable in this build; use an all-features binary or rebuild");
    }
    other => other?,
}

Prevention

When it happens

Trigger: Running a risingwave binary (often a minimal/custom `risingwave` or `risectl` build) compiled without the needed `sink-*` feature, then executing CREATE SINK with connector='kafka'/'turbopuffer'/etc., or configuring a sink in a deployment image built with reduced features.

Common situations: Using a slim release binary that strips optional connectors; building with `cargo build --no-default-features` or a custom feature set; deploying an image where the feature flag was omitted.

Related errors


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