-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
Sample code:
Jedis j = new Jedis("host", port);
Transaction t = j.multi();
Response<String> resp = t.get("key");
t.discard();
String data = resp.get();
Such exception got thrown at the last line:
redis.clients.jedis.exceptions.JedisDataException: Please close pipeline or multi block before calling this method.
I see that generateResponse is not called in discard().
Is this expected? The confusing part is that it's the same exception where you forgot to call exec() or even the same when you forgot to sync a pipeline, thus making it hard to handle for a user. Is there any way to handle it better, maybe throwing a different exception saying the transaction got discarded?
Metadata
Metadata
Assignees
Labels
No labels