kvrocks
kvrocks copied to clipboard
TTL reports an existing key after HDEL removes the last field
Search before asking
- [x] I had searched in the issues and found no similar issues.
Version
apache/kvrocks:nightly-20261014-d690353, Linux arm64
Minimal reproduce step
On a local test instance at port 6666, with redis-cli:
k="upstream-repro-$(date +%s)-$$"
r() { redis-cli -p 6666 "$@"; }
r HSET "$k" f v
r HDEL "$k" f
r EXISTS "$k"
r TTL "$k"
What did you expect to see?
TTL -2 because the key no longer exists, as in Redis.
What did you see instead?
EXISTS returns 0 but TTL returns -1.
Anything Else?
No response
Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Hi, I’d like to give this issue a try. I’ll investigate why TTL returns -1 after the last hash field is deleted and add a regression test. Thank u!
Hi, is anyone still working on this? I'd be happy to take it if not.