Prevent breaking scheduler on task_instance.priority_weight column has overflow value#22784
Prevent breaking scheduler on task_instance.priority_weight column has overflow value#22784kosteev wants to merge 1 commit intoapache:mainfrom kosteev:master
Conversation
|
The fix is specific to Postgres I believe. Every database has different integer ranges so this will need to contain some if-else branches to cover each of them. Although honestly maybe it’s even better to just document this is a database limitation and you just can’t go over the limit. |
I agree but the point of concern is that this cause the scheduler to crash which is not good. |
|
Yeah the scheduler should not crash, but perhaps we could catch the exception or something like that. I seem to recall there’s a similar situation for something else a while ago (datetime out of range?) |
|
I recall only #17003 which also caused scheduler crash with divide by zero |
|
Is silently clamping it right, or should this be a parse time DAG import error? |
|
Ah found it, 2213635 So I guess the better fix here is to do something similar, check for Postgres, and prevent an out-of-bounds value to be assigned for Postgres specifically. +1 to an import error. |
|
All right, validating it during DAG import and throwing error makes sense. |
|
Let’s start with adding just a check for Postgres now, we can add more later. |


closes: #22781