Skip to content

fix(exl3): remove temporary assignment link after publication - #3784

Merged
Qubitium merged 1 commit into
mainfrom
fix/exl3-assignment-temp-cleanup
Nov 12, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/exl3-assignment-temp-cleanup

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

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"]
Loading
Mechanism Before After
Successful publication gptqmodel/utils/exl3_remote.py:882-883 left the temporary name linked gptqmodel/utils/exl3_remote.py:886-895 removes it and fsyncs the directory
Failed exclusive publication Exception cleanup removed the temporary file The finally cleanup keeps that failure path

Validation: tests/test_exl3_remote.py passes (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.

@Qubitium
Qubitium merged commit b828e01 into main Nov 12, 2026
6 checks passed
@Qubitium
Qubitium deleted the fix/exl3-assignment-temp-cleanup branch November 12, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant