Redis Transaction
Redis support transactions, but the transaction in redis is different compare to PostgreSQL/MYSQL transaction.
A Redis transaction only guarantee that a batch of commands executes together without other client to cutting in, it doe snot support rollback.
Redis transactions are implemented with four commands: MULTI, EXEC, WATCH, and DISCARD:

- MULTI starts a transaction. Commands sent afterward are not executed immediately; instead, they are placed in a queue.
- You can add any number of commands to the queue. Redis replies QUEUED to indicate each was queued successfully.
- EXEC runs all queued commands in one go, and no commands from other clients can interrupt them in the meantime.
- If you change your mind partway through, DISCARD throws away the entire queue.
- WATCH can monitor certain keys before MULTI. If any of those keys are modified by someone else before EXEC, the whole transaction is aborted.
a PostgreSQL/MySQL transaction that fails halfway through can roll back, but a Redis transaction can’t. If one command in a Redis transaction fails, the remaining commands still run, and the ones that already ran are not undone.