Common check-and-set transaction workflow.
Section: Transactions and optimistic locking
Optimistic transfer transaction
bash
bash
WATCH account:1
GET account:1
MULTI
DECRBY account:1 50
INCRBY account:2 50
EXECExplanation
In practice, the client should validate account state after GET and before MULTI/EXEC.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Transactions and optimistic locking