-
Notifications
You must be signed in to change notification settings - Fork 632
Convert remaining Tsavorite tests to V2 #1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add additional Asserts for diagnostics
…issues (Reviv, Iterator); WIP on a RecoveryCheck failure.
There was a problem hiding this comment.
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 completes the conversion of Tsavorite tests to the V2 API, transitioning from the older API to a LogRecord-based architecture. The changes involve updating test code to use the new V2 signatures, removing unsafe keywords where no longer needed, improving code quality with style fixes, and addressing test stability issues.
Key Changes
- Migrated remaining Tsavorite tests from V1 to V2 API with LogRecord-based operations
- Removed unnecessary
unsafekeywords and updated method signatures across test utilities - Fixed test stability issues including threading concerns and proper cleanup in PageAsyncResultTypes
- Updated TsavoriteLogRecoveryInfo to remove deprecated iterator tracking fields
Reviewed changes
Copilot reviewed 72 out of 72 changed files in this pull request and generated 24 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Garnet.test/*.cs | Updated Garnet tests with debug logging, removed unused returns, and adjusted test assertions |
| libs/storage/Tsavorite/cs/test/TestUtils.cs | Removed unnecessary unsafe keywords from utility methods |
| libs/storage/Tsavorite/cs/test/TestTypes.cs | Refactored SimpleLongSimpleFunctions into generic base class, added assertions for size validation |
| libs/storage/Tsavorite/cs/test/SpanByte*.cs | Converted SpanByte tests to V2 API, removed conditional compilation directives |
| libs/storage/Tsavorite/cs/test/SharedDirectoryTests.cs | Updated type aliases and converted to V2 API patterns |
| libs/storage/Tsavorite/cs/test/SessionTests.cs | Migrated session tests to use SpanByte.FromPinnedVariable |
| libs/storage/Tsavorite/cs/test/RevivificationTests.cs | Extensive updates to revivification tests with improved artificial bin testing |
| libs/storage/Tsavorite/cs/test/Recovery*.cs | Updated recovery tests for V2 API compatibility |
| libs/storage/Tsavorite/cs/test/ReadCache*.cs | Converted read cache tests to V2 patterns |
| libs/storage/Tsavorite/cs/test/*Tests.cs | Multiple test files updated for V2 API including NativeReadCache, MoreLogCompaction, ModifiedBit, Misc, Input/Output, Function, Flaky, Expiration, CompletePending, and Basic tests |
| libs/storage/Tsavorite/cs/src/core/VarLen/*.cs | Updated SpanByte utilities and functions for V2 compatibility |
| libs/storage/Tsavorite/cs/src/core/Utilities/*.cs | Fixed memory cleanup issues in PageAsyncResultTypes, improved toString output |
| libs/storage/Tsavorite/cs/src/core/TsavoriteLog/*.cs | Removed deprecated iterator tracking from TsavoriteLogRecoveryInfo, minor cleanup |
| libs/storage/Tsavorite/cs/src/core/Index/Tsavorite/*.cs | Updated RevivificationManager field naming, fixed pending context logic |
Comments suppressed due to low confidence (3)
libs/storage/Tsavorite/cs/src/core/TsavoriteLog/TsavoriteLog.cs:2595
- This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.
foreach (var metadataCommit in logCommitManager.ListCommits())
{
if (metadataCommit > requestedCommitNum)
continue;
try
{
if (LoadCommitMetadata(metadataCommit, out info))
{
scanStart = metadataCommit;
break;
}
}
catch { }
}
libs/storage/Tsavorite/cs/test/CompletePendingTests.cs:295
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR finishes the conversion of Tsavorite tests to V2, along with necessary fixes.
There are still a few tests marked [Explicit] due to intermittent failures which will be addressed in subsequent PRs.