From df3eb218f32bd710bb1c5b7526ecd023d7af5f63 Mon Sep 17 00:00:00 2001 From: August Date: Wed, 10 Jan 2024 10:40:42 +0800 Subject: [PATCH] fix: missing apply of source split discovery info after replacing table (#14449) --- src/meta/src/barrier/command.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/meta/src/barrier/command.rs b/src/meta/src/barrier/command.rs index 39bc3ced0023a..ac1ffb392cef8 100644 --- a/src/meta/src/barrier/command.rs +++ b/src/meta/src/barrier/command.rs @@ -994,6 +994,21 @@ impl CommandContext { init_split_assignment.clone(), ) .await?; + + // Apply the split changes in source manager. + self.barrier_manager_context + .source_manager + .drop_source_fragments(std::slice::from_ref(old_table_fragments)) + .await; + let source_fragments = new_table_fragments.stream_source_fragments(); + self.barrier_manager_context + .source_manager + .apply_source_change( + Some(source_fragments), + Some(init_split_assignment.clone()), + None, + ) + .await; } }