- Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Mark Paluch opened DATAREDIS-564 and commented
A NullPointerException
can occur when calling JedisConnection.expire
during a transaction or pipelining and seconds
is greater than Integer.MAX_VALUE
. This is, because a call to time()
and using the result without checking the result.
Jedis' expire
method accepts only int
so pExpire
delegates to pExpireAt
if seconds
is greater than Integer.MAX_VALUE
. pExpireAt
requires a timestamp that is calculated by calling time()
and adding the number of seconds to the timestamp.
This issue could be fixed by using pExpire
as Jedis now accepts long
types in pexpire
.
Affects: 1.5.2 (Fowler SR2)
Issue Links:
- DATAREDIS-286 RedisTemplate.expire() overflow
Referenced from: pull request #228
Backported to: 1.8 GA (Ingalls), 1.7.7 (Hopper SR7)
Metadata
Metadata
Assignees
Labels
type: taskA general taskA general task