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(learn): avoid learn use DEFAULT_POOL #2126

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
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
2 changes: 0 additions & 2 deletions src/block_service/block_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ namespace dsn {
namespace dist {
namespace block_service {

DEFINE_THREAD_POOL_CODE(THREAD_POOL_BLOCK_SERVICE)

class block_file;
typedef dsn::ref_ptr<block_file> block_file_ptr;

Expand Down
1 change: 1 addition & 0 deletions src/block_service/hdfs/hdfs_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "utils/fmt_logging.h"
#include "utils/safe_strerror_posix.h"
#include "utils/strings.h"
#include "utils/threadpool_code.h"
#include "utils/utils.h"

DSN_DEFINE_uint64(replication,
Expand Down
3 changes: 2 additions & 1 deletion src/block_service/local/local_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
#include <rocksdb/env.h>
#include <memory>
#include <set>
#include <string_view>
#include <type_traits>
#include <utility>

#include <string_view>
#include "local_service.h"
#include "nlohmann/json.hpp"
#include "rocksdb/slice.h"
Expand All @@ -37,6 +37,7 @@
#include "utils/fmt_logging.h"
#include "utils/load_dump_object.h"
#include "utils/strings.h"
#include "utils/threadpool_code.h"

DSN_DECLARE_bool(enable_direct_io);

Expand Down
12 changes: 6 additions & 6 deletions src/nfs/nfs_code_definition.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
namespace dsn {
namespace service {
// define RPC task code for service 'nfs'
DEFINE_TASK_CODE_RPC(RPC_NFS_COPY, TASK_PRIORITY_COMMON, ::dsn::THREAD_POOL_DEFAULT)
DEFINE_TASK_CODE_RPC(RPC_NFS_GET_FILE_SIZE, TASK_PRIORITY_COMMON, ::dsn::THREAD_POOL_DEFAULT)
DEFINE_TASK_CODE_RPC(RPC_NFS_COPY, TASK_PRIORITY_COMMON, ::dsn::THREAD_POOL_BLOCK_SERVICE)
ruojieranyishen marked this conversation as resolved.
Show resolved Hide resolved
DEFINE_TASK_CODE_RPC(RPC_NFS_GET_FILE_SIZE, TASK_PRIORITY_COMMON, ::dsn::THREAD_POOL_BLOCK_SERVICE)
// test timer task code
DEFINE_TASK_CODE(LPC_NFS_REQUEST_TIMER, TASK_PRIORITY_COMMON, ::dsn::THREAD_POOL_DEFAULT)

DEFINE_TASK_CODE_AIO(LPC_NFS_READ, TASK_PRIORITY_COMMON, THREAD_POOL_DEFAULT)
DEFINE_TASK_CODE(LPC_NFS_FILE_CLOSE_TIMER, TASK_PRIORITY_COMMON, THREAD_POOL_DEFAULT)
DEFINE_TASK_CODE_AIO(LPC_NFS_READ, TASK_PRIORITY_COMMON, ::dsn::THREAD_POOL_BLOCK_SERVICE)
DEFINE_TASK_CODE(LPC_NFS_FILE_CLOSE_TIMER, TASK_PRIORITY_COMMON, ::dsn::THREAD_POOL_DEFAULT)

DEFINE_TASK_CODE_AIO(LPC_NFS_WRITE, TASK_PRIORITY_COMMON, THREAD_POOL_DEFAULT)
DEFINE_TASK_CODE_AIO(LPC_NFS_WRITE, TASK_PRIORITY_COMMON, ::dsn::THREAD_POOL_BLOCK_SERVICE)

DEFINE_TASK_CODE_AIO(LPC_NFS_COPY_FILE, TASK_PRIORITY_COMMON, THREAD_POOL_DEFAULT)
DEFINE_TASK_CODE_AIO(LPC_NFS_COPY_FILE, TASK_PRIORITY_COMMON, ::dsn::THREAD_POOL_BLOCK_SERVICE)
} // namespace service
} // namespace dsn
1 change: 1 addition & 0 deletions src/utils/threadpool_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class threadpool_code

DEFINE_THREAD_POOL_CODE(THREAD_POOL_INVALID)
DEFINE_THREAD_POOL_CODE(THREAD_POOL_DEFAULT)
DEFINE_THREAD_POOL_CODE(THREAD_POOL_BLOCK_SERVICE)
} // namespace dsn

USER_DEFINED_STRUCTURE_FORMATTER(::dsn::threadpool_code);
Loading