The restore functions should be using long for the TTL not int #2373
Closed
NeutrinoAPI
started this conversation in
General
Replies: 2 comments 1 reply
-
Hi @NeutrinoAPI, could you please create an issue for this? Thanks. |
Beta Was this translation helpful? Give feedback.
1 reply
-
closed by #2693 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
The restore* group of functions use int as the "ttl" parameter, I believe this should actually be long because the restore command sets the TTL as milliseconds NOT seconds.
As per the redis docs: https://redis.io/commands/restore
"If ttl is 0 the key is created without any expire, otherwise the specified expire time (in milliseconds) is set".
This leads to integer overflows when passing PTTLs with sufficiently large size...
I think this should be filed as a bug in jedis but adding as a discussion first in case I have missed something about this feature..
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions