MULTI, EXEC, DISCARD and WATCH are the foundation of transactions in Redis.
事务保证了什么
They allow the execution of a group of commands in a single step, with two important guarantees(保证):
- 独立性保证
All the commands in a transaction are serialized and executed sequentially.