Skip to content

Commit

Permalink
bug fix Delete keys locally if _copyOption is set to false. (#352)
Browse files Browse the repository at this point in the history
Co-authored-by: Arvind Chandavarapu <arch.hack28@gmail.com>
Co-authored-by: vazois <96085550+vazois@users.noreply.github.com>
  • Loading branch information
3 people committed May 6, 2024
1 parent 30e3780 commit 42ccdf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/cluster/Server/Migration/MigrateSessionSlots.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private bool MigrateSlotsDataDriver()
/// </summary>
public void DeleteKeysInSlot()
{
if (!_copyOption)
if (_copyOption)
return;

ClusterManager.DeleteKeysInSlotsFromMainStore(localServerSession.BasicGarnetApi, _sslots);
Expand Down
4 changes: 2 additions & 2 deletions libs/cluster/Server/Migration/MigrationDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public bool TryStartMigrationTask(out ReadOnlySpan<byte> errorMessage)
return false;
}

// Delete keys locally if option enabled
if (_copyOption)
// Delete keys locally if _copyOption is set to false.
if (!_copyOption)
DeleteKeys(_keysWithSize);
Status = MigrateState.SUCCESS;
}
Expand Down

0 comments on commit 42ccdf3

Please sign in to comment.