Repository navigation
Disk tier: long table names no longer break every fit - #129
Merged
Merged
Conversation
…r fails on the file name limit The spill store named each context's files with the hex of its dataset_id (tenant plus the caller's table name), doubling its length. A name over about 80 characters passed the 255-byte file name limit, and every fit of it failed with a 500: the fit drops any stale spilled copy first, and that unlink raised ENAMETOOLONG. Ids whose hex would pass 200 characters are now named sha256-<digest>, with the id in the meta file; a restart reads it from there. Shorter ids keep their hex names, so existing spill files load.
Codecov Report❌ Patch coverage is
❌ Your changes status has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes. Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
==========================================
+ Coverage 90.60% 90.64% +0.03%
==========================================
Files 62 62
Lines 5899 5931 +32
==========================================
+ Hits 5345 5376 +31
- Misses 554 555 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
- Hex names are kept up to exactly the old working limit (hex 245, ids up to 122 bytes), not 200: ids of 101-122 bytes worked before, and their files spilled by an older tabctx would otherwise never load or be deleted, and hold disk forever. - Spill files are written atomically (a short temporary name, then os.replace), so a crash never leaves a torn metadata file. - A hashed pair whose metadata can't be read is removed at startup: its id is unrecoverable, so nothing could ever load or evict it.
Merged
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.
Why
On prod, every
fitfrom one lab failed this morning with a 500. The traceback ended inOSError: [Errno 36] File name too long.dataset_id, which is the tenant plus the caller's table name. Hex doubles the length, so a table name over about 80 characters passes the 255-byte file name limit.unlink()raisedENAMETOOLONG, which isn'tFileNotFoundError, so the fit itself failed, whether or not anything had been spilled.What changes
_file_stem: ids whose hex name would pass the 255-byte limit (hex over 245, ids over 122 bytes) are namedsha256-<digest>, a fixed length. The meta file already records the id.os.replaced, so a crash never leaves a torn file.Testing
tests/unit/test_spill.py:Prod runs 0.17.1, so this needs a release and an image bump in inference-platform to reach it.