microsoft / garnet

Garnet is a remote cache-store from Microsoft Research that offers strong performance (throughput and latency), scalability, storage, recovery, cluster sharding, key migration, and replication features. Garnet can work with existing Redis clients.
https://microsoft.github.io/garnet/
MIT License
9.71k stars 459 forks source link

Only truncate AOF if all active stores are checkpointed #461

Open chenhao-ye opened 2 weeks ago

chenhao-ye commented 2 weeks ago

AOF is truncated after checkpointing. However, truncation should only happen if both stores are checkpointed, since they share the same AOF. The current implementation can lose data if storeType is not StoreType.All.

This bug so far is not triggered because every caller is using StoreType.All.

chenhao-ye commented 2 weeks ago

@microsoft-github-policy-service agree

chenhao-ye commented 1 week ago

Comments are addressed.