Open
Description
Mircea Gaceanu opened DATAREDIS-600 and commented
It seems all operations inside a transaction are queued. According to the documentation the readonly operations should run a new connection (http://docs.spring.io/spring-data/redis/docs/current/reference/html/#tx.spring).
This prevents implementing "read-and-modify" transactions!
Test case throwing NPE:
@Test
public void testTemplateTransaction() {
redisTemplate.opsForValue().set("foo", "bar");
redisTemplate.multi();
Set keys = redisTemplate.keys("*");
Assert.assertFalse(keys.isEmpty()); // NPE
redisTemplate.exec();
}
Did I get something wrong here? It's too strange :-)
Affects: 1.8 GA (Ingalls)