Skip to content

Refactor TiFlash Proxy #5170

@CalvinNeo

Description

@CalvinNeo

Enhancement

We already have a demo. However, we need to let TiKV aware some engine traits other than RocksEngine, which TiFlash can benefit from.

TiKV side

Support abstraction of new KvEngine on TiKV side.

  1. Support TiKV using different KvEngines tikv/tikv#12849

Proxy side

Implement proxy based on new TiKV(not including cherry-picked TiKV's bugfixes).

  1. Introduce proxy_server and new-mock-engine-store tidb-engine-ext#120
    Introduce engine_tiflash(with compat_new_proxy to disable some features), proxy_server and new-mock-engine-store
    We perform a prelim test in a special branch Introduce proxy_server and new-mock-engine-store #5319
  2. Support on_empty_cmd observer in Proxy tidb-engine-ext#121
  3. Handle destroy peer by observer tidb-engine-ext#132
  4. Support pd task observer to compute store stats for TiFlash tidb-engine-ext#136
  5. Re-enable debug service tidb-engine-ext#131
  6. Avoid set addr/engine-addr/version/git-hash and HackedLockManager in src/node.rs tidb-engine-ext#139
  7. Migrate pre exec tidb-engine-ext#123
  8. Implement Proxy's own status_server tidb-engine-ext#141
  9. Support post_exec on Raftstore Proxy tidb-engine-ext#140
  10. Decouple apply snapshot by introducing pre(post)_apply_snapshot tidb-engine-ext#146
  11. Remove engine store server helper in raftstore tidb-engine-ext#148
  12. Reclaim TiKV's component server and status server tidb-engine-ext#152
  13. Reclaim TiKV's tikv_util crate tidb-engine-ext#154
  14. Add readme for proxy tidb-engine-ext#145
  15. Default enable raft-engine tidb-engine-ext#150
  16. Reuse engine_rocks in engine_tiflash tidb-engine-ext#143
  17. Decouple engine_store_ffi and raftstore tidb-engine-ext#157
  18. Don't write to rockdb when meet empty write batch tidb-engine-ext#159
  19. Use as less engine_rocks in engine_tiflash as we can tidb-engine-ext#156
    In this PR, we explains how to keep trace of engine_rocks from engine_tiflash.
  20. Workaround ci tidb-engine-ext#162
    Fix small bugs of ci tidb-engine-ext#163
  21. Reject when we recv multi file snapshot tidb-engine-ext#165
  22. Support can_apply_snapshot tidb-engine-ext#166
  23. cherry pick tikv#13234 for support customized addr/status_addr tidb-engine-ext#170
  24. Use pre_persist to control persistence tidb-engine-ext#171

After all, we can depend TiKV as a component

  1. Depend TiKV as a component tidb-engine-ext#177

TiFlash side

WE LEAVE OUT TIFLASH's COMMITS SINCE IT REPEATS PROXY's COMMITS

Make TiFlash own the new TiFlash Proxy

  1. Support fn_can_flush_data KVStore: decouple flush region and CompactLog with a new FFI fn_try_flush_data #5283 Introduce new FFIs tidb-engine-ext#119
  2. Make CompactLog do no persistence
  3. Enrich tests test(KVStore): Support Proxy's apply pattern on normal write and compact log #5623

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions