Skip to content

Commit

Permalink
Updated job_ids to ObjectId; refactored loop and get_fragment_mappings.
Browse files Browse the repository at this point in the history
  • Loading branch information
shanicky committed Jul 19, 2024
1 parent 48111f5 commit 1f23de9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/meta/src/controller/fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl CatalogControllerInner {
) -> MetaResult<impl Iterator<Item = FragmentWorkerSlotMapping> + '_> {
let txn = self.db.begin().await?;

let job_ids: Vec<i32> = StreamingJob::find()
let job_ids: Vec<ObjectId> = StreamingJob::find()
.select_only()
.column(streaming_job::Column::JobId)
.filter(streaming_job::Column::JobStatus.eq(JobStatus::Created))
Expand All @@ -78,7 +78,7 @@ impl CatalogControllerInner {

let mut result = vec![];
for job_id in job_ids {
let mappings = get_fragment_mappings(&txn, job_id as ObjectId).await?;
let mappings = get_fragment_mappings(&txn, job_id).await?;

result.extend(mappings.into_iter());
}
Expand Down

0 comments on commit 1f23de9

Please sign in to comment.