Confusion about TestReplacePendingRegion3C for TinyKV Project3C

When implementing Project3C for TinyKV, I have some doubts about TestReplacePendingRegion3C. According to the testcase and corresponding comments, the scheduler is expected to select store4 as target. However, I believe store2 has smaller region size in the given testcase(store4 is assigned 10 regions while store2 is given 7). I wonder if there is metrics other than region size should be taken into consideration when selecting target store for rebalancing in Project3C?

That’s because the pending peer is in region 3, whose peers are on store 2, 1, and 3. The scheduler shouldn’t place two peers in the same store, so the only choice is 4.

Oops, the comment of these codes seem a little misleading. Sorry :sweat_smile: .

It makes sense. Thanks a lot.