github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/docs/scheduling_proto_owner_change.puml (about) 1 @startuml 2 autonumber 3 4 hnote over Owner_A 5 owner-rev = 1 6 endhnote 7 Owner_A -> Processor: DispatchTable(Table 1) 8 hnote over Processor: starts Table 1 9 Owner_A -> Processor: DispatchTable(Table 2) 10 hnote over Processor: starts Table 2 11 12 hnote over Owner_A 13 abnormal delay 14 causes Etcd session loss 15 endhnote 16 17 hnote over Owner_B 18 owner-rev = 2 19 endhnote 20 Owner_B -> Processor: Announce(owner-rev = 2) 21 22 hnote over Processor 23 recognizes Owner_B now 24 endhnote 25 Processor --> Owner_B: Sync(Tables 1 and 2 are being added) 26 27 note left Owner_A 28 thinking it 29 was still owner 30 endnote 31 Owner_A ->x Processor: DispatchTable(Table 3) 32 note right Processor: rejects stale owner 33 34 hnote over Processor: Table 1 ready 35 Processor --> Owner_B: DispatchTableResponse(Table 1) 36 hnote over Processor: Table 2 ready 37 Processor --> Owner_B: DispatchTableResponse(Table 2) 38 39 @enduml