{"record":{"id":"e5ef79fa7cc99320","repo":"risingwavelabs/risingwave","slug":"implement-mysql-cdc-parallelized-backfill","errorCode":null,"errorMessage":"implement MySQL CDC parallelized backfill","messagePattern":"implement MySQL CDC parallelized backfill","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/connector/src/source/cdc/external/mysql.rs","lineNumber":522,"sourceCode":"        self.pool.disconnect().await.map_err(|e| e.into())\n    }\n\n    fn get_parallel_cdc_splits(\n        &self,\n        _options: CdcTableSnapshotSplitOption,\n    ) -> BoxStream<'_, ConnectorResult<CdcTableSnapshotSplit>> {\n        // TODO(zw): feat: impl\n        stream::empty::<ConnectorResult<CdcTableSnapshotSplit>>().boxed()\n    }\n\n    fn split_snapshot_read(\n        &self,\n        _table_name: SchemaTableName,\n        _left: OwnedRow,\n        _right: OwnedRow,\n        _split_columns: Vec<Field>,\n    ) -> BoxStream<'_, ConnectorResult<OwnedRow>> {\n        todo!(\"implement MySQL CDC parallelized backfill\")\n    }\n}\n\nimpl MySqlExternalTableReader {\n    /// Get MySQL version from the connection\n    async fn get_mysql_version(pool: &mysql_async::Pool) -> ConnectorResult<(u8, u8, bool)> {\n        let mut conn = pool.get_conn().await?;\n        let result: Option<String> = conn.query_first(\"SELECT VERSION()\").await?;\n\n        if let Some(version_str) = result {\n            let parts: Vec<&str> = version_str.split('.').collect();\n            if parts.len() >= 2 {\n                let major_version = parts[0]\n                    .parse::<u8>()\n                    .context(\"Failed to parse major version\")?;\n                let minor_version = parts[1]\n                    .parse::<u8>()\n                    .context(\"Failed to parse minor version\")?;","sourceCodeStart":504,"sourceCodeEnd":540,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/external/mysql.rs#L504-L540","documentation":"split_snapshot_read on the MySQL external table reader is an unimplemented stub: it immediately panics with todo!. Parallelized (split-key based) CDC backfill for MySQL is not yet implemented, so calling this path aborts the stream task.","triggerScenarios":"The backfill planner assigns a split-based parallel snapshot read for a MySQL CDC table, invoking MySqlExternalTableReader::split_snapshot_read with left/right split rows.","commonSituations":"Users enabling parallel/serialized split backfill options on MySQL CDC sources; developers exercising the external-table reader API directly in tests.","solutions":["Do not configure parallel split-based backfill for MySQL CDC; use the default single-threaded snapshot path.","Upgrade RisingWave to a version where MySQL parallel backfill is implemented.","If you maintain the code, implement the method (range-query rows between _left and _right on _split_columns) or route to the non-split reader.","File an issue / check the tracker for 'MySQL CDC parallelized backfill' progress."],"exampleFix":"// before\nfn split_snapshot_read(...) -> ... {\n    todo!(\"implement MySQL CDC parallelized backfill\")\n}\n// after\nfn split_snapshot_read(...) -> ... {\n    self.stream_snapshot_read(...) // fall back to non-parallel snapshot read\n}","handlingStrategy":"try-catch","validationCode":"// Prefer the non-split snapshot path when using MySQL CDC:\nlet use_parallel_backfill = false; // MySQL parallelized backfill is unimplemented\nif connector == \"mysql-cdc\" && use_parallel_backfill {\n    return Err(\"MySQL CDC does not support parallel split-based backfill\".into());\n}","typeGuard":null,"tryCatchPattern":"match reader.split_snapshot_read(table, left, right, cols).await.next().await {\n    Some(Err(e)) if e.to_string().contains(\"parallelized backfill\") || e.to_string().contains(\"not implemented\") => {\n        eprintln!(\"Falling back to sequential snapshot read\");\n        reader.snapshot_read(table).await\n    }\n    other => other,\n}","preventionTips":["Do not enable parallel split backfill for MySQL CDC sources.","Use the default backfill configuration.","Track RisingWave releases for MySQL parallel backfill support before opting in.","Guard feature flags that route to split_snapshot_read for MySQL."],"tags":["cdc","mysql","not-implemented","panic","backfill"],"backgroundTag":"method-not-implemented","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}