0
votes

I'm using Jedis and I'd like to create a single Pipeline which contains multiple independent transactions (multi/exec blocks).

From what I've seen so far, it seems that is only possible to toggle a whole Pipeline into an atomic Transaction.

Pipeline pipeline = jedis.pipelined();
pipeline.multi(); // Does not return a Jedis Transaction
// From there, everything done on Pipeline is in a single transaction.

I would have expected pipeline.multi() to return a Transaction.

I suspect that having the whole pipeline in a single transaction is going to cost more than having multiple smaller transaction blocks in a single pipeline.

Is this something that is supported by Redis? If yes, is this something that can be done using Jedis?

Thanks!

1

1 Answers

0
votes

After doing some more tests and digging, it appears that I can call pipeline.multi() and pipeline.exec() more than once and thus create multiple transactional blocks.