github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/framework/doc/create_worker.puml (about) 1 @startuml 2 start 3 :baseMaster.CreateWorker(...); 4 repeat 5 if (retry limit reached) then (yes) 6 :return err; 7 stop 8 endif 9 :requestID = uuid.New(); 10 :err := PreDispatchTask(requestID, workerID); 11 if (isRetryable(err)) then (true) 12 :return err; 13 stop 14 endif 15 backward:backoff; 16 repeat while(err != nil) is (false) not (true) 17 18 :err := ConfirmDispatchTask(requestID, workerID); 19 if (isFatal(err)) then (true) 20 note right 21 "isFatal" means the operation has failed 22 preconditions and is never completed 23 end note 24 :return err; 25 stop 26 else (false) 27 endif 28 :wait for heartbeat; 29 stop 30 31 @enduml