Skip to content

Commit

Permalink
Remove ifdefs from ClusterStress to fix build (#82)
Browse files Browse the repository at this point in the history
* Remove ifdefs from ClusterStress which made Roslyn confused

* Revert "Remove ifdefs from ClusterStress which made Roslyn confused"

This reverts commit ba33be6.

* Use full typename for the Debug.Assert instead

* Per the PR feedback

---------

Co-authored-by: vazois <96085550+vazois@users.noreply.github.com>
  • Loading branch information
PaulusParssinen and vazois committed Mar 22, 2024
1 parent 54a21b2 commit 5f3d6e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions playground/ClusterStress/OnlineReqGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text;

Expand Down Expand Up @@ -77,7 +76,7 @@ public byte[] GenerateKeyBytes(out int slot)
byte[] keyBytes = GetClusterKeyBytes(key);
#if DEBUG
int _slot = Garnet.common.NumUtils.HashSlot(keyBytes);
Debug.Assert(_slot == slot, $"GenerateKeyBytes slot number incosistence {_slot}:{slot}");
System.Diagnostics.Debug.Assert(_slot == slot, $"GenerateKeyBytes slot number incosistence {_slot}:{slot}");
#endif
return keyBytes;
}
Expand All @@ -89,7 +88,7 @@ public string GenerateKey(out int slot)
byte[] keyBytes = GetClusterKeyBytes(key);
#if DEBUG
int _slot = Garnet.common.NumUtils.HashSlot(keyBytes);
Debug.Assert(_slot == slot, $"GenerateKeyBytes slot number incosistence {_slot}:{slot}");
System.Diagnostics.Debug.Assert(_slot == slot, $"GenerateKeyBytes slot number incosistence {_slot}:{slot}");
#endif
return Encoding.ASCII.GetString(keyBytes);
}
Expand Down

0 comments on commit 5f3d6e4

Please sign in to comment.