Skip to content

Conversation

@TedHartMS
Copy link
Contributor

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.

Copilot AI review requested due to automatic review settings January 5, 2026 22:57
Copy link
Contributor

Copilot AI left a 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 unsafe keywords 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

            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

  • This assignment to status is useless, since its value is never read.
    libs/storage/Tsavorite/cs/test/CompletePendingTests.cs:331
  • This assignment to status is useless, since its value is never read.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TedHartMS TedHartMS merged commit ef08d67 into dev Jan 7, 2026
27 of 30 checks passed
@TedHartMS TedHartMS deleted the tedhar/null-buffer-fix branch January 7, 2026 19:57
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.

4 participants