conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleRequest</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_Tso</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleTso</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_AllocId</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleAllocID</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_Bootstrap</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleBootstrap</span>
Server::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">bootstrapCluster</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">clientv3执行put操作:<span style="color:#008000;font-weight:bold;">路径/pd/raft, value:</span><span style="font-size: 9pt; background-color: rgb(228, 228, 255);">Cluster</span></pre>
<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">clientv3执行put操作:</span>路径/pd/raft/s/{id},value:<font color="#000000" face="Menlo"><span style="font-size: 12px; background-color: rgb(228, 228, 255);">Store</span></font>
<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">clientv3执行put操作:</span>路径/pd/raft/r/{id},value:<font color="#000000" face="Menlo"><span style="font-size: 12px; background-color: rgb(228, 228, 255);">Region</span></font>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">RaftCluster.start,启动集群</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">coordinator.run</span></pre>
coordinator::addScheduler
newLeaderScheduleController
newLeaderBalancer
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">Scheduler</span></pre>
<div>newLeaderBalancer</div>
leaderBalancer
GetName
GetResourceKind
Schedule
scheduleLeader::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">Schedule</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">scheduleLeader</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">source的</span>leaderRatio和target的leaderRatio比较</pre>
如果触发平衡策略,<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">newTransferLeader</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">newTransferLeaderOperator</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">newRegionOperator</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">Controller</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">newLeaderController</span></pre>
leaderController
Ctx
Stop
GetInterval
AllowSchedule
coordinator::runScheduler
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">Schedule</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">addOperator</span></pre>
保存到<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">operators,分资源,分region保存id</span>
coordinator::addScheduler
newStorageScheduleController
newStorageBalancer
<pre style="font-family: Menlo; font-size: 9pt; color: rgb(0, 0, 0);"><span style="background-color: rgb(228, 228, 255);">Scheduler</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">newStorageBalancer</span></pre>
storageBalancer
GetName
GetResourceKind
Schedule
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">newStorageBalancer::</span>Schedule</pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">scheduleStorage</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">source的storageRatio和target的storageRatio比较</pre>
如果触发平衡策略,<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">newTransferPeer</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">newAddPeerOperator</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">newRemovePeerOperator</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">newRegionOperator</span></pre>
<pre style="font-family: Menlo; font-size: 9pt; color: rgb(0, 0, 0);"><span style="background-color: rgb(228, 228, 255);">Controller</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">newStorageController</span></pre>
storageController
Ctx
Stop
GetInterval
AllowSchedule
coordinator::runScheduler
协程:<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">RaftCluster::</span><span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">runBackgroundJobs</span><br>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">RaftCluster::<span style="background-color:#e4e4ff;">checkStores</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">RaftCluster::<span style="background-color:#e4e4ff;">collectMetrics</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_IsBootstrapped</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleIsBootstrapped</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_GetStore</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleGetStore</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_PutStore</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handlePutStore</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_AskSplit</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleAskSplit</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_ReportSplit</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleReportSplit</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_GetRegion</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleGetRegion</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_GetRegionByID</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleGetRegionByID</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_RegionHeartbeat</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleRegionHeartbeat</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">RaftCluster.</span>clusterInfo::handleRegionHeartbeat</pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">RaftCluster::</span>handleRegionHeartbeat</pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">coordinator::</span>dispatch</pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">coordinator::<span style="background-color:#e4e4ff;">getOperator</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">regionOperator::Do</span></pre>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_StoreHeartbeat</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleStoreHeartbeat</span>
子主题
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_GetClusterConfig</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleGetClusterConfig</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_PutClusterConfig</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handlePutClusterConfig</span>
<pre style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;"><span style="background-color:#e4e4ff;">pdpb</span>.<span style="color:#660e7a;font-weight:bold;font-style:italic;">CommandType_GetPDMembers</span></pre>
conn::<span style="background-color: rgb(228, 228, 255); color: rgb(0, 0, 0); font-family: Menlo; font-size: 9pt;">handleGetPDMembers</span>