Home > Database > Redis > Is redis atomic?

Is redis atomic?

藏色散人
Release: 2019-06-11 11:34:22
Original
4388 people have browsed it

Is redis atomic?

Atomicity: A transaction is an indivisible minimum unit of work that either succeeds or fails.

Atomic operation means that one of your business logic must be indivisible. For example, if you transfer money to others, your account will deduct money, and other people's account will add money, this business logic is atomic, this Operations are atomic operations, either all succeed or all fail.

Is redis atomic?

The execution of all single commands in Redis is atomic.

The principle of redis transaction implementation

1. Batch operations are put into the queue cache before sending the EXEC command

2. Received Enter transaction execution after the EXEC command. If any command in the transaction fails to execute, the remaining commands will not be executed.

3. During the transaction execution process, command requests submitted by other clients will not be inserted into the transaction execution command sequence. Recommended in

: "redis video tutorial"

The above is the detailed content of Is redis atomic?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template