Is there a way in redis to make all commands in a ‘multi’ transaction fail if one command fails.
eg.
<?php
//using phpredis
//connection made
$redis->set('c', 1);
$res = $redis->multi()
->get( 'b' )
->get( 'c' )
->exec();
?>
$res would contain 1, false.
Is there a way in redis to make $res return false and have the transaction fail if one of the commands fail?
From redis docs on transactions:
According to this article it seems that redis transactions covers ACID semantics only partially and there is no equivalent of rollback although discard commmand can be used to abort the transaction.