Skip to content

Commit

Permalink
Fix TTL on objects, issue #337 (#338)
Browse files Browse the repository at this point in the history
Use `GarnetObjectType.PTtl` or `GarnetObjectType.Ttl` depending on the flag `milliseconds`.
  • Loading branch information
nightroman authored Apr 29, 2024
1 parent 486bbef commit 023f1fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/server/Storage/Session/MainStore/MainStoreOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public unsafe GarnetStatus TTL<TContext, TObjectContext>(ref SpanByte key, Store

if ((storeType == StoreType.Object || storeType == StoreType.All) && objectStoreSession != null)
{
(*(RespInputHeader*)pcurr).type = GarnetObjectType.Ttl;
(*(RespInputHeader*)pcurr).type = milliseconds ? GarnetObjectType.PTtl : GarnetObjectType.Ttl;

var keyBA = key.ToByteArray();
var objO = new GarnetObjectStoreOutput { spanByteAndMemory = output };
Expand Down

0 comments on commit 023f1fe

Please sign in to comment.