risingwavelabs/risingwave · error · ConnectorError

(dynamic serde_json deserialization error for AdbcSnowflakeS

Error message

(dynamic serde_json deserialization error for AdbcSnowflakeSplit restore)

What it means

AdbcSnowflakeSplit::restore_from_json deserializes a previously encoded split's JsonbVal back into the AdbcSnowflakeSplit struct during state recovery (e.g. after a failover or source restart). If the stored JSON does not match the struct's serde expectations (missing/renamed fields, wrong types, corrupted state), serde_json fails and the underlying error is wrapped into a ConnectorResult. The message shown is the generic context; the real cause is in the chained serde error.

Source

Thrown at src/connector/src/source/adbc_snowflake/mod.rs:335

}

/// Split for ADBC Snowflake source.
/// Since Snowflake queries are executed as a whole, we use a single split with the query as the identifier.
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Hash)]
pub struct AdbcSnowflakeSplit {
    /// The split identifier (typically based on the query).
    pub split_id: String,
    /// The SQL query to execute.
    pub query: String,
}

impl SplitMetaData for AdbcSnowflakeSplit {
    fn id(&self) -> SplitId {
        self.split_id.clone().into()
    }

    fn restore_from_json(value: JsonbVal) -> ConnectorResult<Self> {
        serde_json::from_value(value.take()).map_err(|e| anyhow!(e).into())
    }

    fn encode_to_json(&self) -> JsonbVal {
        serde_json::to_value(self.clone()).unwrap().into()
    }

    fn update_offset(&mut self, _last_seen_offset: String) -> ConnectorResult<()> {
        // ADBC Snowflake doesn't have offset-based reading for now
        Ok(())
    }
}

/// Split enumerator for ADBC Snowflake source.
pub struct AdbcSnowflakeSplitEnumerator {
    properties: AdbcSnowflakeProperties,
}

#[async_trait]

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Check the full chained serde error to see which field mismatched.
  2. Restart the source after clearing stale checkpoint/split state so splits are re-encoded with the current schema.
  3. Ensure the RisingWave cluster (meta and compute) is on a single consistent version — no mixed-version restore across an upgrade.
  4. If this is reproducible after an upgrade, report it; the split serde format may need a compatibility shim.

Example fix

// no user code fix; operational remedy:
// stop source → clear stale split state → recreate source so AdbcSnowflakeSplit is re-encoded by the current version
Defensive patterns

Strategy: try-catch

Try / catch

// recover split state defensively
match AdbcSnowflakeSplit::restore_from_json(json) {
    Ok(split) => split,
    Err(e) => {
        tracing::warn!(error = %e, "stale split state; re-encoding from scratch");
        AdbcSnowflakeSplit::default() // or trigger split re-planning
    }
}

Prevention

When it happens

Trigger: Recovering a Snowflake (ADBC) source split from meta state where the persisted JSON was written by a different RisingWave version with a changed split struct layout, or where the stored value is malformed/corrupted.

Common situations: Upgrading RisingWave across versions where AdbcSnowflakeSplit fields were renamed or restructured and old checkpoint state is restored; manually edited or corrupted meta state.

Understand the failure class

Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.

Related errors


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