diff --git a/include/dsn/dist/block_service.h b/include/dsn/dist/block_service.h index 7e96b9c35f..2066dd4469 100644 --- a/include/dsn/dist/block_service.h +++ b/include/dsn/dist/block_service.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -9,6 +10,8 @@ namespace dsn { namespace dist { namespace block_service { +DEFINE_THREAD_POOL_CODE(THREAD_POOL_BLOCK_SERVICE) + class block_file; typedef dsn::ref_ptr block_file_ptr; diff --git a/src/block_service/fds/fds_service.cpp b/src/block_service/fds/fds_service.cpp index cf271c982c..e031c68262 100644 --- a/src/block_service/fds/fds_service.cpp +++ b/src/block_service/fds/fds_service.cpp @@ -112,8 +112,7 @@ std::string utils::path_from_fds(const std::string &input, bool /*is_dir*/) return result; } -DEFINE_THREAD_POOL_CODE(THREAD_POOL_FDS_SERVICE) -DEFINE_TASK_CODE(LPC_FDS_CALL, TASK_PRIORITY_COMMON, THREAD_POOL_FDS_SERVICE) +DEFINE_TASK_CODE(LPC_FDS_CALL, TASK_PRIORITY_COMMON, THREAD_POOL_BLOCK_SERVICE) const std::string fds_service::FILE_LENGTH_CUSTOM_KEY = "x-xiaomi-meta-content-length"; const std::string fds_service::FILE_MD5_KEY = "content-md5"; diff --git a/src/block_service/hdfs/hdfs_service.cpp b/src/block_service/hdfs/hdfs_service.cpp index 86354297e9..08fee5ff2e 100644 --- a/src/block_service/hdfs/hdfs_service.cpp +++ b/src/block_service/hdfs/hdfs_service.cpp @@ -34,7 +34,6 @@ namespace dsn { namespace dist { namespace block_service { -DEFINE_THREAD_POOL_CODE(THREAD_POOL_BLOCK_SERVICE) DEFINE_TASK_CODE(LPC_HDFS_SERVICE_CALL, TASK_PRIORITY_COMMON, THREAD_POOL_BLOCK_SERVICE) DSN_DEFINE_uint64("replication", diff --git a/src/block_service/local/local_service.cpp b/src/block_service/local/local_service.cpp index 9120e033fd..003b08e0fd 100644 --- a/src/block_service/local/local_service.cpp +++ b/src/block_service/local/local_service.cpp @@ -17,8 +17,7 @@ namespace dsn { namespace dist { namespace block_service { -DEFINE_THREAD_POOL_CODE(THREAD_POOL_LOCAL_SERVICE) -DEFINE_TASK_CODE(LPC_LOCAL_SERVICE_CALL, TASK_PRIORITY_COMMON, THREAD_POOL_LOCAL_SERVICE) +DEFINE_TASK_CODE(LPC_LOCAL_SERVICE_CALL, TASK_PRIORITY_COMMON, THREAD_POOL_BLOCK_SERVICE) struct file_metadata { diff --git a/src/block_service/test/config-test.ini b/src/block_service/test/config-test.ini index db9622b7a2..a16f7187ef 100644 --- a/src/block_service/test/config-test.ini +++ b/src/block_service/test/config-test.ini @@ -7,7 +7,7 @@ type = replica run = true count = 1 ports = 54321 -pools = THREAD_POOL_DEFAULT,THREAD_POOL_LOCAL_SERVICE,THREAD_POOL_FDS_SERVICE,THREAD_POOL_BLOCK_SERVICE +pools = THREAD_POOL_DEFAULT,THREAD_POOL_BLOCK_SERVICE [core] tool = nativerun @@ -20,9 +20,6 @@ fast_flush = true short_header = false stderr_start_level = LOG_LEVEL_WARNING -[threadpool.THREAD_POOL_FDS_SERVICE] -worker_count = 8 - [fds_concurrent_test] total_files = 64 min_size = 100 diff --git a/src/failure_detector/test/config-test.ini b/src/failure_detector/test/config-test.ini index 40cef5a490..e0ba2472ae 100644 --- a/src/failure_detector/test/config-test.ini +++ b/src/failure_detector/test/config-test.ini @@ -12,7 +12,7 @@ run = true ports = count = 1 delay_seconds = 1 -pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_FDS_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG +pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG [apps.server] type = test @@ -93,7 +93,7 @@ worker_priority = THREAD_xPRIORITY_NORMAL [threadpool.THREAD_POOL_TEST_SERVER] partitioned = false -[threadpool.THREAD_POOL_FDS_SERVICE] +[threadpool.THREAD_POOL_BLOCK_SERVICE] worker_count = 8 [threadpool.THREAD_POOL_DLOCK] diff --git a/src/failure_detector/test/config-whitelist-test-failed.ini b/src/failure_detector/test/config-whitelist-test-failed.ini index b0a53edbb6..eb3c6f7b4c 100644 --- a/src/failure_detector/test/config-whitelist-test-failed.ini +++ b/src/failure_detector/test/config-whitelist-test-failed.ini @@ -12,7 +12,7 @@ run = true ports = count = 1 delay_seconds = 1 -pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_FDS_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG +pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG [apps.server] type = test @@ -94,7 +94,7 @@ worker_priority = THREAD_xPRIORITY_NORMAL [threadpool.THREAD_POOL_TEST_SERVER] partitioned = false -[threadpool.THREAD_POOL_FDS_SERVICE] +[threadpool.THREAD_POOL_BLOCK_SERVICE] worker_count = 8 [threadpool.THREAD_POOL_DLOCK] diff --git a/src/failure_detector/test/config-whitelist-test.ini b/src/failure_detector/test/config-whitelist-test.ini index 838db107c4..82e55e3555 100644 --- a/src/failure_detector/test/config-whitelist-test.ini +++ b/src/failure_detector/test/config-whitelist-test.ini @@ -12,7 +12,7 @@ run = true ports = count = 1 delay_seconds = 1 -pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_FDS_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG +pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG [apps.server] type = test @@ -94,7 +94,7 @@ worker_priority = THREAD_xPRIORITY_NORMAL [threadpool.THREAD_POOL_TEST_SERVER] partitioned = false -[threadpool.THREAD_POOL_FDS_SERVICE] +[threadpool.THREAD_POOL_BLOCK_SERVICE] worker_count = 8 [threadpool.THREAD_POOL_DLOCK] diff --git a/src/meta/test/config-test.ini b/src/meta/test/config-test.ini index b2215bec42..fcf2cf3342 100644 --- a/src/meta/test/config-test.ini +++ b/src/meta/test/config-test.ini @@ -10,7 +10,7 @@ type = test_meta run = true count = 1 ports = 54321 -pools = THREAD_POOL_DEFAULT,THREAD_POOL_META_SERVER,THREAD_POOL_DLOCK,THREAD_POOL_META_STATE,THREAD_POOL_LOCAL_SERVICE,THREAD_POOL_META_TEST +pools = THREAD_POOL_DEFAULT,THREAD_POOL_META_SERVER,THREAD_POOL_DLOCK,THREAD_POOL_META_STATE,THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_META_TEST [core] ;tool = simulator diff --git a/src/meta/test/meta_state/config-test.ini b/src/meta/test/meta_state/config-test.ini index b692830588..ece38dde87 100644 --- a/src/meta/test/meta_state/config-test.ini +++ b/src/meta/test/meta_state/config-test.ini @@ -12,7 +12,7 @@ run = true ports = count = 1 delay_seconds = 1 -pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_FDS_SERVICE +pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE [apps.server] type = test @@ -77,7 +77,7 @@ worker_priority = THREAD_xPRIORITY_NORMAL [threadpool.THREAD_POOL_TEST_SERVER] partitioned = false -[threadpool.THREAD_POOL_FDS_SERVICE] +[threadpool.THREAD_POOL_BLOCK_SERVICE] worker_count = 8 [threadpool.THREAD_POOL_DLOCK] diff --git a/src/replica/bulk_load/test/config-test.ini b/src/replica/bulk_load/test/config-test.ini index c0566d14c4..d23dcbadff 100644 --- a/src/replica/bulk_load/test/config-test.ini +++ b/src/replica/bulk_load/test/config-test.ini @@ -10,7 +10,7 @@ type = replica run = true count = 1 ports = 54321 -pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_LOCAL_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG +pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG [core] ;tool = simulator @@ -58,8 +58,8 @@ worker_count = 3 [threadpool.THREAD_POOL_REPLICATION_LONG] name = replica_long -[threadpool.THREAD_POOL_LOCAL_SERVICE] -name = local_service +[threadpool.THREAD_POOL_BLOCK_SERVICE] +name = block_service worker_count = 1 [task..default] diff --git a/src/zookeeper/test/config-test.ini b/src/zookeeper/test/config-test.ini index 38ede0c257..f51dd74cd7 100644 --- a/src/zookeeper/test/config-test.ini +++ b/src/zookeeper/test/config-test.ini @@ -85,7 +85,7 @@ worker_priority = THREAD_xPRIORITY_NORMAL [threadpool.THREAD_POOL_TEST_SERVER] partitioned = false -[threadpool.THREAD_POOL_FDS_SERVICE] +[threadpool.THREAD_POOL_BLOCK_SERVICE] worker_count = 8 [threadpool.THREAD_POOL_DLOCK]