[ISSUE #8802] Update controller design.md (#8803)

This commit is contained in:
luozongle01
2024-10-10 09:48:30 +08:00
committed by GitHub
parent 95b1c51f86
commit 6c90aace36
4 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -121,13 +121,13 @@ nextTransferFromWhere + size > currentTransferEpochEndOffset,则将 selectMapp
![示意图](../image/controller/controller_design_3.png)
`current state(4byte) + Two flags(4byte) + slaveAddressLength(4byte) + slaveAddress(50byte)`
`current state(4byte) + Two flags(4byte) + slaveBrokerId(8byte)`
- Current state 代表当前的 HAConnectionState,也即 HANDSHAKE。
- Two flags 是两个状态标志位,其中,isSyncFromLastFile 代表是否要从 Master 的最后一个文件开始复制,isAsyncLearner 代表该 Slave 是否是异步复制,并以 Learner 的形式接入 Master。
- slaveAddressLength 与 slaveAddress 代表了该 Slave 的地址,用于后续加入 SyncStateSet 。
- slaveBrokerId 代表了该 Slave 的 brokerId,用于后续加入 SyncStateSet 。
2.AutoSwitchHaConnection (Master) 会向 Slave 回送 HandShake 包,如下:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 68 KiB

+2 -2
View File
@@ -112,13 +112,13 @@ According to the above, we can know the AutoSwitchHaService protocol divides log
![示意图](../image/controller/controller_design_3.png)
`current state(4byte) + Two flags(4byte) + slaveAddressLength(4byte) + slaveAddress(50byte)`
`current state(4byte) + Two flags(4byte) + slaveBrokerId(8byte)`
- `Current state` represents the current HAConnectionState, which is HANDSHAKE.
- Two flags are two status flags, where `isSyncFromLastFile` indicates whether to start copying from the Master's last file, and `isAsyncLearner` indicates whether the Slave is an asynchronous copy and joins the Master as a Learner.
- `slaveAddressLength` and `slaveAddress` represent the address of the Slave, which will be used later to join the SyncStateSet.
- `slaveBrokerId` represent the brokerId of the Slave, which will be used later to join the SyncStateSet.
2.AutoSwitchHaConnection (Master) will send a HandShake packet back to the Slave as follows:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 68 KiB