Repository navigation
Complete the File.file_size bigint cutover - #6162
Merged
rtibbles merged 3 commits intoSep 29, 2026
Merged
Conversation
bjester
previously requested changes
Sep 23, 2026
bjester
left a comment
Member
There was a problem hiding this comment.
A couple of requests regarding the isnull filters
Swap stage of the zero-downtime int->bigint widening, on top of the expand stage in 0167: - Drop the mirror trigger and the int column, rename file_size_bigint onto file_size, and rename its index onto the vacated name. All metadata-only, in one transaction. - Keep the shadow index's partial predicate, and filter file_size IS NOT NULL in the dedupe-then-Sum queries so they stay eligible for it. Sum already ignores NULLs, so the totals are unchanged. - Read file_size directly when publishing; Kolibri's LocalFile keeps its own 32-bit column and bigint shadow. - Retire the backfill deploy-migrate step. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015PZU9jWMFWezWayyhuSkyL
The linter runs git diff --relative from --project-root-path and only treats a changed file as a migration when its path contains /migrations/. Defaulting to the settings directory truncated every path past that segment, so the step has never linted anything. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015PZU9jWMFWezWayyhuSkyL
Describe the procedure in terms of any field and its shadow, with the file_size widening as the worked example rather than the subject. Add the shadow-index rule the swap depends on, and correct the linter escape hatch: IgnoreMigration imports a dev-only dependency from a migration production loads. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015PZU9jWMFWezWayyhuSkyL
rtibbles
force-pushed
the
file_size_bigint_swap
branch
from
September 23, 2026 20:46
b22ec7e to
6d21dac
Compare
Member
|
I'm unsure whether this is an issue with this PR specifically or hotfixes, but it seems that when I upload files to my local studio instance, the nodes end up incomplete. It seems the file objects for the uploads are not having |
bjester
self-requested a review
September 28, 2026 19:26
bjester
previously requested changes
Sep 28, 2026
bjester
left a comment
Member
There was a problem hiding this comment.
I can confirm that I do not experience the incomplete-node issue on a fresh branch off hotfixes, so it appears related to the changes in this PR. I used an old database with existing data, per the instructions, so please let me know if you can't recreate the issue
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.
Summary
File.file_sizespecific.References
Fixes #5974. Expand stage: #5986.
Reviewer guidance
0167with data in it, runmanage.py migrate contentcuration.file_sizecomes outbigint, row count andSUM/MAXmatch the pre-swapfile_size_bigint, and the one remaining index isfile_checksum_file_size_idx ... WHERE file_size IS NOT NULL.manage.py backfill_column --model contentcuration.File --source-field file_size --target-field file_size_bigint --progress-checkagainst the target database. The swap drops the int column, so this has to report complete before the release goes out. It does for bothmasterandhotfixes.manage.py lintmigrations --project-root-path . --git-commit-id upstream/hotfixes --no-cache --warnings-as-errors.0169reports IGNORE; remove itsignore_nameentry and the same run reports the drop and rename as errors.AI usage
Used Claude Code to write the swap migration, the query changes and the runbook rewrite. Verified with the Python test suite,
lintmigrations, and applying the migration to a populated database that had already been backfilled.🤖 Generated with Claude Code
https://claude.ai/code/session_01UQvLTghKxeZYiS9xBpyS8r