Skip to content

Small corner case handling in storage - #1879

Merged
Badrish Chandramouli (badrishc) merged 2 commits into
mainfrom
badrishc/small-fixes
Jun 15, 2026
Merged

Small corner case handling in storage#1879
Badrish Chandramouli (badrishc) merged 2 commits into
mainfrom
badrishc/small-fixes

Conversation

@badrishc

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 15, 2026 19:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens a few Tsavorite storage edge cases by ensuring (1) scanUncommitted iterators don’t hang when a log is completed, (2) Windows MAX_PATH checks don’t incorrectly reject extended-length paths, and (3) object-page async reads don’t attempt to parse potentially corrupted buffers after I/O failures.

Changes:

  • Wake parked scanUncommitted iterators on TsavoriteLog.CompleteLog() and add a regression test to prevent hangs.
  • Allow extended-length Windows paths (\\?\...) in LocalStorageDevice/NativeStorageDevice by skipping the MAX_PATH length check for those prefixes.
  • Harden object allocator async page-read callback to avoid deserializing from buffers when errorCode != 0.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
libs/storage/Tsavorite/cs/test/test.hlog/LogScanTests.cs Adds an async regression test to ensure scanUncommitted iterators terminate after CompleteLog().
libs/storage/Tsavorite/cs/src/core/Utilities/Native32.cs Introduces extended-length path prefix constant and helper to detect \\?\ paths.
libs/storage/Tsavorite/cs/src/core/TsavoriteLog/TsavoriteLog.cs Ensures CompleteLog() wakes iterators parked in WaitUncommittedAsync.
libs/storage/Tsavorite/cs/src/core/Device/NativeStorageDevice.cs Skips Windows MAX_PATH enforcement for extended-length paths.
libs/storage/Tsavorite/cs/src/core/Device/LocalStorageDevice.cs Skips Windows MAX_PATH enforcement for extended-length paths.
libs/storage/Tsavorite/cs/src/core/Allocator/ObjectAllocatorImpl.cs Avoids parsing/deserializing object records on failed/cancelled async page reads; forwards the error to the “real” callback.

Comment thread libs/storage/Tsavorite/cs/test/test.hlog/LogScanTests.cs Outdated
@badrishc
Badrish Chandramouli (badrishc) merged commit f9214f6 into main Jun 15, 2026
195 checks passed
@badrishc
Badrish Chandramouli (badrishc) deleted the badrishc/small-fixes branch June 15, 2026 23:55
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants