dragonflydb / dragonflydb/dragonfly

Data loss during heartbeat

Open
#3,383 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
31.5k
Forks
1.3k
Avg merge
1d 10h
Merged PRs (30d)
137

Description

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

Contributor guide

Open the contributing guide

Research direction

Start by tracing heartbeat execution alongside the global-transaction paths used by db_slice and journal_slice, including RegisterOnChange calls. Determine how key expiration can overlap snapshots or migrations, then verify that heartbeat cannot cause data loss during a global transaction and add or run the relevant concurrency tests if the existing test coverage identifies the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.