An example of A transfer 10 yuan to B.
Before transaction
- A: 10
- B: 10
sequenceDiagram
autonumber
participant E as Excute Engine
E -->>+ Disk: Read data of A;
Disk -->>- E: data of A;
E -->>+ UndoLog: Write and flush Undolog of A;
UndoLog -->>- E: Undolog flushed;
E -->>+ Bufferpool: Modify A to 0;
Bufferpool -->>-E: Modified;
E -->>+ RedoLog: Write RedoLog buffer of A;
RedoLog -->>-E: RedoLog written;
E -->>+ Disk: Read data of B;
Disk -->>-E: data of B;
E -->>+ UndoLog: Write and flush Undolog of B;
UndoLog -->>-E: Undolog flushed;
E -->>+ Bufferpool: Modify B to 20;
Bufferpool -->>-E: Modified;
E -->>+ RedoLog: Write RedoLog buffer of B;
RedoLog -->>-E: RedoLog written;
E -->>+ RedoLog: Prepare commit;
RedoLog -->>-E: Prepared;
E -->>+ Bufferpool: Prepare commit;
Bufferpool -->>-E: Prepared;
E -->>+Binlog: Write and flush binlog;
Binlog -->>-E: Binlog flushed;
E -->>+Bufferpool: Flush data;
Bufferpool -->>-E: flushed;
E -->>+UndoLog: Flush data;
UndoLog -->>-E: flushed;
E -->>+ RedoLog: Commit;
RedoLog -->>-E: Commited;