empiredan commented on code in PR #2126:
URL: 
https://github.com/apache/incubator-pegasus/pull/2126#discussion_r2043932227


##########
src/nfs/nfs_code_definition.h:
##########
@@ -24,21 +24,20 @@
  * THE SOFTWARE.
  */
 
+#include "task/task_code.h"
 #pragma once
 
-namespace dsn {
-namespace service {
+namespace dsn::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)
+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)
-} // namespace service
-} // namespace dsn
+DEFINE_TASK_CODE_AIO(LPC_NFS_COPY_FILE, TASK_PRIORITY_COMMON, 
::dsn::THREAD_POOL_BLOCK_SERVICE)
+} // namespace dsn::service

Review Comment:
   Keep a newline at end of file.



##########
src/nfs/test/config.ini:
##########
@@ -40,3 +40,13 @@ tool = nativerun
 pause_on_start = false
 logging_start_level = LOG_LEVEL_DEBUG
 logging_factory_name = dsn::tools::simple_logger
+
+[threadpool..default]
+worker_count = 2
+worker_priority = THREAD_xPRIORITY_LOWEST
+
+[threadpool.THREAD_POOL_BLOCK_SERVICE]
+  name = block_service
+  partitioned = false
+  worker_priority = THREAD_xPRIORITY_NORMAL
+  worker_count = 1

Review Comment:
   Is only one thread enough for the test ?



##########
src/nfs/test/config.ini:
##########
@@ -40,3 +40,13 @@ tool = nativerun
 pause_on_start = false
 logging_start_level = LOG_LEVEL_DEBUG
 logging_factory_name = dsn::tools::simple_logger
+
+[threadpool..default]
+worker_count = 2
+worker_priority = THREAD_xPRIORITY_LOWEST
+
+[threadpool.THREAD_POOL_BLOCK_SERVICE]
+  name = block_service
+  partitioned = false
+  worker_priority = THREAD_xPRIORITY_NORMAL
+  worker_count = 1

Review Comment:
   Keep a newline at end of file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to