You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "J0HN50N133 (via GitHub)" <gi...@apache.org> on 2024/04/14 08:11:26 UTC
[I] bug: inappropriate type of `ttl_` of `CommandSet` [kvrocks]
J0HN50N133 opened a new issue, #2248:
URL: https://github.com/apache/kvrocks/issues/2248
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/kvrocks/issues) and found no similar issues.
### Version
Since db2860d until now.
### Minimal reproduce step
https://github.com/apache/kvrocks/blob/a2380535d5602692f3746783c48ccc7bb05cc58e/src/commands/cmd_string.cc#L307
Here determine whether `ttl_` less than `0`, if so, doing deletion. However, the type of `ttl_` if `uint64_t` which is impossible to less than 0.
https://github.com/apache/kvrocks/blob/a2380535d5602692f3746783c48ccc7bb05cc58e/src/commands/cmd_string.cc#L340
### What did you expect to see?
If `ttl_` less than `0`, doing deletion.
### What did you see instead?
The condition will never be true, thus, deletion will never be done.
### 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] bug: inappropriate type of `ttl_` of `CommandSet` [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice closed issue #2248: bug: inappropriate type of `ttl_` of `CommandSet`
URL: https://github.com/apache/kvrocks/issues/2248
--
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
Re: [I] bug: inappropriate type of `ttl_` of `CommandSet` [kvrocks]
Posted by "J0HN50N133 (via GitHub)" <gi...@apache.org>.
J0HN50N133 commented on issue #2248:
URL: https://github.com/apache/kvrocks/issues/2248#issuecomment-2053960571
I could fix it. Although the behaviour here is correct (because of implicit cast), it's disturbing.
--
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
Re: [I] bug: inappropriate type of `ttl_` of `CommandSet` [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #2248:
URL: https://github.com/apache/kvrocks/issues/2248#issuecomment-2053958449
@J0HN50N133 Thanks for your report.
You're right, would you submit a PR to fix this?
--
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