Repository navigation
fix(exl3): remove temporary assignment link after publication - #3784
Merged
Merged
Conversation
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.
Fixes #3714's assignment-store leak: each successful publication left a hidden hard link beside the authoritative JSON file.
flowchart TD A["_persist_assignment"] --> B["write and fsync temporary file"] B --> C{"os.link to final name"} C -- succeeds --> D["fsync directory; unlink temporary name; fsync directory"] C -- fails --> E["unlink unpublished temporary name; re-raise"] D --> F["one durable published name"]gptqmodel/utils/exl3_remote.py:882-883left the temporary name linkedgptqmodel/utils/exl3_remote.py:886-895removes it and fsyncs the directoryfinallycleanup keeps that failure pathValidation:
tests/test_exl3_remote.pypasses (17 tests). The publication regression checks one directory entry and link count 1 after success, and no leftover temporary entry after a competing publisher fails. Ruff passes.