Disable storage related components run in compute related unit tests.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
Enhancement
Currently TiFlash Compute engine's unit tests relay on TiFlashTestEnv::global_context to initialize the context that will be used in the test.
But in TiFlashTestEnv::global_context, we have initialized some components only related to storage layer.
And in gtests_dbms, we have also initialized some storage components.
DB::ServerInfo server_info;
// `DMFileReaderPool` should be constructed before and destructed after `SegmentReaderPoolManager`.
DB::DM::DMFileReaderPool::instance();
DB::DM::SegmentReaderPoolManager::instance().init(server_info);
DB::DM::SegmentReadTaskScheduler::instance();
As a result, the UT will start extra threads using BackgroundProcessingPool , SegmentReaderPool, DMFileReaderPool etc.
We want to separate the init procedure of Compute Layer UT and Storage Layer UT in order to make the test process cleaner.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing TiFlashTestEnv::global_context and the storage initialization in gtests_dbms, including DMFileReaderPool, SegmentReaderPoolManager, and SegmentReadTaskScheduler. Separate compute-layer and storage-layer unit-test initialization so compute tests no longer start unnecessary BackgroundProcessingPool, SegmentReaderPool, or DMFileReaderPool threads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100