dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
25.29k stars 910 forks source link

Data loss during heartbeat #3383

Open BorysTheDev opened 1 month ago

BorysTheDev commented 1 month ago

When we do snapshots (replica/migration) we use global transactions to prevent simultaneous data changes during db_slice and journal_slice RegisterOnChange function calls to prevent data loss, but heartbeat ignores global transactions and can proceed to expire keys. We need to prevent heartbeat simultaneous execution with global transactions and one of the ways to make heartbeat transactional

romange commented 3 weeks ago

Expire or evict?

dranikpg commented 3 weeks ago

Both 🙂