tikv / client-c

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

support choosing non-pending tiflash peer when buildBatchCopTask #144

Closed guo-shaoge closed 1 year ago

guo-shaoge commented 1 year ago

issue: https://github.com/pingcap/tiflash/issues/7301

Before: Task can dispatch to store whose region is still pending. After: Try not to dispatch task to pending store.

What's changed:

  1. Change function declaration of getRegionByKey() and getRegionByID(), return whole response instead of only region info.
  2. Record pending store of region in region cache.
  3. Try dispatch task to non_pending_store of region when buildBatchCopTasks.
gengliqi commented 1 year ago

/merge