Skip to content

Disable storage related components run in compute related unit tests. #5782

@ywqzzy

Description

@ywqzzy

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions