kvrocks
kvrocks copied to clipboard
A large negative EXPIRE keeps the key instead of deleting it
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 SET "$k" v
r EXPIRE "$k" -2000000000
r GET "$k"
What did you expect to see?
The key should be deleted, as with any non-positive EXPIRE timeout in Redis.
What did you see instead?
EXPIRE returns 1 but GET returns v. The negative timeout puts the deadline before 1970.
Anything Else?
Tested on 2026-10-14. This is about the negative timeout, not the timing-dependent EXPIRE 0 case.
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 look into the cause and see if I can add a regression test. Thank u!