You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "quiet-maple-47 (via GitHub)" <gi...@apache.org> on 2026/10/15 00:04:38 UTC

[I] TTL reports an existing key after HDEL removes the last field [kvrocks]

quiet-maple-47 opened a new issue, #3676:
URL: https://github.com/apache/kvrocks/issues/3676

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/kvrocks/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:
   ```bash
   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!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] TTL reports an existing key after HDEL removes the last field [kvrocks]

Posted by "yaolele05 (via GitHub)" <gi...@apache.org>.
yaolele05 commented on issue #3676:
URL: https://github.com/apache/kvrocks/issues/3676#issuecomment-6191819409

   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!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org