Hi everyone,
I am not understanding this exception from the code below.
jedis.watch(key);
String value = jedis.get(key);
Transaction t = jedis.multi();
// do something on value and hm... I change my mind
t.discard();
redis.clients.jedis.exceptions.JedisDataException: ERR DISCARD without MULTI
at redis.clients.jedis.Protocol.processError(Protocol.java:55)
at redis.clients.jedis.Protocol.process(Protocol.java:62)
at redis.clients.jedis.Protocol.read(Protocol.java:127)
at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:162)
at redis.clients.jedis.BinaryTransaction.discard(BinaryTransaction.java:61)
Is this different from
http://redis.io/commands/discard ? Is there any recommendation for a better flow?
Thanks,
-gabe