Skip to content

Breakdown the "dbms/src/Storages/Transaction" module #4646

@JaySon-Huang

Description

@JaySon-Huang

Enhancement

The codes under "dbms/src/Storages/Transaction" are some codes we adapt TiFlash with TiDB. After years of development, it become kind of crowded and confusing.

Suggest breakdown "dbms/src/Storages/Transaction” into these modules:

  • Some global context for TiFlash management
  • Basic structure from TiDB (TableInfo/DatabaseInfo, etc)
  • Syncing schema with TiDB
  • Decoding data from row to column (Block)
  • Raft layer
    • Region info
    • Handling admin command
    • Handling write command
    • Handling apply snapshot/ingest sst
    • Handling learner read

  1. Suggest creating a dbms/src/TiDB as the module for basic components from TiDB. And
    • Rename TMTContext to TiFlashContext
    • Move TableInfo/DBInfo, etc from TiDB.h to dbms/src/TiDB
    • Move TiFlashContext/ManagedStorages to the dbms/src/TiDB module
    • Add a dbms/src/TiDB/Codec and move the logic of decoding data from row to column there
    • Add a dbms/src/TiDB/Schema and move schema syncing logic there
  2. Rename dbms/src/Transaction to dbms/src/KVStore. And maybe we should further break down the codes for different Raft processes under this module.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions