Skip to content

Commit fd56192

Browse files
address comments
1 parent 725768c commit fd56192

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/storage/src/source/mysql/replication.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ pub(crate) fn render<'scope>(
394394

395395
events::handle_rows_event(
396396
data,
397-
&repl_context,
397+
&mut repl_context,
398398
&cur_gtid,
399399
&mut row_event_buffer,
400400
)

src/storage/src/source/mysql/replication/events.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ pub(super) async fn handle_query_event(
222222
/// frontier with which to advance the dataflow's progress.
223223
pub(super) async fn handle_rows_event(
224224
event: RowsEventData<'_>,
225-
ctx: &ReplContext<'_>,
225+
ctx: &mut ReplContext<'_>,
226226
new_gtid: &GtidPartition,
227227
event_buffer: &mut Vec<(
228228
(usize, Result<SourceMessage, DataflowError>),
@@ -300,8 +300,7 @@ pub(super) async fn handle_rows_event(
300300
let row = mysql_async::Row::try_from(binlog_row)?;
301301
for (output, row_val) in outputs.iter().repeat_clone(row) {
302302
let event = if !has_full_metadata && output.binlog_full_metadata {
303-
tracing::warn!(%id, "timely-{worker_id} missing full metadata for {table:?} \
304-
- this can lead to incorrect decoding of some data types. This metadata is only available on MySQL 8.0+ with binlog_version=2, and must be enabled with the binlog_row_metadata configuration option.");
303+
ctx.errored_outputs.insert(output.output_index);
305304
Err(DataflowError::from(DefiniteError::ValueDecodeError(
306305
format!(
307306
"Table {0} was created with binlog_row_metadata=FULL but binlog_row_metadata has since been set to a different value, meaning we cannot reliably decode the columns",

src/storage/src/source/mysql/snapshot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ where
535535
fn build_snapshot_query(outputs: &[SourceOutputInfo]) -> String {
536536
let info = outputs.first().expect("MySQL table info");
537537
for output in &outputs[1..] {
538-
// the columns are decoded solely based on position, so we just need to ensure that
539-
// all columns are accounted for.
538+
// the columns may be decoded based on position, and different outputs may replicate
539+
// different columns, so we need to ensure that all columns are accounted for.
540540
assert!(
541541
info.desc.columns.len() == output.desc.columns.len(),
542542
"Mismatch in table descriptions for {}",

0 commit comments

Comments
 (0)