From 5d87f4fa24d3e19973fddc0c061333bb4175998b Mon Sep 17 00:00:00 2001 From: heyuchen Date: Thu, 27 May 2021 17:49:24 +0800 Subject: [PATCH] fix: update bulk load download thread pool --- include/dsn/dist/replication/replication.codes.h | 2 +- src/block_service/block_service_manager.cpp | 2 +- src/replica/bulk_load/replica_bulk_loader.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/dsn/dist/replication/replication.codes.h b/include/dsn/dist/replication/replication.codes.h index 31fdfb19ce..4e63a208c0 100644 --- a/include/dsn/dist/replication/replication.codes.h +++ b/include/dsn/dist/replication/replication.codes.h @@ -73,6 +73,7 @@ MAKE_EVENT_CODE_RPC(RPC_QUERY_DISK_INFO, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_REPLICA_DISK_MIGRATE, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_DETECT_HOTKEY, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_ANALYZE_HOTKEY, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_BACKGROUND_BULK_LOAD, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_BULK_LOAD_INGESTION, TASK_PRIORITY_HIGH) #undef CURRENT_THREAD_POOL @@ -188,7 +189,6 @@ MAKE_EVENT_CODE(LPC_CATCHUP_WITH_PRIVATE_LOGS, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_DISK_STAT, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_BACKGROUND_COLD_BACKUP, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_PARTITION_SPLIT_ASYNC_LEARN, TASK_PRIORITY_COMMON) -MAKE_EVENT_CODE(LPC_BACKGROUND_BULK_LOAD, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_LONG_LOW, TASK_PRIORITY_LOW) MAKE_EVENT_CODE(LPC_REPLICATION_LONG_COMMON, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_LONG_HIGH, TASK_PRIORITY_HIGH) diff --git a/src/block_service/block_service_manager.cpp b/src/block_service/block_service_manager.cpp index db2269e4d8..a82c66dc44 100644 --- a/src/block_service/block_service_manager.cpp +++ b/src/block_service/block_service_manager.cpp @@ -124,7 +124,7 @@ download_block_file_sync(const std::string &local_file_path, block_file *bf, tas return ret; } -// ThreadPool: THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG +// ThreadPool: THREAD_POOL_REPLICATION, THREAD_POOL_DEFAULT error_code block_service_manager::download_file(const std::string &remote_dir, const std::string &local_dir, const std::string &file_name, diff --git a/src/replica/bulk_load/replica_bulk_loader.cpp b/src/replica/bulk_load/replica_bulk_loader.cpp index c4a6e10e37..f6a912b90e 100644 --- a/src/replica/bulk_load/replica_bulk_loader.cpp +++ b/src/replica/bulk_load/replica_bulk_loader.cpp @@ -501,7 +501,7 @@ error_code replica_bulk_loader::parse_bulk_load_metadata(const std::string &fnam return ERR_OK; } -// ThreadPool: THREAD_POOL_REPLICATION_LONG +// ThreadPool: THREAD_POOL_DEFAULT void replica_bulk_loader::update_bulk_load_download_progress(uint64_t file_size, const std::string &file_name) { @@ -531,7 +531,7 @@ void replica_bulk_loader::update_bulk_load_download_progress(uint64_t file_size, get_gpid().thread_hash()); } -// ThreadPool: THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG +// ThreadPool: THREAD_POOL_REPLICATION, THREAD_POOL_DEFAULT void replica_bulk_loader::try_decrease_bulk_load_download_count() { if (!_is_downloading.load()) {