Skip to content

Commit 103eb22

Browse files
authored
[scheduler] Fix bug on limits query (#2253)
A missing parenthesis meant we're querying limits for way more than the single layer we're interested in. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Corrected layer limit validation to ensure conditions are properly evaluated for accurate threshold compliance assessment. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent cc5c264 commit 103eb22

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rust/crates/scheduler/src/dao/layer_dao.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,8 @@ impl LayerDao {
451451
GROUP BY limit_record.pk_limit_record
452452
) AS sum_running ON limit_record.pk_limit_record = sum_running.pk_limit_record
453453
WHERE layer.pk_layer = $1
454-
AND sum_running.int_sum_running < limit_record.int_max_value
455-
OR sum_running.int_sum_running IS NULL
454+
AND (sum_running.int_sum_running < limit_record.int_max_value
455+
OR sum_running.int_sum_running IS NULL)
456456
"#,
457457
)
458458
.bind(layer.id.to_string())

0 commit comments

Comments
 (0)