3 ms·
Is it possible to use a script to roll back redis transactions. Currently transactions aren't like SQL transactions in that they don't roll back if there is a p
by dmmalam 15y ago
Is it possible to use a script to roll back redis transactions. Currently transactions aren't like SQL transactions in that they don't roll back if there is a problem executing the commands between the multi/exec.
Say if I add a new hash, and also increment a counter, and update a set to track a relation. I currently do this within a multi/exec to ensure it's atomic. It would be nice to roll back the commands, if say there was an internal error between the exec/multi or if there was an external event like losing a disk / bouncing the server by possibly writing to the AOF log.
Out of interest, how do people deal with this now?