Small corner case handling in storage#1879
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
scanUncommittediterators onTsavoriteLog.CompleteLog()and add a regression test to prevent hangs. - Allow extended-length Windows paths (
\\?\...) inLocalStorageDevice/NativeStorageDeviceby skipping theMAX_PATHlength 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. |
998e428 to
6ca5c9a
Compare
6ca5c9a to
ab68f53
Compare
TedHartMS
approved these changes
Jun 15, 2026
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.
No description provided.