Repository navigation
Honor explicit autocommit in memory file opens - #2281
Draft
xingzhao-ji wants to merge 3 commits into
Draft
xingzhao-ji wants to merge 3 commits into
xingzhao-ji wants to merge 3 commits into
Conversation
xingzhao-ji
force-pushed
the
fix/memory-explicit-autocommit
branch
from
October 13, 2026 20:24
84ee38d to
09d1eaf
Compare
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
MemoryFileSystem._open()currently decides whether to publish writes fromself._intrans, ignoring theautocommitvalue already resolved byAbstractFileSystem.open().Consequently,
fs.open('file', 'wb', autocommit=False)creates the target immediately and leaves its bytes visible after the queued transaction is discarded. Conversely, an explicitautocommit=Trueinside a transaction does not publish a new file, even though that handle is excluded from the transaction's commit queue.Use the resolved flag for write/create/append publication and for copying an existing append target. Defaults remain determined by
AbstractFileSystem.open(). Add regressions for new and existing files, commit/discard, and both explicit overrides, plus a changelog entry.Validation
git diff --check, passed.The dependency-heavy full suite and pinned Ruff environment were not run. The change is limited to write/create/append handling; read/update mode handling is unchanged.
Prepared and tested with OpenAI Codex assistance. No human-review certification is claimed.