Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdaankhalidmsft committed Dec 16, 2024
1 parent d7beeb6 commit f6cef7c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/server/Resp/Bitmap/BitmapManagerBitPos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private static long BitPosByte(byte* value, byte bSetVal, long startOffset, long

// if we are exceeding it, return -1
if (pos >= len * 8)
return -1;
return -1;

if (payload == mask)
return pos + 0;
Expand Down
1 change: 1 addition & 0 deletions libs/server/Storage/Functions/MainStore/RMWMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ private bool InPlaceUpdaterWorker(ref SpanByte key, ref RawStringInput input, re
// Copy value to output for the GET part of the command.
CopyRespTo(ref value, ref output, etagIgnoredOffset, etagIgnoredEnd);
}
// HK TODO: Should this be updating etag?
return true;
case RespCommand.SETWITHETAG:
// SETWITHETAG WILL OVERRIDE the existing value, unless sent with RETAIN ETAG and already has etag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public int GetRMWModifiedValueLength(ref SpanByte t, ref RawStringInput input, b
case RespCommand.SETEXXX:
if (!retainEtag)
etagOffset = 0;
return sizeof(int) + input.parseState.GetArgSliceByRef(0).Length + (input.arg1 == 0 ? 0 : sizeof(long)) + etagOffset;
return sizeof(int) + input.parseState.GetArgSliceByRef(0).Length + (input.arg1 == 0 ? 0 : sizeof(long)) + etagOffset;
case RespCommand.PERSIST:
return sizeof(int) + t.LengthWithoutMetadata;
case RespCommand.SETWITHETAG:
Expand Down
2 changes: 1 addition & 1 deletion test/Garnet.test/GarnetBitmapTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ public void BitmapBitPosTest_BoundaryConditions()
ClassicAssert.IsTrue(db.StringSet(key, bitmap));

// first unset bit, should increment
for (int i = 0; i < bitmapSize; i ++)
for (int i = 0; i < bitmapSize; i++)
{
// first unset bit
ClassicAssert.AreEqual(i, db.StringBitPosition(key, false));
Expand Down

0 comments on commit f6cef7c

Please sign in to comment.