Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initialization of read thread pool. #5724

Merged
merged 4 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dbms/src/Server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1158,9 +1158,10 @@ int Server::main(const std::vector<std::string> & /*args*/)

// Initialize the thread pool of storage before the storage engine is initialized.
LOG_FMT_INFO(log, "dt_enable_read_thread {}", global_context->getSettingsRef().dt_enable_read_thread);
// `DMFileReaderPool` should be destructed after `SegmentReaderPoolManager`.
DM::DMFileReaderPool::instance();
DM::SegmentReaderPoolManager::instance().init(server_info);
DM::SegmentReadTaskScheduler::instance();
DM::DMFileReaderPool::instance();

{
// Note that this must do before initialize schema sync service.
Expand Down
3 changes: 2 additions & 1 deletion dbms/src/TestUtils/gtests_dbms_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ int main(int argc, char ** argv)
DB::tests::TiFlashTestEnv::setupLogger();
DB::tests::TiFlashTestEnv::initializeGlobalContext();
DB::ServerInfo server_info;
// `DMFileReaderPool` should be destructed after `SegmentReaderPoolManager`.
DB::DM::DMFileReaderPool::instance();
DB::DM::SegmentReaderPoolManager::instance().init(server_info);
DB::DM::SegmentReadTaskScheduler::instance();
DB::DM::DMFileReaderPool::instance();

#ifdef FIU_ENABLE
fiu_init(0); // init failpoint
Expand Down