dragonflydb / dragonflydb/dragonfly

"touch" expires and replication

Open
#4,906 0 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

Certain data structures, namely the `DenseSet` expires values while `traversing`. This in practice means, that an expired member won't really expire unless another command on the same key "touches" it.

We had a bug here https://github.com/dragonflydb/dragonfly/pull/4873/files#r2032946766 that we basically expired the `key` because it became empty but we never submitted its deletion to the journal. Consequently, master had this key expired and replica did not. We should:

1. Check all flows that have "delayed expirations" and delete the key when the data structure becomes empty
2. Add replication tests for consistency

Contributor guide

Open the contributing guide

Research direction

Start by tracing the DenseSet traversal path and every flow with delayed expirations, using the linked pull request as context for the prior replication bug. Add replication coverage for empty data structures and verify that master and replica delete the same expired keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.