tikv / pd

Placement driver for TiKV
Apache License 2.0
1.05k stars 720 forks source link

TiFlash replicate progress blocked when there is only 1 TiKV node #2255

Open zhangjinpeng87 opened 4 years ago

zhangjinpeng87 commented 4 years ago

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
  1. What did you expect to see?

    • The TiFlash replica progress stays at 0%.
    • After changed PD's max-replicas from 3 to 1, the progress still 0%.
    • After execute curl -X POST -d '{"group_id":"pd","id":"default","role":"voter","count":1}' http://127.0.0.1:2379/pd/api/v1/config/rule, the replicate progress start to work.
  2. What did you see instead?

  1. What version of PD are you using (pd-server -V)?

Release Version: v4.0.0-beta.1-37-g0ba1160b Git Commit Hash: 0ba1160bf0b5537ce62067643857ce5d191be659 Git Branch: release-4.0 UTC Build Time: 2020-03-11 01:54:01

disksing commented 4 years ago

The TiFlash replicate progress works When there is only one TiKV node.

It is expected behaviour when there is only 1 tikv but the default rule specify 3 voters, because scheduler tries to satisfy rules one by one.

After change max-replicas from 3 to 1, the replicate progress should work

When placement rules feature is enabled, max-replicas does not use any more. I think we can give some error message instead make it work.