Skip to content

Cherry-Picking more commits from main into dev #1581

Merged
TalZaccai merged 6 commits intodevfrom
talzacc/main_to_dev2
Feb 27, 2026
Merged

Cherry-Picking more commits from main into dev #1581
TalZaccai merged 6 commits intodevfrom
talzacc/main_to_dev2

Conversation

@TalZaccai
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 27, 2026 21:06
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 cherry-picks two improvements from the main branch into dev:

  1. Test isolation improvement (TestUtils.cs): UnitTestWorkingDir() is simplified by removing the category and includeGuid parameters. Instead, it now automatically incorporates test arguments as a hash code, ensuring different parameterized test runs of the same method get separate working directories without requiring callers to pass extra arguments.

  2. Dispose refactoring (MigrateSessionTaskStore.cs): The Dispose() method is updated so that session disposal happens outside the write lock. The flag _disposed is set while holding the lock to prevent concurrent add/remove operations from racing, and then sessions are disposed after the lock is released — this is safe because all other methods check _disposed early under the lock before accessing sessions.

Changes:

  • Simplified UnitTestWorkingDir() in TestUtils.cs to use argument-based hash codes for parameterized test separation instead of optional category/includeGuid parameters.
  • Refactored MigrateSessionTaskStore.Dispose() in MigrateSessionTaskStore.cs to set the disposed flag under a lock, then dispose sessions outside the lock.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
test/Garnet.test/TestUtils.cs Removes category/includeGuid params; adds argument hashing for test directory isolation
libs/cluster/Server/Migration/MigrateSessionTaskStore.cs Refactors Dispose() to release the write lock before iterating/disposing sessions; adds /// <inheritdoc/> tag


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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@TalZaccai TalZaccai merged commit 9ff1233 into dev Feb 27, 2026
20 of 23 checks passed
@TalZaccai TalZaccai deleted the talzacc/main_to_dev2 branch February 27, 2026 22:36
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