github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/docs/media/scheduling_proto_owner_change.svg (about) 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="681px" preserveAspectRatio="none" style="width:670px;height:681px;background:#FFFFFF;" version="1.1" viewBox="0 0 670 681" width="670px" zoomAndPan="magnify"><defs><filter height="300%" id="f14urjb8y1a2ds" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="132" x2="132" y1="40.2969" y2="637.8203"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="320" x2="320" y1="40.2969" y2="637.8203"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="602" x2="602" y1="40.2969" y2="637.8203"/><rect fill="#FEFECE" filter="url(#f14urjb8y1a2ds)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="77" x="92" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="63" x="99" y="24.9951">Owner_A</text><rect fill="#FEFECE" filter="url(#f14urjb8y1a2ds)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="77" x="92" y="636.8203"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="63" x="99" y="656.8154">Owner_A</text><rect fill="#FEFECE" filter="url(#f14urjb8y1a2ds)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="83" x="277" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="69" x="284" y="24.9951">Processor</text><rect fill="#FEFECE" filter="url(#f14urjb8y1a2ds)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="83" x="277" y="636.8203"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="69" x="284" y="656.8154">Processor</text><rect fill="#FEFECE" filter="url(#f14urjb8y1a2ds)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="77" x="562" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="63" x="569" y="24.9951">Owner_B</text><rect fill="#FEFECE" filter="url(#f14urjb8y1a2ds)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="77" x="562" y="636.8203"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="63" x="569" y="656.8154">Owner_B</text><polygon fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" points="84,55.2969,181,55.2969,191,66.2969,181,78.2969,84,78.2969,74,66.2969,84,55.2969" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="93" x="86" y="71.3638">owner-rev = 1</text><polygon fill="#A80036" points="308.5,100.5625,318.5,104.5625,308.5,108.5625,312.5,104.5625" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="132.5" x2="314.5" y1="104.5625" y2="104.5625"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="9" x="139.5" y="99.4966">1</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="151" x="152.5" y="99.4966">DispatchTable(Table 1)</text><polygon fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" points="274,117.5625,367,117.5625,377,128.5625,367,140.5625,274,140.5625,264,128.5625,274,117.5625" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="89" x="276" y="133.6294">starts Table 1</text><polygon fill="#A80036" points="308.5,162.8281,318.5,166.8281,308.5,170.8281,312.5,166.8281" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="132.5" x2="314.5" y1="166.8281" y2="166.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="9" x="139.5" y="161.7622">2</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="151" x="152.5" y="161.7622">DispatchTable(Table 2)</text><polygon fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" points="274,179.8281,367,179.8281,377,190.8281,367,202.8281,274,202.8281,264,190.8281,274,179.8281" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="89" x="276" y="195.895">starts Table 2</text><polygon fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" points="50,212.9609,214,212.9609,224,231.9609,214,250.9609,50,250.9609,40,231.9609,50,212.9609" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="102" x="52" y="229.0278">abnormal delay</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="160" x="52" y="244.1606">causes Etcd session loss</text><polygon fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" points="554,261.2266,651,261.2266,661,272.2266,651,284.2266,554,284.2266,544,272.2266,554,261.2266" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="93" x="556" y="277.2935">owner-rev = 2</text><polygon fill="#A80036" points="331.5,306.4922,321.5,310.4922,331.5,314.4922,327.5,310.4922" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="325.5" x2="601.5" y1="310.4922" y2="310.4922"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="9" x="337.5" y="305.4263">3</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="167" x="350.5" y="305.4263">Announce(owner-rev = 2)</text><polygon fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" points="237,323.4922,404,323.4922,414,334.4922,404,346.4922,237,346.4922,227,334.4922,237,323.4922" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="163" x="239" y="339.5591">recognizes Owner_B now</text><polygon fill="#A80036" points="590.5,368.7578,600.5,372.7578,590.5,376.7578,594.5,372.7578" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="320.5" x2="596.5" y1="372.7578" y2="372.7578"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="9" x="327.5" y="367.6919">4</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="245" x="340.5" y="367.6919">Sync(Tables 1 and 2 are being added)</text><path d="M5,385.7578 L5,425.7578 L124,425.7578 L124,395.7578 L114,385.7578 L5,385.7578 " fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" style="stroke:#A80036;stroke-width:1.0;"/><path d="M114,385.7578 L114,395.7578 L124,395.7578 L114,385.7578 " fill="#FBFB77" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="66" x="11" y="402.8247">thinking it</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="98" x="11" y="417.9575">was still owner</text><line style="stroke:#A80036;stroke-width:2.0;" x1="302.5" x2="312.5" y1="451.1563" y2="461.1563"/><line style="stroke:#A80036;stroke-width:2.0;" x1="302.5" x2="312.5" y1="461.1563" y2="451.1563"/><line style="stroke:#A80036;stroke-width:1.0;" x1="132.5" x2="307.5" y1="456.1563" y2="456.1563"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="9" x="139.5" y="451.0903">5</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="151" x="152.5" y="451.0903">DispatchTable(Table 3)</text><path d="M325,469.1563 L325,494.1563 L470,494.1563 L470,479.1563 L460,469.1563 L325,469.1563 " fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" style="stroke:#A80036;stroke-width:1.0;"/><path d="M460,469.1563 L460,479.1563 L470,479.1563 L460,469.1563 " fill="#FBFB77" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="124" x="331" y="486.2231">rejects stale owner</text><polygon fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" points="274,508.2891,367,508.2891,377,519.2891,367,531.2891,274,531.2891,264,519.2891,274,508.2891" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="89" x="276" y="524.356">Table 1 ready</text><polygon fill="#A80036" points="590.5,553.5547,600.5,557.5547,590.5,561.5547,594.5,557.5547" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="320.5" x2="596.5" y1="557.5547" y2="557.5547"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="9" x="327.5" y="552.4888">6</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="214" x="340.5" y="552.4888">DispatchTableResponse(Table 1)</text><polygon fill="#FBFB77" filter="url(#f14urjb8y1a2ds)" points="274,570.5547,367,570.5547,377,581.5547,367,593.5547,274,593.5547,264,581.5547,274,570.5547" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="89" x="276" y="586.6216">Table 2 ready</text><polygon fill="#A80036" points="590.5,615.8203,600.5,619.8203,590.5,623.8203,594.5,619.8203" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="320.5" x2="596.5" y1="619.8203" y2="619.8203"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="9" x="327.5" y="614.7544">7</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="214" x="340.5" y="614.7544">DispatchTableResponse(Table 2)</text><!--MD5=[adf296af4c3e2f17581707c0a27ec785] 2 @startuml 3 autonumber 4 5 hnote over Owner_A 6 owner-rev = 1 7 endhnote 8 Owner_A -> Processor: DispatchTable(Table 1) 9 hnote over Processor: starts Table 1 10 Owner_A -> Processor: DispatchTable(Table 2) 11 hnote over Processor: starts Table 2 12 13 hnote over Owner_A 14 abnormal delay 15 causes Etcd session loss 16 endhnote 17 18 hnote over Owner_B 19 owner-rev = 2 20 endhnote 21 Owner_B -> Processor: Announce(owner-rev = 2) 22 23 hnote over Processor 24 recognizes Owner_B now 25 endhnote 26 Processor - -> Owner_B: Sync(Tables 1 and 2 are being added) 27 28 note left Owner_A 29 thinking it 30 was still owner 31 endnote 32 Owner_A ->x Processor: DispatchTable(Table 3) 33 note right Processor: rejects stale owner 34 35 hnote over Processor: Table 1 ready 36 Processor - -> Owner_B: DispatchTableResponse(Table 1) 37 hnote over Processor: Table 2 ready 38 Processor - -> Owner_B: DispatchTableResponse(Table 2) 39 40 @enduml 41 42 PlantUML version 1.2021.11(Sat Oct 02 21:26:11 CST 2021) 43 (GPL source distribution) 44 Java Runtime: OpenJDK Runtime Environment 45 JVM: OpenJDK 64-Bit Server VM 46 Default Encoding: UTF-8 47 Language: en 48 Country: US 49 --></g></svg>