Repository navigation
Fix arithmetic overflow for MSSQL result backend - #9904
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an arithmetic overflow issue when using the MSSQL database backend with Celery by replacing Integer columns with BigInteger for MSSQL dialect while maintaining Integer for other databases.
- Introduces a dialect-specific column type that uses BigInteger for MSSQL and Integer for other databases
- Updates the primary key columns in Task and TaskSet models to use the new dialect-specific type
- Addresses issue #8634 where MSSQL's Integer type cannot accommodate large sequence values
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9904 +/- ##
=======================================
Coverage 78.67% 78.67%
=======================================
Files 153 153
Lines 19290 19291 +1
Branches 2568 2568
=======================================
+ Hits 15176 15177 +1
+ Misses 3816 3814 -2
- Partials 298 300 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
auvipy
self-requested a review
September 21, 2025 04:55
auvipy
reviewed
Sep 21, 2025
auvipy
approved these changes
Sep 21, 2025
3 of 19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Apparently, not too many people are using celery with MSSQL. This change must fix #8634.
Perhaps there is no other way neither place to do this better:
SQLAlchemy seems to behave correctly: it uses Integer when specified, and it’s not SQLAlchemy's business that Integer cannot fit a sequence. As a consequence, the application should use proper field types.