Skip to content

Small corner case handling in storage#1879

Merged
badrishc merged 2 commits into
mainfrom
badrishc/small-fixes
Jun 15, 2026
Merged

Small corner case handling in storage#1879
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 badrishc force-pushed the badrishc/small-fixes branch from 998e428 to 6ca5c9a Compare June 15, 2026 20:04
@badrishc badrishc force-pushed the badrishc/small-fixes branch from 6ca5c9a to ab68f53 Compare June 15, 2026 20:07
@badrishc badrishc merged commit f9214f6 into main Jun 15, 2026
195 checks passed
@badrishc badrishc deleted the badrishc/small-fixes branch June 15, 2026 23:55
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.

3 participants