Skip to content

Commit

Permalink
Fix DEL command (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
vazois authored Apr 15, 2024
1 parent 86a924c commit 8cb9bda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/server/Storage/Session/MainStore/MainStoreOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public GarnetStatus DELETE<TContext, TObjectContext>(ref SpanByte key, StoreType
where TContext : ITsavoriteContext<SpanByte, SpanByte, SpanByte, SpanByteAndMemory, long>
where TObjectContext : ITsavoriteContext<byte[], IGarnetObject, SpanByte, GarnetObjectStoreOutput, long>
{
bool found = false;
var found = false;

if (storeType == StoreType.Main || storeType == StoreType.All)
{
Expand All @@ -468,7 +468,7 @@ public GarnetStatus DELETE<TContext, TObjectContext>(ref SpanByte key, StoreType
if (status.Found) found = true;
}

if (!found && (storeType == StoreType.Object || storeType == StoreType.All) && objectStoreSession != null)
if (objectStoreSession != null && (storeType == StoreType.Object || storeType == StoreType.All))
{
var keyBA = key.ToByteArray();
var status = objectContext.Delete(ref keyBA);
Expand Down

0 comments on commit 8cb9bda

Please sign in to comment.