dragonflydb / dragonflydb/dragonfly

Cache issue on HLEN with HSETEX

Open
#3,598 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

**Describe the bug**
HLEN return incorrect value, when key expired

**To Reproduce**
HSETEX _Key 5 _SubKey 1
...After 10 seconds
HLEN _Key
- return 1

HDEL _Key AnyVal || HKEYS _Key
- refresh cache and HLEN _Key returns 0

**Expected behavior**
After exire time HLEN should return correct value

**Environment (please complete the following information):**
- OS: Docker image : docker.dragonflydb.io/dragonflydb/dragonfly
redis_version:6.2.11
dragonfly_version:df-v1.21.4
redis_mode:standalone
arch_bits:64
os:Linux 6.1.0-23-amd64 x86_64
multiplexing_api:epoll

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the sequence with HSETEX, waiting past the expiry, and running HLEN, then compare it with HDEL or HKEYS, which refresh the result. Trace the HLEN expiration handling and add or run the relevant regression coverage; done means HLEN returns 0 immediately after the hash expires.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, redis
Domain
databases
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.