tikv / client-c

The C++ TiKV client used by TiFlash.
Apache License 2.0
40 stars 48 forks source link

support mpp_prober to detect tiflash aliveness #131

Closed guo-shaoge closed 1 year ago

guo-shaoge commented 1 year ago

Basically same as https://github.com/pingcap/tidb/blob/master/store/copr/mpp_probe.go

  1. MPPProber record all failed stores, and will check if alive in background.
  2. Caller first check if in MPPProber.failed_stores, if true, then ignore this failed store, otherwise send alive rpc to do real detect.
  3. For now, thread pool only has one thread. Will add another background thread to refresh region cache later.
  4. test case will be add in endless later, only manually test for now.