Redis cannot guarantee consistency Redis transactions do not support rollback, because its function is only for efficient reading of data, not data storage. The watch command can add optimistic locking to the specified key. During transaction execution and before exec is submitted, if other sessions change the key, the transaction will fail.
For details, please refer to: http://m.blog.csdn.net/article/details?i...
Redis cannot guarantee consistency
Redis transactions do not support rollback, because its function is only for efficient reading of data, not data storage.
The watch command can add optimistic locking to the specified key. During transaction execution and before exec is submitted, if other sessions change the key, the transaction will fail.
For details, please refer to: http://m.blog.csdn.net/article/details?i...
Single process, so it is atomic, but rollback is another concept. .