Closed
Description
Eric Wu opened DATAREDIS-286 and commented
The method
RedisTemplate<K, V>.expire(K key, long timeout, TimeUnit unit)
won't work for a timeout of 200 days.
I got this bug after upgrading Spring Data Redis from 1.1.1.RELEASE to 1.2.0.RELEASE.
The root cause is that Jedis is having an issue with the pexpire() method (See Jedis Issue 575, 576, and 577). Basically that method takes an integer as the timeout which easily overflows.
The work-around is to use Jedis's pexpireAt() instead, which takes a long integer.
My environment:
- Spring Data Redis 1.2.0-RELEASE
- Jedis 2.4.1
- Redis 2.8.6
Affects: 1.2.0
Issue Links:
- DATAREDIS-564 Invoking JedisConnection.expire during transaction/pipelining can cause NPE
Referenced from: pull request #52
Backported to: 1.2.1