Skip to content

TTL discrepency between redis and garnet #1389

@sspeaks

Description

@sspeaks

Describe the bug

When executing the TTL command for a particular keys, redis and garnet differ.

Redis rounds the number of seconds to the nearest integer.
Garnet floors the number of seconds.

Not sure that such a discrepancy really matters or if y'all care about those kinda things, but I figured I'd mention.

Steps to reproduce the bug

Using a script, run the following commands against redis and then against garnet and notice the different output.

set key value
expire key 10
ttl key

Output will be 10 for redis and 9 for garnet.

Expected behavior

Garnet and Redis should both output 10

Screenshots

No response

Release version

No response

IDE

No response

OS version

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions