Skip to content

Commit

Permalink
fix: Add read guard on reschedule_lock for drop_streaming_jobs (#20240
Browse files Browse the repository at this point in the history
)

Signed-off-by: Shanicky Chen <[email protected]>
  • Loading branch information
shanicky authored and shanicky committed Jan 22, 2025
1 parent 7c4e1b8 commit 2003863
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/meta/src/rpc/ddl_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,8 @@ impl DdlController {
drop_mode: DropMode,
target_replace_info: Option<ReplaceTableInfo>,
) -> MetaResult<NotificationVersion> {
let _reschedule_job_lock = self.stream_manager.reschedule_lock_read_guard().await;

let (object_id, object_type) = match job_id {
StreamingJobId::MaterializedView(id) => (id as _, ObjectType::Table),
StreamingJobId::Sink(id) => (id as _, ObjectType::Sink),
Expand Down

0 comments on commit 2003863

Please sign in to comment.