From aa616ee4049a41b3804b5160798521d674e90cc1 Mon Sep 17 00:00:00 2001 From: Rapiz Date: Fri, 5 Feb 2021 13:14:39 +0800 Subject: [PATCH] Update project3-MultiRaftKV.md (#250) --- doc/project3-MultiRaftKV.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/project3-MultiRaftKV.md b/doc/project3-MultiRaftKV.md index c7de6370..45d386a8 100644 --- a/doc/project3-MultiRaftKV.md +++ b/doc/project3-MultiRaftKV.md @@ -92,7 +92,7 @@ Let’s take a relook at Region definition, it includes two fields `start_key` a `kv/raftstore/runner/split_check.go`. The split key will be wrapped as a `MsgSplitRegion` handled by `onPrepareSplitRegion()`. To make sure the ids of the newly created Region and Peers are unique, the ids are allocated by the scheduler. It’s also provided, so you don’t have to implement it. -`onPrepareSplitRegion()` actually schedules a task for the pd worker to ask the scheduler for the ids. And make a split admin command after receiving the response from scheduler, see `onAskBatchSplit()` in `kv/raftstore/runner/pd_task.go`. +`onPrepareSplitRegion()` actually schedules a task for the pd worker to ask the scheduler for the ids. And make a split admin command after receiving the response from scheduler, see `onAskSplit()` in `kv/raftstore/runner/scheduler_task.go`. So your task is to implement the process of handling split admin command, just like conf change does. The provided framework supports multiple raft, see `kv/raftstore/router.go`. When a Region splits into two Regions, one of the Regions will inherit the metadata before splitting and just modify its Range and RegionEpoch while the other will create relevant meta information.