How does zookeeper ensure the sequential consistency of transactions?

How does zookeeper ensure the sequential consistency of transactions?

Zookeeper uses a globally increasing transaction Id to identify,
all proposals (proposals) are added with
zxid when they are proposed , zxid is actually a 64-bit number

The upper 32 bits are epoch (period; epoch; world; new era)
used to identify the leader cycle. If a new leader is generated, the epoch will increase automatically.

The lower 32 bits are used to count up. When a new proposal is generated, it
will first issue a transaction execution request to other servers according to the two-stage process of the database.
If more than half of the machines
can execute and succeed, then it will start execution.

Guess you like

Origin blog.csdn.net/m0_51684972/article/details/111520683