Skip to content

Commit

Permalink
handle v2
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Aug 7, 2024
1 parent e372293 commit 23cb77e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/meta/src/controller/streaming_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1214,12 +1214,22 @@ impl CatalogController {
let inner = self.inner.read().await;
let txn = inner.db.begin().await?;

{
let job = streaming_job::ActiveModel {
job_id: Set(source_id),
job_status: Set(JobStatus::Created),
..Default::default()
};
job.update(&txn).await?;
}

let source = Source::find_by_id(source_id)
.one(&txn)
.await?
.ok_or_else(|| {
MetaError::catalog_id_not_found(ObjectType::Source.as_str(), source_id)
})?;

let streaming_job_ids: Vec<ObjectId> =
if let Some(table_id) = source.optional_associated_table_id {
vec![table_id]
Expand Down

0 comments on commit 23cb77e

Please sign in to comment.