From 5a49df8d69ada0711dcced42d8828a889c7d984d Mon Sep 17 00:00:00 2001 From: Yingchun Lai Date: Sat, 14 Sep 2024 11:27:10 +0800 Subject: [PATCH] refactor(task): Move task out of runtime --- .github/workflows/lint_and_test_cpp.yaml | 3 + .licenserc.yaml | 274 +++++++++--------- build_tools/recompile_thrift.sh | 2 +- src/CMakeLists.txt | 1 + src/aio/aio_task.cpp | 8 +- src/aio/aio_task.h | 4 +- src/aio/disk_engine.cpp | 6 +- src/aio/file_io.h | 6 +- src/aio/native_linux_aio_provider.cpp | 2 +- src/aio/test/aio.cpp | 2 +- src/block_service/block_service.h | 6 +- src/block_service/block_service_manager.cpp | 4 +- src/block_service/hdfs/hdfs_service.cpp | 4 +- src/block_service/hdfs/hdfs_service.h | 4 +- src/block_service/local/local_service.cpp | 2 +- src/block_service/local/local_service.h | 4 +- src/block_service/test/hdfs_service_test.cpp | 8 +- src/client/partition_resolver.cpp | 2 +- src/client/partition_resolver.h | 6 +- src/client/partition_resolver_simple.cpp | 6 +- src/client/partition_resolver_simple.h | 4 +- src/client/replication_ddl_client.h | 8 +- src/client/test/ddl_client_test.cpp | 2 +- src/client_lib/pegasus_client_impl.cpp | 4 +- src/common/json_helper.h | 2 +- src/common/replication.codes.h | 2 +- src/common/replication_common.h | 4 +- src/common/storage_serverlet.h | 2 +- src/failure_detector/failure_detector.cpp | 4 +- src/failure_detector/failure_detector.h | 7 +- src/failure_detector/fd.client.h | 2 +- src/failure_detector/fd.code.definition.h | 4 +- .../test/failure_detector.cpp | 6 +- src/geo/lib/geo_client.h | 2 +- src/http/http_message_parser.h | 2 +- src/http/http_server.h | 2 +- src/include/rrdb/rrdb.client.h | 5 +- src/meta/backup_engine.cpp | 8 +- src/meta/backup_engine.h | 2 +- src/meta/distributed_lock_service_simple.cpp | 2 +- src/meta/distributed_lock_service_simple.h | 8 +- src/meta/dump_file.h | 2 +- .../duplication/meta_duplication_service.cpp | 2 +- src/meta/meta_backup_service.cpp | 4 +- src/meta/meta_backup_service.h | 4 +- src/meta/meta_bulk_load_service.cpp | 6 +- src/meta/meta_bulk_load_service.h | 3 +- src/meta/meta_data.h | 2 +- src/meta/meta_server_failure_detector.cpp | 2 +- src/meta/meta_server_failure_detector.h | 3 +- src/meta/meta_service.cpp | 2 +- src/meta/meta_service.h | 9 +- src/meta/meta_split_service.cpp | 2 +- src/meta/meta_split_service.h | 2 +- src/meta/meta_state_service.h | 6 +- src/meta/meta_state_service_simple.cpp | 4 +- src/meta/meta_state_service_simple.h | 10 +- src/meta/meta_state_service_zookeeper.h | 8 +- src/meta/server_state.cpp | 7 +- src/meta/server_state.h | 4 +- src/meta/server_state_restore.cpp | 4 +- src/meta/test/backup_test.cpp | 6 +- src/meta/test/main.cpp | 2 +- src/meta/test/meta_app_operation_test.cpp | 2 +- src/meta/test/meta_http_service_test.cpp | 4 +- .../test/meta_partition_guardian_test.cpp | 4 +- src/meta/test/meta_service_test_app.h | 6 +- .../test/meta_state/meta_state_service.cpp | 2 +- .../test/meta_state_service_utils_test.cpp | 2 +- src/meta/test/meta_test_base.cpp | 2 +- src/meta/test/state_sync_test.cpp | 2 +- src/meta/test/update_configuration_test.cpp | 4 +- src/nfs/nfs_client_impl.h | 7 +- src/nfs/nfs_node.h | 2 +- src/nfs/nfs_server_impl.cpp | 2 +- src/nfs/nfs_server_impl.h | 4 +- src/nfs/test/main.cpp | 2 +- src/perf_counter/perf_counters.cpp | 2 +- src/ranger/ranger_resource_policy_manager.cpp | 6 +- src/ranger/ranger_resource_policy_manager.h | 2 +- .../ranger_resource_policy_manager_test.cpp | 2 +- src/redis_protocol/proxy_lib/proxy_layer.cpp | 2 +- src/redis_protocol/proxy_lib/proxy_layer.h | 2 +- .../proxy_ut/redis_proxy_test.cpp | 2 +- src/remote_cmd/remote_command.cpp | 6 +- src/remote_cmd/remote_command.h | 2 +- src/replica/backup/cold_backup_context.cpp | 2 +- src/replica/backup/replica_backup_manager.cpp | 2 +- src/replica/backup/replica_backup_manager.h | 2 +- src/replica/bulk_load/replica_bulk_loader.cpp | 2 +- src/replica/bulk_load/replica_bulk_loader.h | 2 +- .../test/replica_bulk_loader_test.cpp | 2 +- .../duplication/duplication_sync_timer.cpp | 4 +- .../duplication/duplication_sync_timer.h | 2 +- src/replica/duplication/mutation_batch.cpp | 4 +- .../duplication/replica_duplicator.cpp | 2 +- src/replica/duplication/replica_duplicator.h | 2 +- src/replica/duplication/replica_follower.cpp | 2 +- src/replica/duplication/replica_follower.h | 3 +- .../test/load_from_private_log_test.cpp | 6 +- .../duplication/test/mutation_batch_test.cpp | 2 +- .../test/replica_duplicator_test.cpp | 2 +- .../test/replica_follower_test.cpp | 2 +- src/replica/log_file.h | 2 +- src/replica/mutation.cpp | 2 +- src/replica/mutation.h | 7 +- src/replica/mutation_log.h | 6 +- src/replica/replica.h | 4 +- src/replica/replica_2pc.cpp | 8 +- src/replica/replica_backup.cpp | 2 +- src/replica/replica_check.cpp | 4 +- src/replica/replica_chkpt.cpp | 4 +- src/replica/replica_config.cpp | 4 +- src/replica/replica_context.h | 2 +- src/replica/replica_disk_migrator.cpp | 2 +- src/replica/replica_disk_migrator.h | 2 +- src/replica/replica_init.cpp | 4 +- src/replica/replica_learn.cpp | 4 +- src/replica/replica_restore.cpp | 8 +- src/replica/replica_stub.cpp | 2 +- src/replica/replica_stub.h | 6 +- src/replica/replica_throttle.cpp | 2 +- src/replica/replication_app_base.cpp | 6 +- src/replica/split/replica_split_manager.cpp | 4 +- src/replica/split/test/replica_split_test.cpp | 4 +- .../storage/simple_kv/simple_kv.client.h | 8 +- src/replica/storage/simple_kv/test/case.cpp | 4 +- src/replica/storage/simple_kv/test/client.cpp | 4 +- src/replica/storage/simple_kv/test/client.h | 2 +- .../storage/simple_kv/test/injector.cpp | 4 +- src/replica/test/backup_block_service_mock.h | 4 +- src/replica/test/mutation_log_learn_test.cpp | 2 +- src/replica/test/open_replica_test.cpp | 2 +- .../test/replica_disk_migrate_test.cpp | 4 +- src/replica/test/replica_test.cpp | 6 +- src/rpc/asio_net_provider.cpp | 4 +- src/rpc/asio_net_provider.h | 2 +- src/rpc/dsn_message_parser.cpp | 4 +- src/rpc/message_parser.cpp | 2 +- src/rpc/message_parser.h | 2 +- src/rpc/network.cpp | 8 +- src/rpc/network.h | 2 +- src/rpc/network.sim.cpp | 2 +- src/rpc/network.sim.h | 2 +- src/rpc/raw_message_parser.cpp | 4 +- src/rpc/raw_message_parser.h | 2 +- src/rpc/rpc_engine.h | 6 +- src/rpc/rpc_holder.h | 10 +- src/rpc/rpc_message.h | 4 +- src/rpc/rpc_stream.h | 2 +- src/rpc/rpc_task.cpp | 10 +- src/rpc/test/corrupt_message_test.cpp | 4 +- src/rpc/test/host_port_test.cpp | 8 +- src/rpc/test/net_provider_test.cpp | 6 +- src/rpc/test/rpc_message_test.cpp | 7 +- src/rpc/test/rpc_test.cpp | 4 +- src/rpc/test/thrift_message_parser_test.cpp | 4 +- src/rpc/thrift_message_parser.h | 2 +- src/runtime/CMakeLists.txt | 4 +- src/runtime/api_layer1.h | 4 +- src/runtime/api_task.h | 2 +- src/runtime/env.sim.cpp | 2 +- src/runtime/fault_injector.cpp | 6 +- src/runtime/global_config.cpp | 2 +- src/runtime/global_config.h | 2 +- src/runtime/message_utils.h | 4 +- src/runtime/nativerun.cpp | 2 +- src/runtime/pipeline.h | 6 +- src/runtime/profiler.cpp | 11 +- src/runtime/providers.common.cpp | 12 +- src/runtime/scheduler.cpp | 6 +- src/runtime/scheduler.h | 4 +- src/runtime/service_api_c.cpp | 10 +- src/runtime/service_app.h | 2 +- src/runtime/service_engine.cpp | 8 +- src/runtime/service_engine.h | 2 +- src/runtime/simulator.cpp | 4 +- src/runtime/test/config-test-sim.ini | 10 +- src/runtime/test/config-test.ini | 16 +- src/runtime/test/pipeline_test.cpp | 2 +- src/runtime/test/service_api_c.cpp | 5 +- src/runtime/test/sim_lock.cpp | 4 +- src/runtime/test_utils.h | 31 +- src/runtime/tool_api.cpp | 7 +- src/runtime/tool_api.h | 11 +- src/runtime/tracer.cpp | 8 +- src/security/meta_access_controller.cpp | 4 +- src/security/negotiation_manager.cpp | 2 +- .../test/meta_access_controller_test.cpp | 2 +- .../test/negotiation_manager_test.cpp | 2 +- src/server/available_detector.cpp | 4 +- src/server/available_detector.h | 4 +- src/server/info_collector.cpp | 4 +- src/server/info_collector.h | 5 +- src/server/pegasus_manual_compact_service.cpp | 4 +- src/server/pegasus_mutation_duplicator.h | 4 +- src/server/pegasus_server_impl.cpp | 4 +- src/server/pegasus_server_impl.h | 4 +- src/server/pegasus_server_write.h | 2 +- src/server/pegasus_write_service.cpp | 4 +- src/server/result_writer.cpp | 4 +- src/server/result_writer.h | 2 +- src/server/test/hotkey_collector_test.cpp | 8 +- .../test/pegasus_write_service_test.cpp | 4 +- src/shell/command_helper.h | 2 +- src/shell/commands/bulk_load.cpp | 2 +- src/shell/commands/data_operations.cpp | 2 +- src/shell/commands/debugger.cpp | 6 +- src/{runtime => }/task/CMakeLists.txt | 17 +- src/{runtime => }/task/async_calls.h | 6 +- src/{runtime => }/task/future_types.h | 0 src/{runtime => }/task/hpc_task_queue.cpp | 8 +- src/{runtime => }/task/hpc_task_queue.h | 4 +- src/{runtime => }/task/simple_task_queue.cpp | 10 +- src/{runtime => }/task/simple_task_queue.h | 6 +- src/{runtime => }/task/task.cpp | 7 +- src/{runtime => }/task/task.h | 6 +- src/{runtime => }/task/task_code.cpp | 0 src/{runtime => }/task/task_code.h | 0 src/{runtime => }/task/task_engine.cpp | 13 +- src/{runtime => }/task/task_engine.h | 2 +- src/{runtime => }/task/task_engine.sim.cpp | 4 +- src/{runtime => }/task/task_engine.sim.h | 0 src/{runtime => }/task/task_queue.cpp | 5 +- src/{runtime => }/task/task_queue.h | 0 src/{runtime => }/task/task_spec.cpp | 1 + src/{runtime => }/task/task_spec.h | 2 +- src/{runtime => }/task/task_tracker.cpp | 0 src/{runtime => }/task/task_tracker.h | 0 src/{runtime => }/task/task_worker.cpp | 8 +- src/{runtime => }/task/task_worker.h | 0 src/task/tests/CMakeLists.txt | 32 ++ .../tests/async_call_test.cpp} | 17 +- src/task/tests/config-test-sim.ini | 38 +++ src/task/tests/config-test.ini | 52 ++++ .../test/lpc.cpp => task/tests/lpc_test.cpp} | 8 +- src/task/tests/main.cpp | 43 +++ src/task/tests/run.sh | 47 +++ .../tests/task_engine_test.cpp} | 12 +- .../test => task/tests}/task_test.cpp | 8 +- src/{runtime => }/task/timer_service.h | 0 src/test/function_test/base_api/test_copy.cpp | 2 +- src/test/kill_test/partition_kill_testor.cpp | 2 +- src/test/pressure_test/main.cpp | 6 +- src/tools/mutation_log_tool.cpp | 2 +- src/utils/distributed_lock_service.h | 20 +- src/utils/latency_tracer.h | 2 +- src/utils/metrics.cpp | 2 +- src/utils/test/env.cpp | 2 +- src/utils/test/fmt_logging_test.cpp | 2 +- .../distributed_lock_service_zookeeper.cpp | 2 +- .../distributed_lock_service_zookeeper.h | 6 +- src/zookeeper/lock_struct.cpp | 4 +- src/zookeeper/lock_struct.h | 2 +- src/zookeeper/lock_types.h | 2 +- .../test/distributed_lock_zookeeper.cpp | 4 +- 256 files changed, 875 insertions(+), 681 deletions(-) rename src/{runtime => }/task/CMakeLists.txt (83%) rename src/{runtime => }/task/async_calls.h (99%) rename src/{runtime => }/task/future_types.h (100%) rename src/{runtime => }/task/hpc_task_queue.cpp (94%) rename src/{runtime => }/task/hpc_task_queue.h (95%) rename src/{runtime => }/task/simple_task_queue.cpp (96%) rename src/{runtime => }/task/simple_task_queue.h (95%) rename src/{runtime => }/task/task.cpp (99%) rename src/{runtime => }/task/task.h (99%) rename src/{runtime => }/task/task_code.cpp (100%) rename src/{runtime => }/task/task_code.h (100%) rename src/{runtime => }/task/task_engine.cpp (98%) rename src/{runtime => }/task/task_engine.h (99%) rename src/{runtime => }/task/task_engine.sim.cpp (99%) rename src/{runtime => }/task/task_engine.sim.h (100%) rename src/{runtime => }/task/task_queue.cpp (98%) rename src/{runtime => }/task/task_queue.h (100%) rename src/{runtime => }/task/task_spec.cpp (99%) rename src/{runtime => }/task/task_spec.h (99%) rename src/{runtime => }/task/task_tracker.cpp (100%) rename src/{runtime => }/task/task_tracker.h (100%) rename src/{runtime => }/task/task_worker.cpp (98%) rename src/{runtime => }/task/task_worker.h (100%) create mode 100644 src/task/tests/CMakeLists.txt rename src/{runtime/test/async_call.cpp => task/tests/async_call_test.cpp} (97%) create mode 100644 src/task/tests/config-test-sim.ini create mode 100644 src/task/tests/config-test.ini rename src/{runtime/test/lpc.cpp => task/tests/lpc_test.cpp} (93%) create mode 100644 src/task/tests/main.cpp create mode 100755 src/task/tests/run.sh rename src/{runtime/test/task_engine.cpp => task/tests/task_engine_test.cpp} (93%) rename src/{runtime/test => task/tests}/task_test.cpp (93%) rename src/{runtime => }/task/timer_service.h (100%) diff --git a/.github/workflows/lint_and_test_cpp.yaml b/.github/workflows/lint_and_test_cpp.yaml index 2c025c1f46..bbe2571831 100644 --- a/.github/workflows/lint_and_test_cpp.yaml +++ b/.github/workflows/lint_and_test_cpp.yaml @@ -167,6 +167,7 @@ jobs: - dsn.rep_tests.simple_kv - dsn_runtime_tests - dsn_security_tests + - dsn_task_tests - dsn_utils_tests - dsn.zookeeper.tests # TODO(yingchun): Disable it because we find it's too flaky, we will re-enable it after @@ -251,6 +252,7 @@ jobs: - dsn.rep_tests.simple_kv - dsn_runtime_tests - dsn_security_tests + - dsn_task_tests - dsn_utils_tests - dsn.zookeeper.tests # TODO(yingchun): Disable it because we find it's too flaky, we will re-enable it after @@ -340,6 +342,7 @@ jobs: # - dsn.rep_tests.simple_kv # - dsn_runtime_tests # - dsn_security_tests +# - dsn_task_tests # - dsn_utils_tests # - dsn.zookeeper.tests # - partition_split_test diff --git a/.licenserc.yaml b/.licenserc.yaml index 2682d26d98..c300ed4204 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -118,106 +118,17 @@ header: - 'idl/command.thrift' - 'idl/dsn.layer2.thrift' - 'idl/dsn.thrift' - - 'idl/metadata.thrift' - 'idl/meta_admin.thrift' + - 'idl/metadata.thrift' - 'idl/replica_admin.thrift' - - 'src/runtime/api_layer1.h' - - 'src/runtime/api_task.h' - - 'src/utils/api_utilities.h' - - 'src/runtime/app_model.h' - - 'src/common/json_helper.h' - - 'src/common/serialization_helper/dsn_types.h' - - 'src/common/serialization_helper/thrift_helper.h' - - 'src/runtime/serverlet.h' - - 'src/runtime/service_app.h' - - 'src/utils/distributed_lock_service.h' - - 'src/failure_detector/failure_detector.h' - - 'src/failure_detector/fd.client.h' - - 'src/failure_detector/fd.code.definition.h' - - 'src/failure_detector/fd.server.h' - - 'src/failure_detector/failure_detector_multimaster.h' - - 'src/meta/meta_state_service.h' - - 'src/nfs/nfs_node.h' - - 'src/meta/meta_service_app.h' - - 'src/tools/mutation_log_tool.h' - - 'src/client/partition_resolver.h' - - 'src/replica/replica_base.h' - - 'src/common/replica_envs.h' - - 'src/common/replication.codes.h' - - 'src/replica/replication_app_base.h' - - 'src/client/replication_ddl_client.h' - - 'src/common/replication_enums.h' - - 'src/common/replication_other_types.h' - - 'src/replica/replication_service_app.h' - - 'src/common/storage_serverlet.h' - - 'src/perf_counter/perf_counter.h' - - 'src/perf_counter/perf_counter_wrapper.h' - - 'src/perf_counter/perf_counters.h' - - 'src/aio/aio_task.h' - - 'src/runtime/task/async_calls.h' - - 'src/utils/command_manager.h' - - 'src/runtime/env_provider.h' - - 'src/aio/file_io.h' - - 'src/runtime/task/future_types.h' - - 'src/runtime/global_config.h' - - 'src/common/gpid.h' - - 'src/utils/logging_provider.h' - - 'src/runtime/task/task.h' - - 'src/runtime/task/task_code.h' - - 'src/runtime/task/task_queue.h' - - 'src/runtime/task/task_spec.h' - - 'src/runtime/task/task_tracker.h' - - 'src/runtime/task/task_worker.h' - - 'src/utils/thread_access_checker.h' - - 'src/utils/threadpool_code.h' - - 'src/utils/threadpool_spec.h' - - 'src/runtime/task/timer_service.h' - - 'src/utils/uniq_timestamp_us.h' - - 'src/utils/zlocks.h' - - 'src/runtime/nativerun.h' - - 'src/runtime/node_scoper.h' - - 'src/runtime/providers.common.h' - - 'src/runtime/simulator.h' - - 'src/runtime/tool_api.h' - - 'src/runtime/fault_injector.h' - - 'src/runtime/profiler.h' - - 'src/runtime/tracer.h' - - 'src/utils/autoref_ptr.h' - - 'src/utils/binary_reader.h' - - 'src/utils/binary_writer.h' - - 'src/utils/blob.h' - - 'src/utils/chrono_literals.h' - - 'src/utils/config_api.h' - - 'src/utils/config_helper.h' - - 'src/utils/configuration.h' - - 'src/utils/crc.h' - - 'src/utils/customizable_id.h' - - 'src/utils/enum_helper.h' - - 'src/utils/error_code.h' - - 'src/utils/errors.h' - - 'src/utils/exp_delay.h' - - 'src/utils/extensible_object.h' - - 'src/utils/factory_store.h' - - 'src/utils/filesystem.h' - - 'src/utils/fixed_size_buffer_pool.h' - - 'src/utils/function_traits.h' - - 'src/utils/join_point.h' - - 'src/utils/link.h' - - 'src/utils/optional.h' - - 'src/utils/ports.h' - - 'src/utils/priority_queue.h' - - 'src/utils/singleton_store.h' - - 'src/utils/strings.h' - - 'src/utils/synchronize.h' - - 'src/utils/utils.h' - - 'src/utils/work_queue.h' - - 'src/utils/time_utils.h' - 'src/aio/CMakeLists.txt' - 'src/aio/aio_provider.cpp' - 'src/aio/aio_provider.h' + - 'src/aio/aio_task.h' - 'src/aio/disk_engine.cpp' - 'src/aio/disk_engine.h' - 'src/aio/file_io.cpp' + - 'src/aio/file_io.h' - 'src/aio/native_linux_aio_provider.cpp' - 'src/aio/native_linux_aio_provider.h' - 'src/aio/test/CMakeLists.txt' @@ -228,16 +139,27 @@ header: - 'src/block_service/test/config-test.ini' - 'src/client/CMakeLists.txt' - 'src/client/partition_resolver.cpp' + - 'src/client/partition_resolver.h' - 'src/client/partition_resolver_manager.cpp' - 'src/client/partition_resolver_manager.h' - 'src/client/partition_resolver_simple.cpp' - 'src/client/partition_resolver_simple.h' - 'src/client/replication_ddl_client.cpp' + - 'src/client/replication_ddl_client.h' - 'src/common/CMakeLists.txt' - 'src/common/consensus.thrift' - 'src/common/fs_manager.cpp' + - 'src/common/gpid.h' + - 'src/common/json_helper.h' + - 'src/common/replica_envs.h' + - 'src/common/replication.codes.h' - 'src/common/replication_common.cpp' - 'src/common/replication_common.h' + - 'src/common/replication_enums.h' + - 'src/common/replication_other_types.h' + - 'src/common/serialization_helper/dsn_types.h' + - 'src/common/serialization_helper/thrift_helper.h' + - 'src/common/storage_serverlet.h' - 'src/common/test/CMakeLists.txt' - 'src/common/test/config-test.ini' - 'src/common/test/duplication_common_test.cpp' @@ -245,7 +167,12 @@ header: - 'src/common/test/run.sh' - 'src/failure_detector/CMakeLists.txt' - 'src/failure_detector/failure_detector.cpp' + - 'src/failure_detector/failure_detector.h' - 'src/failure_detector/failure_detector_multimaster.cpp' + - 'src/failure_detector/failure_detector_multimaster.h' + - 'src/failure_detector/fd.client.h' + - 'src/failure_detector/fd.code.definition.h' + - 'src/failure_detector/fd.server.h' - 'src/failure_detector/fd.thrift' - 'src/failure_detector/test/CMakeLists.txt' - 'src/failure_detector/test/clear.sh' @@ -273,6 +200,8 @@ header: - 'src/meta/meta_service.cpp' - 'src/meta/meta_service.h' - 'src/meta/meta_service_app.cpp' + - 'src/meta/meta_service_app.h' + - 'src/meta/meta_state_service.h' - 'src/meta/meta_state_service_simple.cpp' - 'src/meta/meta_state_service_simple.h' - 'src/meta/meta_state_service_zookeeper.cpp' @@ -315,6 +244,7 @@ header: - 'src/nfs/nfs_client_impl.h' - 'src/nfs/nfs_code_definition.h' - 'src/nfs/nfs_node.cpp' + - 'src/nfs/nfs_node.h' - 'src/nfs/nfs_node_simple.cpp' - 'src/nfs/nfs_node_simple.h' - 'src/nfs/nfs_server_impl.cpp' @@ -326,7 +256,10 @@ header: - 'src/nfs/test/run.sh' - 'src/perf_counter/CMakeLists.txt' - 'src/perf_counter/perf_counter.cpp' + - 'src/perf_counter/perf_counter.h' + - 'src/perf_counter/perf_counter_wrapper.h' - 'src/perf_counter/perf_counters.cpp' + - 'src/perf_counter/perf_counters.h' - 'src/perf_counter/test/CMakeLists.txt' - 'src/perf_counter/test/clear.sh' - 'src/perf_counter/test/perf_counter_test.cpp' @@ -356,6 +289,7 @@ header: - 'src/replica/replica.cpp' - 'src/replica/replica.h' - 'src/replica/replica_2pc.cpp' + - 'src/replica/replica_base.h' - 'src/replica/replica_check.cpp' - 'src/replica/replica_chkpt.cpp' - 'src/replica/replica_config.cpp' @@ -367,7 +301,9 @@ header: - 'src/replica/replica_stub.cpp' - 'src/replica/replica_stub.h' - 'src/replica/replication_app_base.cpp' + - 'src/replica/replication_app_base.h' - 'src/replica/replication_service_app.cpp' + - 'src/replica/replication_service_app.h' - 'src/replica/split/test/config-test.ini' - 'src/replica/split/test/run.sh' - 'src/replica/storage/CMakeLists.txt' @@ -514,46 +450,6 @@ header: - 'src/replica/test/replica_test_base.h' - 'src/replica/test/replication_service_test_app.h' - 'src/replica/test/run.sh' - - 'src/runtime/CMakeLists.txt' - - 'src/runtime/core_main.cpp' - - 'src/runtime/env.sim.cpp' - - 'src/runtime/env.sim.h' - - 'src/runtime/fault_injector.cpp' - - 'src/runtime/global_config.cpp' - - 'src/runtime/message_utils.cpp' - - 'src/runtime/nativerun.cpp' - - 'src/runtime/profiler.cpp' - - 'src/runtime/profiler_header.h' - - 'src/runtime/providers.common.cpp' - - 'src/runtime/scheduler.cpp' - - 'src/runtime/scheduler.h' - - 'src/runtime/service_api_c.cpp' - - 'src/runtime/service_engine.cpp' - - 'src/runtime/service_engine.h' - - 'src/runtime/simulator.cpp' - - 'src/runtime/task/CMakeLists.txt' - - 'src/runtime/task/hpc_task_queue.cpp' - - 'src/runtime/task/hpc_task_queue.h' - - 'src/runtime/task/simple_task_queue.cpp' - - 'src/runtime/task/simple_task_queue.h' - - 'src/runtime/task/task.cpp' - - 'src/runtime/task/task_code.cpp' - - 'src/runtime/task/task_engine.cpp' - - 'src/runtime/task/task_engine.h' - - 'src/runtime/task/task_engine.sim.cpp' - - 'src/runtime/task/task_engine.sim.h' - - 'src/runtime/task/task_queue.cpp' - - 'src/runtime/task/task_spec.cpp' - - 'src/runtime/task/task_tracker.cpp' - - 'src/runtime/task/task_worker.cpp' - - 'src/runtime/test/CMakeLists.txt' - - 'src/runtime/test/async_call.cpp' - - 'src/runtime/test/clear.sh' - - 'src/runtime/test/config-test-sim.ini' - - 'src/runtime/test/config-test.ini' - - 'src/runtime/test/lpc.cpp' - - 'src/runtime/test/main.cpp' - - 'src/runtime/test/pipeline_test.cpp' - 'src/rpc/CMakeLists.txt' - 'src/rpc/asio_net_provider.cpp' - 'src/rpc/asio_net_provider.h' @@ -580,8 +476,6 @@ header: - 'src/rpc/rpc_stream.h' - 'src/rpc/rpc_task.cpp' - 'src/rpc/serialization.h' - - 'src/rpc/thrift_message_parser.cpp' - - 'src/rpc/thrift_message_parser.h' - 'src/rpc/test/address_test.cpp' - 'src/rpc/test/corrupt_message_test.cpp' - 'src/rpc/test/host_port_test.cpp' @@ -590,35 +484,137 @@ header: - 'src/rpc/test/rpc_holder_test.cpp' - 'src/rpc/test/rpc_message_test.cpp' - 'src/rpc/test/rpc_test.cpp' + - 'src/rpc/thrift_message_parser.cpp' + - 'src/rpc/thrift_message_parser.h' + - 'src/runtime/CMakeLists.txt' + - 'src/runtime/api_layer1.h' + - 'src/runtime/api_task.h' + - 'src/runtime/app_model.h' + - 'src/runtime/core_main.cpp' + - 'src/runtime/env.sim.cpp' + - 'src/runtime/env.sim.h' + - 'src/runtime/env_provider.h' + - 'src/runtime/fault_injector.cpp' + - 'src/runtime/fault_injector.h' + - 'src/runtime/global_config.cpp' + - 'src/runtime/global_config.h' + - 'src/runtime/message_utils.cpp' + - 'src/runtime/nativerun.cpp' + - 'src/runtime/nativerun.h' + - 'src/runtime/node_scoper.h' + - 'src/runtime/profiler.cpp' + - 'src/runtime/profiler.h' + - 'src/runtime/profiler_header.h' + - 'src/runtime/providers.common.cpp' + - 'src/runtime/providers.common.h' + - 'src/runtime/scheduler.cpp' + - 'src/runtime/scheduler.h' + - 'src/runtime/serverlet.h' + - 'src/runtime/service_api_c.cpp' + - 'src/runtime/service_app.h' + - 'src/runtime/service_engine.cpp' + - 'src/runtime/service_engine.h' + - 'src/runtime/simulator.cpp' + - 'src/runtime/simulator.h' + - 'src/runtime/test/CMakeLists.txt' + - 'src/runtime/test/address_test.cpp' + - 'src/runtime/test/async_call.cpp' + - 'src/runtime/test/clear.sh' + - 'src/runtime/test/config-test-sim.ini' + - 'src/runtime/test/config-test.ini' + - 'src/runtime/test/corrupt_message.cpp' + - 'src/runtime/test/lpc.cpp' + - 'src/runtime/test/main.cpp' + - 'src/runtime/test/pipeline_test.cpp' - 'src/runtime/test/run.sh' - 'src/runtime/test/service_api_c.cpp' - 'src/runtime/test/sim_lock.cpp' - - 'src/runtime/test/task_engine.cpp' - 'src/runtime/test_utils.h' - 'src/runtime/threadpool_code.cpp' - 'src/runtime/tool_api.cpp' + - 'src/runtime/tool_api.h' - 'src/runtime/tracer.cpp' + - 'src/runtime/tracer.h' - 'src/runtime/zlocks.cpp' + - 'src/task/CMakeLists.txt' + - 'src/task/async_calls.h' + - 'src/task/future_types.h' + - 'src/task/hpc_task_queue.cpp' + - 'src/task/hpc_task_queue.h' + - 'src/task/simple_task_queue.cpp' + - 'src/task/simple_task_queue.h' + - 'src/task/task.cpp' + - 'src/task/task.h' + - 'src/task/task_code.cpp' + - 'src/task/task_code.h' + - 'src/task/task_engine.cpp' + - 'src/task/task_engine.h' + - 'src/task/task_engine.sim.cpp' + - 'src/task/task_engine.sim.h' + - 'src/task/task_queue.cpp' + - 'src/task/task_queue.h' + - 'src/task/task_spec.cpp' + - 'src/task/task_spec.h' + - 'src/task/task_tracker.cpp' + - 'src/task/task_tracker.h' + - 'src/task/task_worker.cpp' + - 'src/task/task_worker.h' + - 'src/task/tests/async_call_test.cpp' + - 'src/task/tests/lpc_test.cpp' + - 'src/task/tests/task_engine_test.cpp' + - 'src/task/timer_service.h' - 'src/tools/CMakeLists.txt' - 'src/tools/mutation_log_tool.cpp' + - 'src/tools/mutation_log_tool.h' - 'src/utils/CMakeLists.txt' + - 'src/utils/api_utilities.h' + - 'src/utils/autoref_ptr.h' - 'src/utils/binary_reader.cpp' + - 'src/utils/binary_reader.h' - 'src/utils/binary_writer.cpp' + - 'src/utils/binary_writer.h' + - 'src/utils/blob.h' + - 'src/utils/chrono_literals.h' - 'src/utils/command_manager.cpp' + - 'src/utils/command_manager.h' - 'src/utils/config_api.cpp' + - 'src/utils/config_api.h' + - 'src/utils/config_helper.h' - 'src/utils/configuration.cpp' + - 'src/utils/configuration.h' - 'src/utils/coredump.h' - 'src/utils/coredump.posix.cpp' - 'src/utils/crc.cpp' + - 'src/utils/crc.h' + - 'src/utils/customizable_id.h' + - 'src/utils/distributed_lock_service.h' + - 'src/utils/enum_helper.h' - 'src/utils/error_code.cpp' + - 'src/utils/error_code.h' + - 'src/utils/errors.h' + - 'src/utils/exp_delay.h' + - 'src/utils/extensible_object.h' + - 'src/utils/factory_store.h' - 'src/utils/filesystem.cpp' + - 'src/utils/filesystem.h' + - 'src/utils/fixed_size_buffer_pool.h' + - 'src/utils/function_traits.h' - 'src/utils/gpid.cpp' + - 'src/utils/join_point.h' + - 'src/utils/link.h' - 'src/utils/lockp.std.h' - 'src/utils/logging.cpp' + - 'src/utils/logging_provider.h' + - 'src/utils/optional.h' + - 'src/utils/ports.h' + - 'src/utils/priority_queue.h' - 'src/utils/shared_io_service.h' - 'src/utils/simple_logger.cpp' - 'src/utils/simple_logger.h' + - 'src/utils/singleton_store.h' - 'src/utils/strings.cpp' + - 'src/utils/strings.h' + - 'src/utils/synchronize.h' - 'src/utils/test/CMakeLists.txt' - 'src/utils/test/clear.sh' - 'src/utils/test/config-bad-section.ini' @@ -646,8 +642,16 @@ header: - 'src/utils/test/time_utils_test.cpp' - 'src/utils/test/utils.cpp' - 'src/utils/thread_access_checker.cpp' + - 'src/utils/thread_access_checker.h' + - 'src/utils/threadpool_code.h' + - 'src/utils/threadpool_spec.h' + - 'src/utils/time_utils.h' + - 'src/utils/uniq_timestamp_us.h' - 'src/utils/utils.cpp' + - 'src/utils/utils.h' + - 'src/utils/work_queue.h' - 'src/utils/zlock_provider.h' + - 'src/utils/zlocks.h' - 'src/zookeeper/CMakeLists.txt' - 'src/zookeeper/distributed_lock_service_zookeeper.cpp' - 'src/zookeeper/distributed_lock_service_zookeeper.h' diff --git a/build_tools/recompile_thrift.sh b/build_tools/recompile_thrift.sh index c8680adb3f..9cec796c31 100755 --- a/build_tools/recompile_thrift.sh +++ b/build_tools/recompile_thrift.sh @@ -29,7 +29,7 @@ rm -rf $TMP_DIR mkdir -p $TMP_DIR $THIRDPARTY_ROOT/output/bin/thrift --gen cpp:moveable_types -out $TMP_DIR ../idl/rrdb.thrift -sed 's/#include "dsn_types.h"/#include "rpc\/rpc_address.h"\n#include "rpc\/rpc_host_port.h"\n#include "runtime\/task\/task_code.h"\n#include "utils\/blob.h"/' $TMP_DIR/rrdb_types.h > ../src/include/rrdb/rrdb_types.h +sed 's/#include "dsn_types.h"/#include "rpc\/rpc_address.h"\n#include "rpc\/rpc_host_port.h"\n#include "task\/task_code.h"\n#include "utils\/blob.h"/' $TMP_DIR/rrdb_types.h > ../src/include/rrdb/rrdb_types.h sed 's/#include "rrdb_types.h"/#include /' $TMP_DIR/rrdb_types.cpp > ../src/base/rrdb_types.cpp rm -rf $TMP_DIR diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index af3f68e495..55197062e2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,6 +57,7 @@ add_subdirectory(security) add_subdirectory(server) add_subdirectory(server/test) add_subdirectory(shell) +add_subdirectory(task) add_subdirectory(test_util) add_subdirectory(test/bench_test) add_subdirectory(test/function_test) diff --git a/src/aio/aio_task.cpp b/src/aio/aio_task.cpp index 112cb79eb9..e2026040da 100644 --- a/src/aio/aio_task.cpp +++ b/src/aio/aio_task.cpp @@ -26,10 +26,10 @@ #include "aio/file_io.h" #include "runtime/api_task.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_engine.h" -#include "runtime/task/task_spec.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_engine.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/error_code.h" diff --git a/src/aio/aio_task.h b/src/aio/aio_task.h index f8bf2ca5cf..cef55d7fa2 100644 --- a/src/aio/aio_task.h +++ b/src/aio/aio_task.h @@ -33,8 +33,8 @@ #include #include "runtime/api_task.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" diff --git a/src/aio/disk_engine.cpp b/src/aio/disk_engine.cpp index 1b104be301..ddc669515f 100644 --- a/src/aio/disk_engine.cpp +++ b/src/aio/disk_engine.cpp @@ -34,9 +34,9 @@ #include "aio/aio_provider.h" #include "aio/aio_task.h" #include "native_linux_aio_provider.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "runtime/tool_api.h" #include "utils/error_code.h" #include "utils/factory_store.h" diff --git a/src/aio/file_io.h b/src/aio/file_io.h index 0cef3f1b80..12f1479afe 100644 --- a/src/aio/file_io.h +++ b/src/aio/file_io.h @@ -33,9 +33,9 @@ #include "aio/aio_task.h" #include "runtime/api_task.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/join_point.h" diff --git a/src/aio/native_linux_aio_provider.cpp b/src/aio/native_linux_aio_provider.cpp index 7270dff733..597fddf835 100644 --- a/src/aio/native_linux_aio_provider.cpp +++ b/src/aio/native_linux_aio_provider.cpp @@ -32,7 +32,7 @@ #include "rocksdb/slice.h" #include "rocksdb/status.h" #include "runtime/service_engine.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/env.h" #include "utils/fmt_logging.h" #include "utils/latency_tracer.h" diff --git a/src/aio/test/aio.cpp b/src/aio/test/aio.cpp index 9193b33922..7dbff2d7d6 100644 --- a/src/aio/test/aio.cpp +++ b/src/aio/test/aio.cpp @@ -38,7 +38,7 @@ #include "aio/aio_task.h" #include "aio/file_io.h" #include "gtest/gtest.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "runtime/tool_api.h" #include "test_util/test_util.h" #include "utils/autoref_ptr.h" diff --git a/src/block_service/block_service.h b/src/block_service/block_service.h index 47ad763ff0..aa6b4b26cb 100644 --- a/src/block_service/block_service.h +++ b/src/block_service/block_service.h @@ -19,15 +19,15 @@ #pragma once -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "runtime/api_task.h" #include "runtime/api_layer1.h" #include "runtime/app_model.h" #include "utils/api_utilities.h" #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" #include "rpc/serialization.h" #include "rpc/rpc_stream.h" diff --git a/src/block_service/block_service_manager.cpp b/src/block_service/block_service_manager.cpp index 1d0cd45f95..9ca1ed9561 100644 --- a/src/block_service/block_service_manager.cpp +++ b/src/block_service/block_service_manager.cpp @@ -25,8 +25,8 @@ #include "block_service/hdfs/hdfs_service.h" #include "block_service/local/local_service.h" #include "fmt/core.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/config_api.h" #include "utils/factory_store.h" #include "utils/filesystem.h" diff --git a/src/block_service/hdfs/hdfs_service.cpp b/src/block_service/hdfs/hdfs_service.cpp index 3defe88356..987195314b 100644 --- a/src/block_service/hdfs/hdfs_service.cpp +++ b/src/block_service/hdfs/hdfs_service.cpp @@ -29,8 +29,8 @@ #include "hdfs_service.h" #include "rocksdb/slice.h" #include "rocksdb/status.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/TokenBucket.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" diff --git a/src/block_service/hdfs/hdfs_service.h b/src/block_service/hdfs/hdfs_service.h index bc3da5b519..b8a7bf7392 100644 --- a/src/block_service/hdfs/hdfs_service.h +++ b/src/block_service/hdfs/hdfs_service.h @@ -26,8 +26,8 @@ #include #include "block_service/block_service.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/TokenBucket.h" #include "utils/error_code.h" diff --git a/src/block_service/local/local_service.cpp b/src/block_service/local/local_service.cpp index 0069a03773..d7aa4e9ca9 100644 --- a/src/block_service/local/local_service.cpp +++ b/src/block_service/local/local_service.cpp @@ -26,7 +26,7 @@ #include "nlohmann/json.hpp" #include "rocksdb/slice.h" #include "rocksdb/status.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/env.h" diff --git a/src/block_service/local/local_service.h b/src/block_service/local/local_service.h index 8bc3ffd56c..a505bea4e9 100644 --- a/src/block_service/local/local_service.h +++ b/src/block_service/local/local_service.h @@ -25,8 +25,8 @@ #include #include "block_service/block_service.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/error_code.h" namespace dsn { diff --git a/src/block_service/test/hdfs_service_test.cpp b/src/block_service/test/hdfs_service_test.cpp index b0880de2a3..66333c5f9d 100644 --- a/src/block_service/test/hdfs_service_test.cpp +++ b/src/block_service/test/hdfs_service_test.cpp @@ -32,10 +32,10 @@ #include "block_service/hdfs/hdfs_service.h" #include "gtest/gtest.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "test_util/test_util.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" diff --git a/src/client/partition_resolver.cpp b/src/client/partition_resolver.cpp index 2c6e8e9f1e..6267180fb5 100644 --- a/src/client/partition_resolver.cpp +++ b/src/client/partition_resolver.cpp @@ -32,7 +32,7 @@ #include "runtime/api_layer1.h" #include "runtime/api_task.h" #include "rpc/dns_resolver.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/fmt_logging.h" #include "utils/threadpool_code.h" diff --git a/src/client/partition_resolver.h b/src/client/partition_resolver.h index 36f23bf36f..d1aa4f0cf2 100644 --- a/src/client/partition_resolver.h +++ b/src/client/partition_resolver.h @@ -37,9 +37,9 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" diff --git a/src/client/partition_resolver_simple.cpp b/src/client/partition_resolver_simple.cpp index 5fed493ea6..db1d8e543d 100644 --- a/src/client/partition_resolver_simple.cpp +++ b/src/client/partition_resolver_simple.cpp @@ -38,9 +38,9 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/async_calls.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/fmt_logging.h" #include "utils/ports.h" #include "utils/rand.h" diff --git a/src/client/partition_resolver_simple.h b/src/client/partition_resolver_simple.h index cd68bc35ab..9038e5b418 100644 --- a/src/client/partition_resolver_simple.h +++ b/src/client/partition_resolver_simple.h @@ -35,8 +35,8 @@ #include "client/partition_resolver.h" #include "common/serialization_helper/dsn.layer2_types.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/zlocks.h" diff --git a/src/client/replication_ddl_client.h b/src/client/replication_ddl_client.h index 258066495a..2f891da2ec 100644 --- a/src/client/replication_ddl_client.h +++ b/src/client/replication_ddl_client.h @@ -49,10 +49,10 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/errors.h" diff --git a/src/client/test/ddl_client_test.cpp b/src/client/test/ddl_client_test.cpp index 3710f3953d..13b13d69ae 100644 --- a/src/client/test/ddl_client_test.cpp +++ b/src/client/test/ddl_client_test.cpp @@ -28,7 +28,7 @@ #include "meta_admin_types.h" #include "rpc/rpc_host_port.h" #include "runtime/api_layer1.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/errors.h" diff --git a/src/client_lib/pegasus_client_impl.cpp b/src/client_lib/pegasus_client_impl.cpp index 6929b99a4e..1dd402bd01 100644 --- a/src/client_lib/pegasus_client_impl.cpp +++ b/src/client_lib/pegasus_client_impl.cpp @@ -38,8 +38,8 @@ #include "rpc/group_host_port.h" #include "rpc/serialization.h" #include "rrdb/rrdb.client.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/error_code.h" #include "utils/fmt_logging.h" #include "utils/synchronize.h" diff --git a/src/common/json_helper.h b/src/common/json_helper.h index feb6a376da..d56bcecba6 100644 --- a/src/common/json_helper.h +++ b/src/common/json_helper.h @@ -49,7 +49,7 @@ #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" #include "meta_admin_types.h" #include "partition_split_types.h" diff --git a/src/common/replication.codes.h b/src/common/replication.codes.h index a542e58130..9a13b5c690 100644 --- a/src/common/replication.codes.h +++ b/src/common/replication.codes.h @@ -28,7 +28,7 @@ #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" DEFINE_THREAD_POOL_CODE(THREAD_POOL_META_SERVER) diff --git a/src/common/replication_common.h b/src/common/replication_common.h index 23e22cf1fb..efa78f13fb 100644 --- a/src/common/replication_common.h +++ b/src/common/replication_common.h @@ -34,17 +34,17 @@ #include "metadata_types.h" #include "rpc/rpc_holder.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task.h" +#include "task/task.h" namespace dsn { namespace replication { class configuration_update_app_env_request; class configuration_update_app_env_response; - class query_app_info_request; class query_app_info_response; class query_replica_info_request; class query_replica_info_response; + typedef std::unordered_map<::dsn::host_port, partition_status::type> node_statuses; typedef std::unordered_map<::dsn::host_port, dsn::task_ptr> node_tasks; diff --git a/src/common/storage_serverlet.h b/src/common/storage_serverlet.h index 41c58e194a..ba288747e7 100644 --- a/src/common/storage_serverlet.h +++ b/src/common/storage_serverlet.h @@ -38,7 +38,7 @@ #include "utils/api_utilities.h" #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" #include "rpc/serialization.h" #include "rpc/rpc_stream.h" diff --git a/src/failure_detector/failure_detector.cpp b/src/failure_detector/failure_detector.cpp index 4deba63e4b..a9c330d7d2 100644 --- a/src/failure_detector/failure_detector.cpp +++ b/src/failure_detector/failure_detector.cpp @@ -44,8 +44,8 @@ #include "rpc/dns_resolver.h" #include "rpc/rpc_address.h" #include "runtime/serverlet.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_spec.h" +#include "task/async_calls.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/command_manager.h" #include "utils/fmt_logging.h" diff --git a/src/failure_detector/failure_detector.h b/src/failure_detector/failure_detector.h index 3924bd7f55..775e78d7f4 100644 --- a/src/failure_detector/failure_detector.h +++ b/src/failure_detector/failure_detector.h @@ -36,9 +36,9 @@ #include "failure_detector/fd.client.h" #include "failure_detector/fd.server.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/error_code.h" #include "utils/metrics.h" #include "utils/threadpool_code.h" @@ -46,7 +46,6 @@ namespace dsn { class command_deregister; - template class rpc_replier; diff --git a/src/failure_detector/fd.client.h b/src/failure_detector/fd.client.h index 13fe0e5325..3df219d6a7 100644 --- a/src/failure_detector/fd.client.h +++ b/src/failure_detector/fd.client.h @@ -28,7 +28,7 @@ #include "fd.code.definition.h" #include #include "utils/optional.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" namespace dsn { namespace fd { diff --git a/src/failure_detector/fd.code.definition.h b/src/failure_detector/fd.code.definition.h index 4568c10866..bde94541ef 100644 --- a/src/failure_detector/fd.code.definition.h +++ b/src/failure_detector/fd.code.definition.h @@ -26,14 +26,14 @@ #pragma once -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "runtime/api_task.h" #include "runtime/api_layer1.h" #include "runtime/app_model.h" #include "utils/api_utilities.h" #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" #include "rpc/serialization.h" #include "rpc/rpc_stream.h" diff --git a/src/failure_detector/test/failure_detector.cpp b/src/failure_detector/test/failure_detector.cpp index f882903fb8..81eaf2873c 100644 --- a/src/failure_detector/test/failure_detector.cpp +++ b/src/failure_detector/test/failure_detector.cpp @@ -55,9 +55,9 @@ #include "runtime/api_layer1.h" #include "runtime/serverlet.h" #include "runtime/service_app.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/async_calls.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/enum_helper.h" #include "utils/error_code.h" #include "utils/flags.h" diff --git a/src/geo/lib/geo_client.h b/src/geo/lib/geo_client.h index 1d00dc7fe5..92b23e0f5e 100644 --- a/src/geo/lib/geo_client.h +++ b/src/geo/lib/geo_client.h @@ -28,7 +28,7 @@ #include #include "latlng_codec.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" class S2Cap; class S2CellId; diff --git a/src/http/http_message_parser.h b/src/http/http_message_parser.h index db54102b15..e4aa5d9e72 100644 --- a/src/http/http_message_parser.h +++ b/src/http/http_message_parser.h @@ -34,7 +34,7 @@ #include "rpc/message_parser.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/customizable_id.h" namespace dsn { diff --git a/src/http/http_server.h b/src/http/http_server.h index f2c3930859..a0d07ced68 100644 --- a/src/http/http_server.h +++ b/src/http/http_server.h @@ -28,7 +28,7 @@ #include "fmt/core.h" #include "http/http_method.h" #include "http/http_status_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/blob.h" #include "utils/errors.h" #include "utils/flags.h" diff --git a/src/include/rrdb/rrdb.client.h b/src/include/rrdb/rrdb.client.h index 28d18adc7e..899d9e697c 100644 --- a/src/include/rrdb/rrdb.client.h +++ b/src/include/rrdb/rrdb.client.h @@ -26,7 +26,10 @@ #include "rrdb.code.definition.h" #include "rrdb_types.h" #include "rpc/rpc_holder.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" +#include "rrdb/rrdb_types.h" +#include "rpc/rpc_holder.h" +#include "task/task_tracker.h" #include "utils/optional.h" namespace dsn { diff --git a/src/meta/backup_engine.cpp b/src/meta/backup_engine.cpp index 068cbd2e0a..7197f4e48b 100644 --- a/src/meta/backup_engine.cpp +++ b/src/meta/backup_engine.cpp @@ -39,11 +39,11 @@ #include "rpc/rpc_holder.h" #include "rpc/rpc_host_port.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" #include "server_state.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/chrono_literals.h" diff --git a/src/meta/backup_engine.h b/src/meta/backup_engine.h index a762f3cc76..2f68b92b11 100644 --- a/src/meta/backup_engine.h +++ b/src/meta/backup_engine.h @@ -24,7 +24,7 @@ #include "backup_types.h" #include "common/json_helper.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/error_code.h" #include "utils/zlocks.h" diff --git a/src/meta/distributed_lock_service_simple.cpp b/src/meta/distributed_lock_service_simple.cpp index 3eed9082cc..f6134cd213 100644 --- a/src/meta/distributed_lock_service_simple.cpp +++ b/src/meta/distributed_lock_service_simple.cpp @@ -29,7 +29,7 @@ #include "common/replication.codes.h" #include "distributed_lock_service_simple.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" namespace dsn { namespace dist { diff --git a/src/meta/distributed_lock_service_simple.h b/src/meta/distributed_lock_service_simple.h index 0d5d5e46fb..d52f3ab99b 100644 --- a/src/meta/distributed_lock_service_simple.h +++ b/src/meta/distributed_lock_service_simple.h @@ -33,10 +33,10 @@ #include #include -#include "runtime/task/future_types.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/future_types.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/distributed_lock_service.h" #include "utils/error_code.h" diff --git a/src/meta/dump_file.h b/src/meta/dump_file.h index 650956644e..5fc9a0b9d1 100644 --- a/src/meta/dump_file.h +++ b/src/meta/dump_file.h @@ -37,7 +37,7 @@ #include "utils/api_utilities.h" #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" #include "rpc/serialization.h" #include "rpc/rpc_stream.h" diff --git a/src/meta/duplication/meta_duplication_service.cpp b/src/meta/duplication/meta_duplication_service.cpp index 795c81897d..66cd2ed125 100644 --- a/src/meta/duplication/meta_duplication_service.cpp +++ b/src/meta/duplication/meta_duplication_service.cpp @@ -46,7 +46,7 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/api_utilities.h" #include "utils/blob.h" #include "utils/chrono_literals.h" diff --git a/src/meta/meta_backup_service.cpp b/src/meta/meta_backup_service.cpp index 8b630d1bef..5dd49a6c0b 100644 --- a/src/meta/meta_backup_service.cpp +++ b/src/meta/meta_backup_service.cpp @@ -43,10 +43,10 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" #include "security/access_controller.h" #include "server_state.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/chrono_literals.h" diff --git a/src/meta/meta_backup_service.h b/src/meta/meta_backup_service.h index d3bf9fac89..28bbca4f50 100644 --- a/src/meta/meta_backup_service.h +++ b/src/meta/meta_backup_service.h @@ -37,8 +37,8 @@ #include "common/json_helper.h" #include "common/replication_other_types.h" #include "meta_rpc_types.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/api_utilities.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" diff --git a/src/meta/meta_bulk_load_service.cpp b/src/meta/meta_bulk_load_service.cpp index fcaa68860a..7ba4854035 100644 --- a/src/meta/meta_bulk_load_service.cpp +++ b/src/meta/meta_bulk_load_service.cpp @@ -44,9 +44,9 @@ #include "rpc/rpc_holder.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/chrono_literals.h" diff --git a/src/meta/meta_bulk_load_service.h b/src/meta/meta_bulk_load_service.h index dfe1c94725..a352db2072 100644 --- a/src/meta/meta_bulk_load_service.h +++ b/src/meta/meta_bulk_load_service.h @@ -36,8 +36,8 @@ #include "meta/meta_state_service_utils.h" #include "meta_bulk_load_ingestion_context.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task_tracker.h" #include "server_state.h" +#include "task/task_tracker.h" #include "utils/error_code.h" #include "utils/flags.h" #include "utils/zlocks.h" @@ -50,7 +50,6 @@ class partition_configuration; namespace replication { class app_state; - class config_context; class meta_service; diff --git a/src/meta/meta_data.h b/src/meta/meta_data.h index fdb679c4ed..239c69435c 100644 --- a/src/meta/meta_data.h +++ b/src/meta/meta_data.h @@ -48,7 +48,7 @@ #include "metadata_types.h" #include "rpc/rpc_host_port.h" #include "runtime/api_layer1.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/enum_helper.h" diff --git a/src/meta/meta_server_failure_detector.cpp b/src/meta/meta_server_failure_detector.cpp index ee85c4513c..8202fff5dd 100644 --- a/src/meta/meta_server_failure_detector.cpp +++ b/src/meta/meta_server_failure_detector.cpp @@ -37,7 +37,7 @@ #include "runtime/app_model.h" #include "rpc/rpc_address.h" #include "runtime/serverlet.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/distributed_lock_service.h" #include "utils/error_code.h" diff --git a/src/meta/meta_server_failure_detector.h b/src/meta/meta_server_failure_detector.h index 4b0df536aa..873b9b8e84 100644 --- a/src/meta/meta_server_failure_detector.h +++ b/src/meta/meta_server_failure_detector.h @@ -35,7 +35,7 @@ #include "failure_detector/failure_detector.h" #include "rpc/rpc_host_port.h" #include "runtime/api_layer1.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/fmt_logging.h" #include "utils/zlocks.h" @@ -55,7 +55,6 @@ class rpc_replier; namespace replication { class fd_suboptions; - class meta_service; namespace test { diff --git a/src/meta/meta_service.cpp b/src/meta/meta_service.cpp index faacdbf208..6a07e3c91d 100644 --- a/src/meta/meta_service.cpp +++ b/src/meta/meta_service.cpp @@ -59,9 +59,9 @@ #include "remote_cmd/remote_command.h" #include "rpc/rpc_address.h" #include "rpc/rpc_holder.h" -#include "runtime/task/async_calls.h" #include "server_load_balancer.h" #include "server_state.h" +#include "task/async_calls.h" #include "utils/autoref_ptr.h" #include "utils/command_manager.h" #include "utils/factory_store.h" diff --git a/src/meta/meta_service.h b/src/meta/meta_service.h index f76e87cf25..0630c68131 100644 --- a/src/meta/meta_service.h +++ b/src/meta/meta_service.h @@ -53,10 +53,10 @@ #include "rpc/serialization.h" #include "runtime/api_layer1.h" #include "runtime/serverlet.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" #include "security/access_controller.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/enum_helper.h" #include "utils/error_code.h" @@ -79,13 +79,12 @@ class meta_state_service; namespace replication { class backup_service; class bulk_load_service; - class meta_duplication_service; class meta_split_service; class partition_guardian; - class server_load_balancer; class server_state; + namespace mss { struct meta_storage; } // namespace mss diff --git a/src/meta/meta_split_service.cpp b/src/meta/meta_split_service.cpp index ed108c8581..b1e7cd708b 100644 --- a/src/meta/meta_split_service.cpp +++ b/src/meta/meta_split_service.cpp @@ -43,7 +43,7 @@ #include "rpc/rpc_address.h" #include "rpc/rpc_holder.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/blob.h" #include "utils/error_code.h" #include "utils/fmt_logging.h" diff --git a/src/meta/meta_split_service.h b/src/meta/meta_split_service.h index d3103ee474..870f01c0ac 100644 --- a/src/meta/meta_split_service.h +++ b/src/meta/meta_split_service.h @@ -20,7 +20,7 @@ #include "common/partition_split_common.h" #include "partition_split_types.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "server_state.h" namespace dsn { diff --git a/src/meta/meta_state_service.h b/src/meta/meta_state_service.h index 7f2126c19a..dab812ef98 100644 --- a/src/meta/meta_state_service.h +++ b/src/meta/meta_state_service.h @@ -31,9 +31,9 @@ #include #include -#include "runtime/task/future_types.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/future_types.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/error_code.h" diff --git a/src/meta/meta_state_service_simple.cpp b/src/meta/meta_state_service_simple.cpp index 5eaab761d5..f875699d53 100644 --- a/src/meta/meta_state_service_simple.cpp +++ b/src/meta/meta_state_service_simple.cpp @@ -37,8 +37,8 @@ #include "rocksdb/slice.h" #include "rocksdb/status.h" #include "runtime/service_app.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/binary_reader.h" #include "utils/env.h" diff --git a/src/meta/meta_state_service_simple.h b/src/meta/meta_state_service_simple.h index ddfe65376c..c4e9298ed5 100644 --- a/src/meta/meta_state_service_simple.h +++ b/src/meta/meta_state_service_simple.h @@ -37,11 +37,11 @@ #include "meta/meta_state_service.h" #include "rpc/serialization.h" -#include "runtime/task/future_types.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" -#include "runtime/task/task_tracker.h" +#include "task/future_types.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_spec.h" +#include "task/task_tracker.h" #include "utils/binary_writer.h" #include "utils/blob.h" #include "utils/error_code.h" diff --git a/src/meta/meta_state_service_zookeeper.h b/src/meta/meta_state_service_zookeeper.h index 2fda95bf02..f7194e29e1 100644 --- a/src/meta/meta_state_service_zookeeper.h +++ b/src/meta/meta_state_service_zookeeper.h @@ -32,10 +32,10 @@ #include #include "meta/meta_state_service.h" -#include "runtime/task/future_types.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/future_types.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/error_code.h" diff --git a/src/meta/server_state.cpp b/src/meta/server_state.cpp index 8868d574ba..68bc786187 100644 --- a/src/meta/server_state.cpp +++ b/src/meta/server_state.cpp @@ -1,5 +1,4 @@ /* - * The MIT License (MIT) * * Copyright (c) 2015 Microsoft Corporation @@ -64,12 +63,12 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_spec.h" #include "security/access_controller.h" #include "server_load_balancer.h" #include "server_state.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/binary_reader.h" #include "utils/binary_writer.h" diff --git a/src/meta/server_state.h b/src/meta/server_state.h index ccace992ba..a787328f73 100644 --- a/src/meta/server_state.h +++ b/src/meta/server_state.h @@ -44,8 +44,8 @@ #include "dsn.layer2_types.h" #include "meta/meta_rpc_types.h" #include "meta_data.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "table_metrics.h" #include "utils/error_code.h" #include "utils/zlocks.h" diff --git a/src/meta/server_state_restore.cpp b/src/meta/server_state_restore.cpp index 1d89aa1084..746a49b553 100644 --- a/src/meta/server_state_restore.cpp +++ b/src/meta/server_state_restore.cpp @@ -43,9 +43,9 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" #include "server_state.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/error_code.h" diff --git a/src/meta/test/backup_test.cpp b/src/meta/test/backup_test.cpp index 81e18bd5bc..367757ab2d 100644 --- a/src/meta/test/backup_test.cpp +++ b/src/meta/test/backup_test.cpp @@ -48,9 +48,9 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/chrono_literals.h" #include "utils/error_code.h" diff --git a/src/meta/test/main.cpp b/src/meta/test/main.cpp index 283282e2de..d3125c4c3a 100644 --- a/src/meta/test/main.cpp +++ b/src/meta/test/main.cpp @@ -29,7 +29,7 @@ #include "meta_service_test_app.h" #include "runtime/app_model.h" #include "runtime/service_app.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/error_code.h" #include "utils/flags.h" #include "utils/fmt_logging.h" diff --git a/src/meta/test/meta_app_operation_test.cpp b/src/meta/test/meta_app_operation_test.cpp index 66de2f1660..f8b399d4c3 100644 --- a/src/meta/test/meta_app_operation_test.cpp +++ b/src/meta/test/meta_app_operation_test.cpp @@ -43,7 +43,7 @@ #include "misc/misc.h" #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/defer.h" #include "utils/error_code.h" #include "utils/errors.h" diff --git a/src/meta/test/meta_http_service_test.cpp b/src/meta/test/meta_http_service_test.cpp index b53854daaf..940d912708 100644 --- a/src/meta/test/meta_http_service_test.cpp +++ b/src/meta/test/meta_http_service_test.cpp @@ -41,8 +41,8 @@ #include "meta_test_base.h" #include "rpc/rpc_holder.h" #include "rpc/rpc_message.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/chrono_literals.h" diff --git a/src/meta/test/meta_partition_guardian_test.cpp b/src/meta/test/meta_partition_guardian_test.cpp index 6dbccfe320..931433a754 100644 --- a/src/meta/test/meta_partition_guardian_test.cpp +++ b/src/meta/test/meta_partition_guardian_test.cpp @@ -60,8 +60,8 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/filesystem.h" diff --git a/src/meta/test/meta_service_test_app.h b/src/meta/test/meta_service_test_app.h index 1f92a08f04..1171315502 100644 --- a/src/meta/test/meta_service_test_app.h +++ b/src/meta/test/meta_service_test_app.h @@ -34,14 +34,16 @@ #include "utils/api_utilities.h" #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" #include "rpc/serialization.h" #include "rpc/rpc_stream.h" #include "runtime/serverlet.h" #include "runtime/service_app.h" #include "rpc/rpc_address.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" +#include "rpc/rpc_address.h" +#include "task/async_calls.h" #include "meta_admin_types.h" #include "partition_split_types.h" #include "duplication_types.h" diff --git a/src/meta/test/meta_state/meta_state_service.cpp b/src/meta/test/meta_state/meta_state_service.cpp index 90b44c1888..4bde7f5120 100644 --- a/src/meta/test/meta_state/meta_state_service.cpp +++ b/src/meta/test/meta_state/meta_state_service.cpp @@ -34,7 +34,7 @@ #include "meta/meta_state_service_simple.h" #include "meta/meta_state_service_zookeeper.h" #include "runtime/service_app.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "test_util/test_util.h" #include "utils/binary_reader.h" #include "utils/binary_writer.h" diff --git a/src/meta/test/meta_state_service_utils_test.cpp b/src/meta/test/meta_state_service_utils_test.cpp index fa4cf3deea..0034d02360 100644 --- a/src/meta/test/meta_state_service_utils_test.cpp +++ b/src/meta/test/meta_state_service_utils_test.cpp @@ -33,7 +33,7 @@ #include "gtest/gtest.h" #include "meta/meta_state_service.h" #include "meta/meta_state_service_utils.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/binary_reader.h" #include "utils/binary_writer.h" #include "utils/blob.h" diff --git a/src/meta/test/meta_test_base.cpp b/src/meta/test/meta_test_base.cpp index db7f6b603e..db136d3913 100644 --- a/src/meta/test/meta_test_base.cpp +++ b/src/meta/test/meta_test_base.cpp @@ -40,7 +40,7 @@ #include "meta_service_test_app.h" #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/error_code.h" #include "utils/factory_store.h" #include "utils/filesystem.h" diff --git a/src/meta/test/state_sync_test.cpp b/src/meta/test/state_sync_test.cpp index 09efb0ed35..fedb1ab384 100644 --- a/src/meta/test/state_sync_test.cpp +++ b/src/meta/test/state_sync_test.cpp @@ -48,7 +48,7 @@ #include "meta_service_test_app.h" #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/flags.h" diff --git a/src/meta/test/update_configuration_test.cpp b/src/meta/test/update_configuration_test.cpp index 27cdf4aa7a..c0ef9b0d63 100644 --- a/src/meta/test/update_configuration_test.cpp +++ b/src/meta/test/update_configuration_test.cpp @@ -59,8 +59,8 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/filesystem.h" diff --git a/src/nfs/nfs_client_impl.h b/src/nfs/nfs_client_impl.h index 6f006f3c57..c0721f4b59 100644 --- a/src/nfs/nfs_client_impl.h +++ b/src/nfs/nfs_client_impl.h @@ -42,9 +42,9 @@ #include "nfs_code_definition.h" #include "nfs_types.h" #include "rpc/rpc_address.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/TokenBucket.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" @@ -55,6 +55,7 @@ namespace dsn { class command_deregister; class disk_file; + namespace utils { class token_buckets; } // namespace utils diff --git a/src/nfs/nfs_node.h b/src/nfs/nfs_node.h index 5b14ad3072..cda645d3c9 100644 --- a/src/nfs/nfs_node.h +++ b/src/nfs/nfs_node.h @@ -34,7 +34,7 @@ #include "common/gpid.h" #include "rpc/rpc_host_port.h" #include "runtime/api_task.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/error_code.h" namespace dsn { diff --git a/src/nfs/nfs_server_impl.cpp b/src/nfs/nfs_server_impl.cpp index d4f8568b81..865922f31d 100644 --- a/src/nfs/nfs_server_impl.cpp +++ b/src/nfs/nfs_server_impl.cpp @@ -38,7 +38,7 @@ #include "nfs/nfs_code_definition.h" #include "nlohmann/json.hpp" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/TokenBucket.h" #include "utils/autoref_ptr.h" #include "utils/env.h" diff --git a/src/nfs/nfs_server_impl.h b/src/nfs/nfs_server_impl.h index f76126cee0..b713be83d8 100644 --- a/src/nfs/nfs_server_impl.h +++ b/src/nfs/nfs_server_impl.h @@ -36,8 +36,8 @@ #include "nfs_code_definition.h" #include "nfs_types.h" #include "runtime/serverlet.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/blob.h" #include "utils/command_manager.h" #include "utils/error_code.h" diff --git a/src/nfs/test/main.cpp b/src/nfs/test/main.cpp index c0880d519e..572283702f 100644 --- a/src/nfs/test/main.cpp +++ b/src/nfs/test/main.cpp @@ -39,8 +39,8 @@ #include "nfs/nfs_node.h" #include "rpc/rpc_host_port.h" #include "runtime/app_model.h" -#include "runtime/task/task_code.h" #include "runtime/tool_api.h" +#include "task/task_code.h" #include "test_util/test_util.h" #include "utils/autoref_ptr.h" #include "utils/env.h" diff --git a/src/perf_counter/perf_counters.cpp b/src/perf_counter/perf_counters.cpp index 24e26c699e..65a5de162d 100644 --- a/src/perf_counter/perf_counters.cpp +++ b/src/perf_counter/perf_counters.cpp @@ -37,7 +37,7 @@ #include "perf_counter/perf_counter_utils.h" #include "runtime/api_layer1.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/command_manager.h" #include "utils/fmt_logging.h" diff --git a/src/ranger/ranger_resource_policy_manager.cpp b/src/ranger/ranger_resource_policy_manager.cpp index ed373d86fa..d0ac9362e0 100644 --- a/src/ranger/ranger_resource_policy_manager.cpp +++ b/src/ranger/ranger_resource_policy_manager.cpp @@ -46,9 +46,9 @@ #include "ranger/ranger_resource_policy_manager.h" #include "ranger_resource_policy_manager.h" #include "rapidjson/allocators.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/blob.h" #include "utils/filesystem.h" #include "utils/flags.h" diff --git a/src/ranger/ranger_resource_policy_manager.h b/src/ranger/ranger_resource_policy_manager.h index 974c0fe84d..876fbc2156 100644 --- a/src/ranger/ranger_resource_policy_manager.h +++ b/src/ranger/ranger_resource_policy_manager.h @@ -28,7 +28,7 @@ #include "ranger_resource_policy.h" #include "rapidjson/document.h" #include "ranger/access_type.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/enum_helper.h" #include "utils/error_code.h" #include "utils/synchronize.h" diff --git a/src/ranger/test/ranger_resource_policy_manager_test.cpp b/src/ranger/test/ranger_resource_policy_manager_test.cpp index a326dad48a..5df17cae0a 100644 --- a/src/ranger/test/ranger_resource_policy_manager_test.cpp +++ b/src/ranger/test/ranger_resource_policy_manager_test.cpp @@ -30,7 +30,7 @@ #include "ranger/access_type.h" #include "ranger/ranger_resource_policy.h" #include "ranger/ranger_resource_policy_manager.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/blob.h" #include "utils/flags.h" diff --git a/src/redis_protocol/proxy_lib/proxy_layer.cpp b/src/redis_protocol/proxy_lib/proxy_layer.cpp index 6588b9ea2f..10652237ea 100644 --- a/src/redis_protocol/proxy_lib/proxy_layer.cpp +++ b/src/redis_protocol/proxy_lib/proxy_layer.cpp @@ -24,7 +24,7 @@ #include "rpc/network.h" #include "rpc/rpc_address.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/fmt_logging.h" diff --git a/src/redis_protocol/proxy_lib/proxy_layer.h b/src/redis_protocol/proxy_lib/proxy_layer.h index 1973dc10f5..82be0b9435 100644 --- a/src/redis_protocol/proxy_lib/proxy_layer.h +++ b/src/redis_protocol/proxy_lib/proxy_layer.h @@ -28,7 +28,7 @@ #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" #include "runtime/serverlet.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/threadpool_code.h" #include "utils/zlocks.h" diff --git a/src/redis_protocol/proxy_ut/redis_proxy_test.cpp b/src/redis_protocol/proxy_ut/redis_proxy_test.cpp index 9f300391b1..30132e0b71 100644 --- a/src/redis_protocol/proxy_ut/redis_proxy_test.cpp +++ b/src/redis_protocol/proxy_ut/redis_proxy_test.cpp @@ -50,7 +50,7 @@ #include "rpc/rpc_message.h" #include "rpc/rpc_stream.h" #include "runtime/service_app.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/blob.h" #include "utils/error_code.h" #include "utils/fmt_logging.h" diff --git a/src/remote_cmd/remote_command.cpp b/src/remote_cmd/remote_command.cpp index 070af7f8ee..69f142cd1b 100644 --- a/src/remote_cmd/remote_command.cpp +++ b/src/remote_cmd/remote_command.cpp @@ -23,11 +23,11 @@ #include #include "command_types.h" -#include "runtime/api_layer1.h" -#include "runtime/api_task.h" #include "rpc/rpc_address.h" #include "rpc/rpc_holder.h" -#include "runtime/task/task_code.h" +#include "runtime/api_layer1.h" +#include "runtime/api_task.h" +#include "task/task_code.h" #include "utils/command_manager.h" #include "utils/error_code.h" #include "utils/threadpool_code.h" diff --git a/src/remote_cmd/remote_command.h b/src/remote_cmd/remote_command.h index 41bddfe5e1..000dd07dc0 100644 --- a/src/remote_cmd/remote_command.h +++ b/src/remote_cmd/remote_command.h @@ -22,7 +22,7 @@ #include #include -#include "runtime/task/task.h" +#include "task/task.h" namespace dsn { class error_code; diff --git a/src/replica/backup/cold_backup_context.cpp b/src/replica/backup/cold_backup_context.cpp index 28f3cd791a..0d9256d064 100644 --- a/src/replica/backup/cold_backup_context.cpp +++ b/src/replica/backup/cold_backup_context.cpp @@ -26,7 +26,7 @@ #include "common/replication.codes.h" #include "replica/replica.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/blob.h" #include "utils/error_code.h" #include "utils/filesystem.h" diff --git a/src/replica/backup/replica_backup_manager.cpp b/src/replica/backup/replica_backup_manager.cpp index e94cc3aea0..ef4c075609 100644 --- a/src/replica/backup/replica_backup_manager.cpp +++ b/src/replica/backup/replica_backup_manager.cpp @@ -36,7 +36,7 @@ #include "replica/replica_context.h" #include "replica/replication_app_base.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/autoref_ptr.h" #include "utils/filesystem.h" #include "utils/flags.h" diff --git a/src/replica/backup/replica_backup_manager.h b/src/replica/backup/replica_backup_manager.h index 40d005537c..f3e7a655c0 100644 --- a/src/replica/backup/replica_backup_manager.h +++ b/src/replica/backup/replica_backup_manager.h @@ -20,7 +20,7 @@ #include #include "replica/replica_base.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/metrics.h" namespace dsn { diff --git a/src/replica/bulk_load/replica_bulk_loader.cpp b/src/replica/bulk_load/replica_bulk_loader.cpp index 989f0e2244..8b876b4200 100644 --- a/src/replica/bulk_load/replica_bulk_loader.cpp +++ b/src/replica/bulk_load/replica_bulk_loader.cpp @@ -40,7 +40,7 @@ #include "rpc/rpc_address.h" #include "rpc/rpc_holder.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/autoref_ptr.h" #include "utils/chrono_literals.h" #include "utils/env.h" diff --git a/src/replica/bulk_load/replica_bulk_loader.h b/src/replica/bulk_load/replica_bulk_loader.h index 92f76810cd..e01285e541 100644 --- a/src/replica/bulk_load/replica_bulk_loader.h +++ b/src/replica/bulk_load/replica_bulk_loader.h @@ -29,7 +29,7 @@ #include "replica/replica.h" #include "replica/replica_base.h" #include "runtime/api_layer1.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/error_code.h" #include "utils/metrics.h" #include "utils/zlocks.h" diff --git a/src/replica/bulk_load/test/replica_bulk_loader_test.cpp b/src/replica/bulk_load/test/replica_bulk_loader_test.cpp index f5c5a3c3f2..b2e7fde0b7 100644 --- a/src/replica/bulk_load/test/replica_bulk_loader_test.cpp +++ b/src/replica/bulk_load/test/replica_bulk_loader_test.cpp @@ -29,7 +29,7 @@ #include "replica/test/replica_test_base.h" #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "test_util/test_util.h" #include "utils/fail_point.h" #include "utils/filesystem.h" diff --git a/src/replica/duplication/duplication_sync_timer.cpp b/src/replica/duplication/duplication_sync_timer.cpp index 0bab2dae51..90d9e1fe45 100644 --- a/src/replica/duplication/duplication_sync_timer.cpp +++ b/src/replica/duplication/duplication_sync_timer.cpp @@ -30,8 +30,8 @@ #include "replica_duplicator_manager.h" #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/chrono_literals.h" #include "utils/error_code.h" diff --git a/src/replica/duplication/duplication_sync_timer.h b/src/replica/duplication/duplication_sync_timer.h index 1a57a7631b..089282d5f5 100644 --- a/src/replica/duplication/duplication_sync_timer.h +++ b/src/replica/duplication/duplication_sync_timer.h @@ -24,7 +24,7 @@ #include "common/gpid.h" #include "common/replication_other_types.h" #include "duplication_types.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/zlocks.h" namespace dsn { diff --git a/src/replica/duplication/mutation_batch.cpp b/src/replica/duplication/mutation_batch.cpp index efcd1eeac3..e6529ea536 100644 --- a/src/replica/duplication/mutation_batch.cpp +++ b/src/replica/duplication/mutation_batch.cpp @@ -28,8 +28,8 @@ #include "mutation_batch.h" #include "replica/replica.h" #include "replica_duplicator.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/error_code.h" diff --git a/src/replica/duplication/replica_duplicator.cpp b/src/replica/duplication/replica_duplicator.cpp index d19033d4ef..d45626e52f 100644 --- a/src/replica/duplication/replica_duplicator.cpp +++ b/src/replica/duplication/replica_duplicator.cpp @@ -17,7 +17,6 @@ #include "replica_duplicator.h" -#include #include #include #include @@ -25,6 +24,7 @@ #include #include #include +#include #include #include "common/duplication_common.h" diff --git a/src/replica/duplication/replica_duplicator.h b/src/replica/duplication/replica_duplicator.h index 1516ec520c..165226eb46 100644 --- a/src/replica/duplication/replica_duplicator.h +++ b/src/replica/duplication/replica_duplicator.h @@ -28,7 +28,7 @@ #include "duplication_types.h" #include "replica/replica_base.h" #include "runtime/pipeline.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/errors.h" #include "utils/metrics.h" #include "utils/zlocks.h" diff --git a/src/replica/duplication/replica_follower.cpp b/src/replica/duplication/replica_follower.cpp index 6507e7bb07..057358f59d 100644 --- a/src/replica/duplication/replica_follower.cpp +++ b/src/replica/duplication/replica_follower.cpp @@ -38,7 +38,7 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/fail_point.h" #include "utils/filesystem.h" #include "utils/fmt_logging.h" diff --git a/src/replica/duplication/replica_follower.h b/src/replica/duplication/replica_follower.h index 7b474ac33b..c502790fb1 100644 --- a/src/replica/duplication/replica_follower.h +++ b/src/replica/duplication/replica_follower.h @@ -27,14 +27,13 @@ #include "dsn.layer2_types.h" #include "replica/replica_base.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/error_code.h" #include "utils/zlocks.h" namespace dsn { namespace replication { class learn_response; - class replica; class replica_follower : replica_base diff --git a/src/replica/duplication/test/load_from_private_log_test.cpp b/src/replica/duplication/test/load_from_private_log_test.cpp index 625294f773..4fba2fdf53 100644 --- a/src/replica/duplication/test/load_from_private_log_test.cpp +++ b/src/replica/duplication/test/load_from_private_log_test.cpp @@ -35,10 +35,10 @@ #include "replica/mutation.h" #include "replica/mutation_log.h" #include "replica/test/mock_utils.h" -#include "runtime/pipeline.h" #include "rpc/rpc_holder.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "runtime/pipeline.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/chrono_literals.h" #include "utils/env.h" diff --git a/src/replica/duplication/test/mutation_batch_test.cpp b/src/replica/duplication/test/mutation_batch_test.cpp index 862e6276b3..a4eac81812 100644 --- a/src/replica/duplication/test/mutation_batch_test.cpp +++ b/src/replica/duplication/test/mutation_batch_test.cpp @@ -35,7 +35,7 @@ #include "replica/mutation.h" #include "replica/prepare_list.h" #include "replica/test/mock_utils.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" diff --git a/src/replica/duplication/test/replica_duplicator_test.cpp b/src/replica/duplication/test/replica_duplicator_test.cpp index 2942d89150..fc07be00ab 100644 --- a/src/replica/duplication/test/replica_duplicator_test.cpp +++ b/src/replica/duplication/test/replica_duplicator_test.cpp @@ -33,7 +33,7 @@ #include "replica/mutation_log.h" #include "replica/test/mock_utils.h" #include "runtime/pipeline.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/errors.h" diff --git a/src/replica/duplication/test/replica_follower_test.cpp b/src/replica/duplication/test/replica_follower_test.cpp index 65e8b7a861..45cf7e9dfa 100644 --- a/src/replica/duplication/test/replica_follower_test.cpp +++ b/src/replica/duplication/test/replica_follower_test.cpp @@ -34,7 +34,7 @@ #include "replica/test/mock_utils.h" #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/fail_point.h" diff --git a/src/replica/log_file.h b/src/replica/log_file.h index fcaff2187a..74700310e0 100644 --- a/src/replica/log_file.h +++ b/src/replica/log_file.h @@ -37,7 +37,7 @@ #include "common/gpid.h" #include "common/replication_other_types.h" #include "runtime/api_task.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/zlocks.h" diff --git a/src/replica/mutation.cpp b/src/replica/mutation.cpp index de754cb9cf..e1c73e8aee 100644 --- a/src/replica/mutation.cpp +++ b/src/replica/mutation.cpp @@ -36,7 +36,7 @@ #include "common/replication.codes.h" #include "replica.h" #include "runtime/api_task.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/binary_reader.h" #include "utils/binary_writer.h" #include "utils/blob.h" diff --git a/src/replica/mutation.h b/src/replica/mutation.h index 0ff5ff7e82..757ce450e6 100644 --- a/src/replica/mutation.h +++ b/src/replica/mutation.h @@ -35,10 +35,10 @@ #include "common/replication_common.h" #include "common/replication_other_types.h" #include "consensus_types.h" -#include "runtime/api_layer1.h" #include "rpc/rpc_message.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "runtime/api_layer1.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/fmt_logging.h" #include "utils/link.h" @@ -48,6 +48,7 @@ class binary_reader; class binary_writer; class blob; class gpid; + namespace utils { class latency_tracer; } // namespace utils diff --git a/src/replica/mutation_log.h b/src/replica/mutation_log.h index 8de9e23bf6..7689004aae 100644 --- a/src/replica/mutation_log.h +++ b/src/replica/mutation_log.h @@ -43,9 +43,9 @@ #include "mutation.h" #include "replica/replica_base.h" #include "runtime/api_task.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/errors.h" diff --git a/src/replica/replica.h b/src/replica/replica.h index 5d417727cc..4ee215c3dc 100644 --- a/src/replica/replica.h +++ b/src/replica/replica.h @@ -52,8 +52,8 @@ #include "rpc/rpc_message.h" #include "runtime/api_layer1.h" #include "runtime/serverlet.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/metrics.h" diff --git a/src/replica/replica_2pc.cpp b/src/replica/replica_2pc.cpp index d3074b724f..884c5c4dc3 100644 --- a/src/replica/replica_2pc.cpp +++ b/src/replica/replica_2pc.cpp @@ -61,12 +61,12 @@ #include "rpc/rpc_stream.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" #include "security/access_controller.h" #include "split/replica_split_manager.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/api_utilities.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" diff --git a/src/replica/replica_backup.cpp b/src/replica/replica_backup.cpp index 79ec2cd0a0..1be16e30c0 100644 --- a/src/replica/replica_backup.cpp +++ b/src/replica/replica_backup.cpp @@ -47,7 +47,7 @@ #include "replica/replication_app_base.h" #include "replica_stub.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/autoref_ptr.h" #include "utils/env.h" #include "utils/error_code.h" diff --git a/src/replica/replica_check.cpp b/src/replica/replica_check.cpp index 0586d7f2cd..c0e13aca55 100644 --- a/src/replica/replica_check.cpp +++ b/src/replica/replica_check.cpp @@ -51,9 +51,9 @@ #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" #include "split/replica_split_manager.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/fail_point.h" diff --git a/src/replica/replica_chkpt.cpp b/src/replica/replica_chkpt.cpp index 1a18d62ac9..b975626b61 100644 --- a/src/replica/replica_chkpt.cpp +++ b/src/replica/replica_chkpt.cpp @@ -51,9 +51,9 @@ #include "rpc/rpc_holder.h" #include "rpc/rpc_host_port.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" #include "split/replica_split_manager.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/chrono_literals.h" diff --git a/src/replica/replica_config.cpp b/src/replica/replica_config.cpp index 5137ca2b4a..8fc73eec71 100644 --- a/src/replica/replica_config.cpp +++ b/src/replica/replica_config.cpp @@ -66,10 +66,10 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" #include "security/access_controller.h" #include "split/replica_split_manager.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/fail_point.h" diff --git a/src/replica/replica_context.h b/src/replica/replica_context.h index 259e5e9a1d..c1719c8de9 100644 --- a/src/replica/replica_context.h +++ b/src/replica/replica_context.h @@ -42,7 +42,7 @@ #include "mutation.h" #include "rpc/rpc_host_port.h" #include "runtime/api_layer1.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/fmt_logging.h" diff --git a/src/replica/replica_disk_migrator.cpp b/src/replica/replica_disk_migrator.cpp index f0ff784381..597644103f 100644 --- a/src/replica/replica_disk_migrator.cpp +++ b/src/replica/replica_disk_migrator.cpp @@ -30,7 +30,7 @@ #include "replica/replica_stub.h" #include "replica/replication_app_base.h" #include "replica_disk_migrator.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/error_code.h" #include "utils/fail_point.h" #include "utils/filesystem.h" diff --git a/src/replica/replica_disk_migrator.h b/src/replica/replica_disk_migrator.h index a3c52fe503..0d309cf77a 100644 --- a/src/replica/replica_disk_migrator.h +++ b/src/replica/replica_disk_migrator.h @@ -24,7 +24,7 @@ #include "replica/replica_base.h" #include "replica/replica_stub.h" #include "replica_admin_types.h" -#include "runtime/task/task.h" +#include "task/task.h" namespace dsn { namespace replication { diff --git a/src/replica/replica_init.cpp b/src/replica/replica_init.cpp index 664587f636..1bee60eda7 100644 --- a/src/replica/replica_init.cpp +++ b/src/replica/replica_init.cpp @@ -43,8 +43,8 @@ #include "replica/prepare_list.h" #include "replica/replication_app_base.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/filesystem.h" diff --git a/src/replica/replica_learn.cpp b/src/replica/replica_learn.cpp index 19d225973b..cbb8866080 100644 --- a/src/replica/replica_learn.cpp +++ b/src/replica/replica_learn.cpp @@ -61,8 +61,8 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/binary_reader.h" #include "utils/binary_writer.h" diff --git a/src/replica/replica_restore.cpp b/src/replica/replica_restore.cpp index 13fbda2d91..00b260dc0a 100644 --- a/src/replica/replica_restore.cpp +++ b/src/replica/replica_restore.cpp @@ -42,10 +42,10 @@ #include "rpc/dns_resolver.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/env.h" diff --git a/src/replica/replica_stub.cpp b/src/replica/replica_stub.cpp index b0f120a9da..de2b789730 100644 --- a/src/replica/replica_stub.cpp +++ b/src/replica/replica_stub.cpp @@ -68,9 +68,9 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" #include "security/access_controller.h" #include "split/replica_split_manager.h" +#include "task/async_calls.h" #include "utils/command_manager.h" #include "utils/env.h" #include "utils/errors.h" diff --git a/src/replica/replica_stub.h b/src/replica/replica_stub.h index 8ddd0d26df..09f1e624bb 100644 --- a/src/replica/replica_stub.h +++ b/src/replica/replica_stub.h @@ -59,10 +59,10 @@ #include "rpc/rpc_holder.h" #include "rpc/rpc_host_port.h" #include "runtime/serverlet.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" #include "security/access_controller.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/flags.h" diff --git a/src/replica/replica_throttle.cpp b/src/replica/replica_throttle.cpp index c6af3fb259..ada61d89ee 100644 --- a/src/replica/replica_throttle.cpp +++ b/src/replica/replica_throttle.cpp @@ -27,7 +27,7 @@ #include "dsn.layer2_types.h" #include "replica.h" #include "rpc/rpc_message.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/fmt_logging.h" diff --git a/src/replica/replication_app_base.cpp b/src/replica/replication_app_base.cpp index e8a3045039..0c82513dce 100644 --- a/src/replica/replication_app_base.cpp +++ b/src/replica/replication_app_base.cpp @@ -29,10 +29,10 @@ #include #include #include +#include #include #include -#include #include "common/bulk_load_common.h" #include "common/duplication_common.h" #include "common/replica_envs.h" @@ -45,8 +45,8 @@ #include "replica/replication_app_base.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/binary_reader.h" #include "utils/binary_writer.h" diff --git a/src/replica/split/replica_split_manager.cpp b/src/replica/split/replica_split_manager.cpp index cdb485d3d7..0e2c9422bb 100644 --- a/src/replica/split/replica_split_manager.cpp +++ b/src/replica/split/replica_split_manager.cpp @@ -40,8 +40,8 @@ #include "rpc/rpc_holder.h" #include "rpc/rpc_host_port.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/chrono_literals.h" #include "utils/defer.h" diff --git a/src/replica/split/test/replica_split_test.cpp b/src/replica/split/test/replica_split_test.cpp index f2de89839c..2f18fe751e 100644 --- a/src/replica/split/test/replica_split_test.cpp +++ b/src/replica/split/test/replica_split_test.cpp @@ -42,8 +42,8 @@ #include "replica/test/replica_test_base.h" #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/fail_point.h" diff --git a/src/replica/storage/simple_kv/simple_kv.client.h b/src/replica/storage/simple_kv/simple_kv.client.h index 30bae84158..3fc12cd919 100644 --- a/src/replica/storage/simple_kv/simple_kv.client.h +++ b/src/replica/storage/simple_kv/simple_kv.client.h @@ -25,13 +25,15 @@ */ #pragma once + #include -#include "utils/optional.h" -#include "rpc/dns_resolver.h" -#include "runtime/task/async_calls.h" + #include "client/partition_resolver.h" +#include "rpc/dns_resolver.h" #include "simple_kv.code.definition.h" #include "simple_kv_types.h" +#include "task/async_calls.h" +#include "utils/optional.h" namespace dsn { namespace replication { diff --git a/src/replica/storage/simple_kv/test/case.cpp b/src/replica/storage/simple_kv/test/case.cpp index 5b8d87af5b..0689c13315 100644 --- a/src/replica/storage/simple_kv/test/case.cpp +++ b/src/replica/storage/simple_kv/test/case.cpp @@ -48,8 +48,8 @@ #include "replica/storage/simple_kv/test/common.h" #include "rpc/rpc_message.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/task.h" +#include "task/task_code.h" #include "simple_kv.server.impl.h" #include "utils/fmt_logging.h" #include "utils/ports.h" diff --git a/src/replica/storage/simple_kv/test/client.cpp b/src/replica/storage/simple_kv/test/client.cpp index dcdadb26f7..23b20c6b49 100644 --- a/src/replica/storage/simple_kv/test/client.cpp +++ b/src/replica/storage/simple_kv/test/client.cpp @@ -43,9 +43,9 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" #include "simple_kv_types.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/flags.h" #include "utils/fmt_logging.h" #include "utils/threadpool_code.h" diff --git a/src/replica/storage/simple_kv/test/client.h b/src/replica/storage/simple_kv/test/client.h index 3bf5fe9607..75d6311461 100644 --- a/src/replica/storage/simple_kv/test/client.h +++ b/src/replica/storage/simple_kv/test/client.h @@ -33,7 +33,7 @@ #include "meta_admin_types.h" #include "rpc/rpc_host_port.h" #include "runtime/service_app.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/error_code.h" namespace dsn { diff --git a/src/replica/storage/simple_kv/test/injector.cpp b/src/replica/storage/simple_kv/test/injector.cpp index 9dd9d3a4bf..d1c12374b0 100644 --- a/src/replica/storage/simple_kv/test/injector.cpp +++ b/src/replica/storage/simple_kv/test/injector.cpp @@ -30,8 +30,8 @@ #include "case.h" #include "checker.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/join_point.h" namespace dsn { diff --git a/src/replica/test/backup_block_service_mock.h b/src/replica/test/backup_block_service_mock.h index 4ac8bc95fe..36a2671182 100644 --- a/src/replica/test/backup_block_service_mock.h +++ b/src/replica/test/backup_block_service_mock.h @@ -21,9 +21,9 @@ #include "utils/filesystem.h" #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "block_service/block_service.h" #include "replica/replica_context.h" #include "replication_service_test_app.h" diff --git a/src/replica/test/mutation_log_learn_test.cpp b/src/replica/test/mutation_log_learn_test.cpp index a3e67d9f20..f269c79d1c 100644 --- a/src/replica/test/mutation_log_learn_test.cpp +++ b/src/replica/test/mutation_log_learn_test.cpp @@ -41,7 +41,7 @@ #include "replica/mutation_log.h" #include "replica/test/mock_utils.h" #include "replica_test_base.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/binary_writer.h" #include "utils/blob.h" diff --git a/src/replica/test/open_replica_test.cpp b/src/replica/test/open_replica_test.cpp index 46f520d5aa..c476a0d26d 100644 --- a/src/replica/test/open_replica_test.cpp +++ b/src/replica/test/open_replica_test.cpp @@ -33,7 +33,7 @@ #include "replica_test_base.h" #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/filesystem.h" namespace dsn { diff --git a/src/replica/test/replica_disk_migrate_test.cpp b/src/replica/test/replica_disk_migrate_test.cpp index e73c85dfc6..df410925ef 100644 --- a/src/replica/test/replica_disk_migrate_test.cpp +++ b/src/replica/test/replica_disk_migrate_test.cpp @@ -40,8 +40,8 @@ #include "replica/test/replica_disk_test_base.h" #include "replica_admin_types.h" #include "rpc/rpc_holder.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/fail_point.h" diff --git a/src/replica/test/replica_test.cpp b/src/replica/test/replica_test.cpp index 2e0a85e435..711d364feb 100644 --- a/src/replica/test/replica_test.cpp +++ b/src/replica/test/replica_test.cpp @@ -51,12 +51,12 @@ #include "replica/replication_app_base.h" #include "replica/test/mock_utils.h" #include "replica_test_base.h" -#include "runtime/api_layer1.h" #include "rpc/network.sim.h" #include "rpc/rpc_address.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "runtime/api_layer1.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "test_util/test_util.h" #include "utils/autoref_ptr.h" #include "utils/defer.h" diff --git a/src/rpc/asio_net_provider.cpp b/src/rpc/asio_net_provider.cpp index 48a70e45c8..ea8ce0db47 100644 --- a/src/rpc/asio_net_provider.cpp +++ b/src/rpc/asio_net_provider.cpp @@ -71,8 +71,8 @@ // IWYU pragma: no_include "boost/asio/ip/impl/address_v4.ipp" // IWYU pragma: no_include "boost/asio/socket_base.hpp" // IWYU pragma: no_include "boost/system/error_code.hpp -#include "runtime/task/task.h" -#include "runtime/task/task_worker.h" +#include "task/task.h" +#include "task/task_worker.h" #include "runtime/tool_api.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" diff --git a/src/rpc/asio_net_provider.h b/src/rpc/asio_net_provider.h index 203dc5249e..3b214c71df 100644 --- a/src/rpc/asio_net_provider.h +++ b/src/rpc/asio_net_provider.h @@ -39,7 +39,7 @@ #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/error_code.h" #include "utils/synchronize.h" diff --git a/src/rpc/dsn_message_parser.cpp b/src/rpc/dsn_message_parser.cpp index 602db8a661..178a602738 100644 --- a/src/rpc/dsn_message_parser.cpp +++ b/src/rpc/dsn_message_parser.cpp @@ -32,8 +32,8 @@ #include #include "rpc/rpc_message.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/blob.h" #include "utils/crc.h" #include "utils/fmt_logging.h" diff --git a/src/rpc/message_parser.cpp b/src/rpc/message_parser.cpp index 33d2be542d..575fef6d03 100644 --- a/src/rpc/message_parser.cpp +++ b/src/rpc/message_parser.cpp @@ -36,7 +36,7 @@ #include "message_parser_manager.h" #include "rpc/message_parser.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/blob.h" #include "utils/fmt_logging.h" #include "utils/utils.h" diff --git a/src/rpc/message_parser.h b/src/rpc/message_parser.h index 0cb9e044a1..bc67536a2d 100644 --- a/src/rpc/message_parser.h +++ b/src/rpc/message_parser.h @@ -31,7 +31,7 @@ #include #include "rpc/rpc_message.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" diff --git a/src/rpc/network.cpp b/src/rpc/network.cpp index 172674e820..52b8963494 100644 --- a/src/rpc/network.cpp +++ b/src/rpc/network.cpp @@ -30,15 +30,15 @@ #include #include #include +#include #include -#include #include "message_parser_manager.h" -#include "runtime/api_task.h" #include "rpc/rpc_address.h" #include "rpc/rpc_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "runtime/api_task.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/blob.h" #include "utils/customizable_id.h" #include "utils/errors.h" diff --git a/src/rpc/network.h b/src/rpc/network.h index 7139a2997b..ce638299f6 100644 --- a/src/rpc/network.h +++ b/src/rpc/network.h @@ -36,7 +36,7 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "rpc_address.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/fmt_utils.h" diff --git a/src/rpc/network.sim.cpp b/src/rpc/network.sim.cpp index ecde4fb171..359afc8ebc 100644 --- a/src/rpc/network.sim.cpp +++ b/src/rpc/network.sim.cpp @@ -33,7 +33,7 @@ #include "boost/asio/ip/impl/host_name.ipp" #include "network.sim.h" #include "runtime/node_scoper.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/flags.h" diff --git a/src/rpc/network.sim.h b/src/rpc/network.sim.h index 3d1c99905c..1064039335 100644 --- a/src/rpc/network.sim.h +++ b/src/rpc/network.sim.h @@ -33,7 +33,7 @@ #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/error_code.h" namespace dsn { diff --git a/src/rpc/raw_message_parser.cpp b/src/rpc/raw_message_parser.cpp index 882c045432..cd57d37c13 100644 --- a/src/rpc/raw_message_parser.cpp +++ b/src/rpc/raw_message_parser.cpp @@ -34,8 +34,8 @@ #include "network.h" #include "rpc/rpc_address.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/blob.h" #include "utils/fmt_logging.h" #include "utils/join_point.h" diff --git a/src/rpc/raw_message_parser.h b/src/rpc/raw_message_parser.h index 62e4389e20..5fcdd28ebb 100644 --- a/src/rpc/raw_message_parser.h +++ b/src/rpc/raw_message_parser.h @@ -28,7 +28,7 @@ #define RAW_MESSAGE_PARSER_H #include "rpc/message_parser.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/customizable_id.h" namespace dsn { diff --git a/src/rpc/rpc_engine.h b/src/rpc/rpc_engine.h index 0e151aff31..0447977709 100644 --- a/src/rpc/rpc_engine.h +++ b/src/rpc/rpc_engine.h @@ -38,9 +38,9 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "runtime/api_task.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/fmt_logging.h" diff --git a/src/rpc/rpc_holder.h b/src/rpc/rpc_holder.h index b639b59810..9d753354cd 100644 --- a/src/rpc/rpc_holder.h +++ b/src/rpc/rpc_holder.h @@ -27,13 +27,13 @@ #include "client/partition_resolver.h" #include "dsn.layer2_types.h" -#include "rpc_address.h" -#include "runtime/api_layer1.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "rpc_address.h" +#include "runtime/api_layer1.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/chrono_literals.h" #include "utils/error_code.h" diff --git a/src/rpc/rpc_message.h b/src/rpc/rpc_message.h index 0645b48cb7..9e1d73717d 100644 --- a/src/rpc/rpc_message.h +++ b/src/rpc/rpc_message.h @@ -34,8 +34,8 @@ #include "common/gpid.h" #include "rpc_address.h" #include "rpc_host_port.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/error_code.h" diff --git a/src/rpc/rpc_stream.h b/src/rpc/rpc_stream.h index 01afcd11e2..f9953e8d89 100644 --- a/src/rpc/rpc_stream.h +++ b/src/rpc/rpc_stream.h @@ -31,7 +31,7 @@ #include "runtime/api_task.h" #include "runtime/app_model.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/api_utilities.h" #include "utils/binary_reader.h" #include "utils/binary_writer.h" diff --git a/src/rpc/rpc_task.cpp b/src/rpc/rpc_task.cpp index 858bdc3543..d0d94e3b40 100644 --- a/src/rpc/rpc_task.cpp +++ b/src/rpc/rpc_task.cpp @@ -32,11 +32,11 @@ #include "runtime/api_task.h" #include "rpc/rpc_message.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_engine.h" -#include "runtime/task/task_spec.h" -#include "runtime/task/task_worker.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_engine.h" +#include "task/task_spec.h" +#include "task/task_worker.h" #include "utils/error_code.h" #include "utils/fmt_logging.h" #include "utils/join_point.h" diff --git a/src/rpc/test/corrupt_message_test.cpp b/src/rpc/test/corrupt_message_test.cpp index 74a82671c6..a97818f00c 100644 --- a/src/rpc/test/corrupt_message_test.cpp +++ b/src/rpc/test/corrupt_message_test.cpp @@ -32,9 +32,9 @@ #include "gtest/gtest.h" #include "rpc/rpc_address.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" #include "runtime/test_utils.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/error_code.h" // TODO(yingchun): the tests are failed because the fault injector is not work well as expected. diff --git a/src/rpc/test/host_port_test.cpp b/src/rpc/test/host_port_test.cpp index 11bdb2ce36..8fdb7a4e21 100644 --- a/src/rpc/test/host_port_test.cpp +++ b/src/rpc/test/host_port_test.cpp @@ -38,11 +38,11 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_spec.h" -#include "runtime/task/task_tracker.h" #include "runtime/test_utils.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_spec.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/errors.h" diff --git a/src/rpc/test/net_provider_test.cpp b/src/rpc/test/net_provider_test.cpp index fd92420160..825a9a10ff 100644 --- a/src/rpc/test/net_provider_test.cpp +++ b/src/rpc/test/net_provider_test.cpp @@ -43,9 +43,9 @@ #include "rpc/rpc_message.h" #include "rpc/serialization.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "runtime/test_utils.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" diff --git a/src/rpc/test/rpc_message_test.cpp b/src/rpc/test/rpc_message_test.cpp index d3a710dd0f..19bde1e2d5 100644 --- a/src/rpc/test/rpc_message_test.cpp +++ b/src/rpc/test/rpc_message_test.cpp @@ -33,13 +33,12 @@ #include "common/gpid.h" #include "dsn.layer2_types.h" #include "gtest/gtest.h" -#include "runtime/message_utils.cpp" -#include "runtime/message_utils.h" #include "rpc/rpc_address.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "runtime/message_utils.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/crc.h" diff --git a/src/rpc/test/rpc_test.cpp b/src/rpc/test/rpc_test.cpp index 80fc8bba7d..71a0f82d80 100644 --- a/src/rpc/test/rpc_test.cpp +++ b/src/rpc/test/rpc_test.cpp @@ -37,9 +37,9 @@ #include "rpc/rpc_host_port.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" #include "runtime/test_utils.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/fmt_logging.h" diff --git a/src/rpc/test/thrift_message_parser_test.cpp b/src/rpc/test/thrift_message_parser_test.cpp index 6c78a18d30..acc59d088a 100644 --- a/src/rpc/test/thrift_message_parser_test.cpp +++ b/src/rpc/test/thrift_message_parser_test.cpp @@ -32,8 +32,8 @@ #include "rpc/rpc_message.h" #include "rpc/rpc_stream.h" #include "rpc/thrift_message_parser.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/binary_writer.h" #include "utils/blob.h" diff --git a/src/rpc/thrift_message_parser.h b/src/rpc/thrift_message_parser.h index c295d4bb5c..71b1ec222a 100644 --- a/src/rpc/thrift_message_parser.h +++ b/src/rpc/thrift_message_parser.h @@ -32,7 +32,7 @@ #include "request_meta_types.h" #include "rpc/message_parser.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/customizable_id.h" namespace dsn { diff --git a/src/runtime/CMakeLists.txt b/src/runtime/CMakeLists.txt index ab4f11175f..5fd2fbe8e6 100644 --- a/src/runtime/CMakeLists.txt +++ b/src/runtime/CMakeLists.txt @@ -23,11 +23,9 @@ # THE SOFTWARE. add_subdirectory(test) -add_subdirectory(task) # TODO(zlw) remove perf_counter from dsn_runtime after the refactor by WuTao add_library(dsn_runtime STATIC - $ $ core_main.cpp dsn.layer2_types.cpp @@ -46,6 +44,6 @@ add_library(dsn_runtime STATIC tool_api.cpp tracer.cpp zlocks.cpp) -target_link_libraries(dsn_runtime PRIVATE dsn_rpc dsn_security dsn_utils sasl2 gssapi_krb5 krb5) +target_link_libraries(dsn_runtime PRIVATE dsn_rpc dsn_security dsn_task dsn_utils sasl2 gssapi_krb5 krb5) define_file_basename_for_sources(dsn_runtime) install(TARGETS dsn_runtime DESTINATION "lib") diff --git a/src/runtime/api_layer1.h b/src/runtime/api_layer1.h index 6734c359f7..307982f76f 100644 --- a/src/runtime/api_layer1.h +++ b/src/runtime/api_layer1.h @@ -30,11 +30,11 @@ #pragma once -#include "runtime/api_task.h" #include "common/gpid.h" #include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task_tracker.h" +#include "runtime/api_task.h" +#include "task/task_tracker.h" /*! @defgroup service-api-c Core Service API diff --git a/src/runtime/api_task.h b/src/runtime/api_task.h index 9db9c3f2fa..7900028738 100644 --- a/src/runtime/api_task.h +++ b/src/runtime/api_task.h @@ -33,7 +33,7 @@ #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" /*! @addtogroup task-common diff --git a/src/runtime/env.sim.cpp b/src/runtime/env.sim.cpp index 3b29d56624..1b19fd707a 100644 --- a/src/runtime/env.sim.cpp +++ b/src/runtime/env.sim.cpp @@ -28,7 +28,7 @@ #include -#include "runtime/task/task_worker.h" +#include "task/task_worker.h" #include "utils/flags.h" #include "utils/fmt_logging.h" #include "utils/join_point.h" diff --git a/src/runtime/fault_injector.cpp b/src/runtime/fault_injector.cpp index 85b9e38884..f14bcebdcc 100644 --- a/src/runtime/fault_injector.cpp +++ b/src/runtime/fault_injector.cpp @@ -35,9 +35,9 @@ #include "aio/aio_task.h" #include "fmt/core.h" #include "rpc/rpc_message.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/blob.h" #include "utils/config_api.h" #include "utils/config_helper.h" diff --git a/src/runtime/global_config.cpp b/src/runtime/global_config.cpp index a113969a49..3238708296 100644 --- a/src/runtime/global_config.cpp +++ b/src/runtime/global_config.cpp @@ -33,7 +33,7 @@ #include "runtime/global_config.h" #include "runtime/service_app.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/config_api.h" #include "utils/filesystem.h" #include "utils/fmt_logging.h" diff --git a/src/runtime/global_config.h b/src/runtime/global_config.h index 3004bfe6f6..87c36cb975 100644 --- a/src/runtime/global_config.h +++ b/src/runtime/global_config.h @@ -36,7 +36,7 @@ #include #include -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/config_api.h" #include "utils/config_helper.h" #include "utils/customizable_id.h" diff --git a/src/runtime/message_utils.h b/src/runtime/message_utils.h index bffcfeae51..0ba08f74f5 100644 --- a/src/runtime/message_utils.h +++ b/src/runtime/message_utils.h @@ -20,8 +20,8 @@ #include #include "rpc/rpc_stream.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "thrift_helper.h" #include "utils/binary_reader.h" #include "utils/binary_writer.h" diff --git a/src/runtime/nativerun.cpp b/src/runtime/nativerun.cpp index 93eb9e967f..dbaa880732 100644 --- a/src/runtime/nativerun.cpp +++ b/src/runtime/nativerun.cpp @@ -31,7 +31,7 @@ #include #include "runtime/global_config.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/flags.h" #include "utils/threadpool_spec.h" diff --git a/src/runtime/pipeline.h b/src/runtime/pipeline.h index c538bf2efa..4c555c1f77 100644 --- a/src/runtime/pipeline.h +++ b/src/runtime/pipeline.h @@ -20,9 +20,9 @@ #pragma once #include -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" -#include "runtime/task/async_calls.h" +#include "task/task_code.h" +#include "task/task_tracker.h" +#include "task/async_calls.h" #include "utils/chrono_literals.h" namespace dsn { diff --git a/src/runtime/profiler.cpp b/src/runtime/profiler.cpp index d4607dfdd6..0c06fc4649 100644 --- a/src/runtime/profiler.cpp +++ b/src/runtime/profiler.cpp @@ -49,23 +49,22 @@ START<== queue(server) == ENQUEUE <===== net(reply) ======= REPLY <============= */ #include "runtime/profiler.h" -#include #include #include #include #include #include +#include #include -#include #include "aio/aio_task.h" #include "fmt/core.h" #include "profiler_header.h" -#include "runtime/api_layer1.h" #include "rpc/rpc_message.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "runtime/api_layer1.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/config_api.h" #include "utils/extensible_object.h" #include "utils/flags.h" diff --git a/src/runtime/providers.common.cpp b/src/runtime/providers.common.cpp index 007e016cd2..e449782e7f 100644 --- a/src/runtime/providers.common.cpp +++ b/src/runtime/providers.common.cpp @@ -26,18 +26,18 @@ #include -#include "runtime/env_provider.h" -#include "runtime/providers.common.h" #include "rpc/asio_net_provider.h" #include "rpc/dsn_message_parser.h" #include "rpc/network.sim.h" #include "rpc/raw_message_parser.h" #include "rpc/thrift_message_parser.h" -#include "runtime/task/hpc_task_queue.h" -#include "runtime/task/simple_task_queue.h" -#include "runtime/task/task_spec.h" -#include "runtime/task/task_worker.h" +#include "runtime/env_provider.h" +#include "runtime/providers.common.h" #include "runtime/tool_api.h" +#include "task/hpc_task_queue.h" +#include "task/simple_task_queue.h" +#include "task/task_spec.h" +#include "task/task_worker.h" #include "utils/flags.h" #include "utils/lockp.std.h" #include "utils/zlock_provider.h" diff --git a/src/runtime/scheduler.cpp b/src/runtime/scheduler.cpp index 440e105907..db9c79b2e7 100644 --- a/src/runtime/scheduler.cpp +++ b/src/runtime/scheduler.cpp @@ -35,9 +35,9 @@ #include "runtime/node_scoper.h" #include "runtime/service_app.h" #include "runtime/simulator.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_queue.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_queue.h" +#include "task/task_spec.h" #include "scheduler.h" #include "utils/fmt_logging.h" #include "utils/join_point.h" diff --git a/src/runtime/scheduler.h b/src/runtime/scheduler.h index 422690f2a9..7505522083 100644 --- a/src/runtime/scheduler.h +++ b/src/runtime/scheduler.h @@ -35,8 +35,8 @@ #include #include "runtime/simulator.h" -#include "runtime/task/task.h" -#include "runtime/task/task_worker.h" +#include "task/task.h" +#include "task/task_worker.h" #include "utils/extensible_object.h" #include "utils/singleton.h" #include "utils/synchronize.h" diff --git a/src/runtime/service_api_c.cpp b/src/runtime/service_api_c.cpp index 64b6bb66c3..ecf2aa564c 100644 --- a/src/runtime/service_api_c.cpp +++ b/src/runtime/service_api_c.cpp @@ -57,11 +57,11 @@ #include "runtime/global_config.h" #include "runtime/service_app.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_engine.h" -#include "runtime/task/task_spec.h" -#include "runtime/task/task_worker.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_engine.h" +#include "task/task_spec.h" +#include "task/task_worker.h" #include "runtime/tool_api.h" #include "security/init.h" #include "security/negotiation_manager.h" diff --git a/src/runtime/service_app.h b/src/runtime/service_app.h index b8e62d1659..81724409ea 100644 --- a/src/runtime/service_app.h +++ b/src/runtime/service_app.h @@ -32,7 +32,7 @@ #include "utils/api_utilities.h" #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" #include "rpc/rpc_host_port.h" #include "rpc/rpc_address.h" diff --git a/src/runtime/service_engine.cpp b/src/runtime/service_engine.cpp index defc3f5794..0012951186 100644 --- a/src/runtime/service_engine.cpp +++ b/src/runtime/service_engine.cpp @@ -35,12 +35,12 @@ #include "common/gpid.h" #include "fmt/core.h" #include "nlohmann/json.hpp" -#include "runtime/node_scoper.h" #include "rpc/rpc_engine.h" #include "rpc/rpc_message.h" -#include "runtime/task/task.h" -#include "runtime/task/task_engine.h" -#include "runtime/task/task_spec.h" +#include "runtime/node_scoper.h" +#include "task/task.h" +#include "task/task_engine.h" +#include "task/task_spec.h" #include "utils/command_manager.h" #include "utils/factory_store.h" #include "utils/filesystem.h" diff --git a/src/runtime/service_engine.h b/src/runtime/service_engine.h index f2c7aea76e..77eae41431 100644 --- a/src/runtime/service_engine.h +++ b/src/runtime/service_engine.h @@ -35,7 +35,7 @@ #include "runtime/api_task.h" #include "runtime/global_config.h" #include "runtime/service_app.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/error_code.h" #include "utils/singleton.h" diff --git a/src/runtime/simulator.cpp b/src/runtime/simulator.cpp index ab1225c171..51aad7dcaf 100644 --- a/src/runtime/simulator.cpp +++ b/src/runtime/simulator.cpp @@ -30,8 +30,8 @@ #include "env.sim.h" #include "runtime/global_config.h" -#include "runtime/task/task_engine.sim.h" -#include "runtime/task/task_spec.h" +#include "task/task_engine.sim.h" +#include "task/task_spec.h" #include "scheduler.h" #include "service_engine.h" #include "sim_clock.h" diff --git a/src/runtime/test/config-test-sim.ini b/src/runtime/test/config-test-sim.ini index b75516ee5f..6c54eba106 100644 --- a/src/runtime/test/config-test-sim.ini +++ b/src/runtime/test/config-test-sim.ini @@ -36,7 +36,7 @@ run = true ports = count = 1 delay_seconds = 1 -pools = THREAD_POOL_DEFAULT, THREAD_POOL_TEST_SERVER, THREAD_POOL_FOR_TEST_1, THREAD_POOL_FOR_TEST_2 +pools = THREAD_POOL_DEFAULT, THREAD_POOL_TEST_SERVER [apps.server] type = test @@ -106,14 +106,6 @@ worker_priority = THREAD_xPRIORITY_NORMAL [threadpool.THREAD_POOL_TEST_SERVER] partitioned = false -[threadpool.THREAD_POOL_FOR_TEST_1] -worker_count = 2 -partitioned = false - -[threadpool.THREAD_POOL_FOR_TEST_2] -worker_count = 2 -partitioned = true - [core.test] count = 1 run = true diff --git a/src/runtime/test/config-test.ini b/src/runtime/test/config-test.ini index ee6f5c5d7d..46681e369a 100644 --- a/src/runtime/test/config-test.ini +++ b/src/runtime/test/config-test.ini @@ -37,7 +37,7 @@ run = true ports = 20001 count = 1 delay_seconds = 1 -pools = THREAD_POOL_DEFAULT, THREAD_POOL_TEST_SERVER, THREAD_POOL_FOR_TEST_1, THREAD_POOL_FOR_TEST_2 +pools = THREAD_POOL_DEFAULT, THREAD_POOL_TEST_SERVER [apps.server] type = test @@ -124,20 +124,6 @@ worker_priority = THREAD_xPRIORITY_NORMAL [threadpool.THREAD_POOL_TEST_SERVER] partitioned = false -[threadpool.THREAD_POOL_FOR_TEST_1] -worker_count = 2 -worker_priority = THREAD_xPRIORITY_HIGHEST -worker_share_core = false -worker_affinity_mask = 1 -partitioned = false - -[threadpool.THREAD_POOL_FOR_TEST_2] -worker_count = 2 -worker_priority = THREAD_xPRIORITY_NORMAL -worker_share_core = true -worker_affinity_mask = 1 -partitioned = true - [components.simple_perf_counter] counter_computation_interval_seconds = 1 diff --git a/src/runtime/test/pipeline_test.cpp b/src/runtime/test/pipeline_test.cpp index 444c7f2684..4158b3b596 100644 --- a/src/runtime/test/pipeline_test.cpp +++ b/src/runtime/test/pipeline_test.cpp @@ -30,7 +30,7 @@ #include "common/replication.codes.h" #include "gtest/gtest.h" #include "runtime/pipeline.h" -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" #include "utils/chrono_literals.h" namespace dsn { diff --git a/src/runtime/test/service_api_c.cpp b/src/runtime/test/service_api_c.cpp index c9eb97f39e..9ef745534d 100644 --- a/src/runtime/test/service_api_c.cpp +++ b/src/runtime/test/service_api_c.cpp @@ -31,14 +31,15 @@ #include #include +#include "common/gpid.h" #include "gtest/gtest.h" #include "runtime/api_layer1.h" #include "runtime/global_config.h" #include "runtime/service_app.h" #include "runtime/service_engine.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" #include "runtime/tool_api.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/config_api.h" #include "utils/error_code.h" #include "utils/flags.h" diff --git a/src/runtime/test/sim_lock.cpp b/src/runtime/test/sim_lock.cpp index 30c18aa7eb..b0ffe84f38 100644 --- a/src/runtime/test/sim_lock.cpp +++ b/src/runtime/test/sim_lock.cpp @@ -31,8 +31,8 @@ #include "runtime/global_config.h" #include "runtime/scheduler.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_engine.sim.h" +#include "task/task.h" +#include "task/task_engine.sim.h" #include "utils/synchronize.h" #include "utils/zlocks.h" diff --git a/src/runtime/test_utils.h b/src/runtime/test_utils.h index 8278404729..29df59b28a 100644 --- a/src/runtime/test_utils.h +++ b/src/runtime/test_utils.h @@ -26,30 +26,25 @@ #pragma once -#include "runtime/api_task.h" -#include "runtime/api_layer1.h" -#include "runtime/app_model.h" -#include "utils/api_utilities.h" -#include "utils/error_code.h" -#include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include +#include #include "common/gpid.h" #include "rpc/dns_resolver.h" -#include "rpc/serialization.h" -#include "rpc/rpc_stream.h" -#include "runtime/serverlet.h" -#include "runtime/service_app.h" +#include "rpc/rpc_address.h" #include "rpc/rpc_host_port.h" -#include "rpc/serialization.h" #include "rpc/rpc_stream.h" +#include "rpc/serialization.h" #include "runtime/serverlet.h" #include "runtime/service_app.h" -#include "rpc/rpc_address.h" -#include "rpc/rpc_host_port.h" -#include "runtime/task/task.h" -#include "runtime/task/task_worker.h" -#include -#include +#include "runtime/api_task.h" +#include "runtime/api_layer1.h" +#include "runtime/app_model.h" +#include "task/task_code.h" +#include "task/task.h" +#include "task/task_worker.h" +#include "utils/api_utilities.h" +#include "utils/error_code.h" +#include "utils/threadpool_code.h" #ifndef TEST_PORT_BEGIN #define TEST_PORT_BEGIN 20201 diff --git a/src/runtime/tool_api.cpp b/src/runtime/tool_api.cpp index c04117106b..b80a5016f7 100644 --- a/src/runtime/tool_api.cpp +++ b/src/runtime/tool_api.cpp @@ -26,18 +26,17 @@ #include "runtime/tool_api.h" -#include #include #include #include #include #include -#include "runtime/global_config.h" #include "rpc/message_parser_manager.h" +#include "runtime/global_config.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/error_code.h" #include "utils/factory_store.h" #include "utils/fmt_logging.h" diff --git a/src/runtime/tool_api.h b/src/runtime/tool_api.h index 1da3613de6..20c87e2cdd 100644 --- a/src/runtime/tool_api.h +++ b/src/runtime/tool_api.h @@ -42,14 +42,13 @@ Component providers define the interface for the local components (e.g., network #include #include -#include "runtime/env_provider.h" #include "rpc/message_parser.h" #include "rpc/network.h" -#include "runtime/task/task_queue.h" -#include "runtime/task/task_spec.h" -#include "runtime/task/task_worker.h" -#include "runtime/task/timer_service.h" -// providers +#include "runtime/env_provider.h" +#include "task/task_queue.h" +#include "task/task_spec.h" +#include "task/task_worker.h" +#include "task/timer_service.h" #include "utils/factory_store.h" #include "utils/join_point.h" #include "utils/logging_provider.h" // IWYU pragma: keep diff --git a/src/runtime/tracer.cpp b/src/runtime/tracer.cpp index fec9432a75..364aa88c36 100644 --- a/src/runtime/tracer.cpp +++ b/src/runtime/tracer.cpp @@ -36,11 +36,11 @@ #include "aio/aio_task.h" #include "fmt/core.h" #include "fmt/format.h" -#include "runtime/global_config.h" #include "rpc/rpc_message.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "runtime/global_config.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/command_manager.h" #include "utils/config_api.h" #include "utils/enum_helper.h" diff --git a/src/security/meta_access_controller.cpp b/src/security/meta_access_controller.cpp index b8dc5cd50d..7e4fea9108 100644 --- a/src/security/meta_access_controller.cpp +++ b/src/security/meta_access_controller.cpp @@ -19,11 +19,11 @@ #include -#include "ranger/ranger_resource_policy_manager.h" #include "ranger/ranger_resource_policy.h" +#include "ranger/ranger_resource_policy_manager.h" #include "rpc/network.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/flags.h" #include "utils/fmt_logging.h" diff --git a/src/security/negotiation_manager.cpp b/src/security/negotiation_manager.cpp index f4bc2de928..0737ff8bc9 100644 --- a/src/security/negotiation_manager.cpp +++ b/src/security/negotiation_manager.cpp @@ -25,9 +25,9 @@ #include "negotiation_utils.h" #include "rpc/network.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_code.h" #include "security_types.h" #include "server_negotiation.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/flags.h" diff --git a/src/security/test/meta_access_controller_test.cpp b/src/security/test/meta_access_controller_test.cpp index 4beeaf443b..83d8b7d872 100644 --- a/src/security/test/meta_access_controller_test.cpp +++ b/src/security/test/meta_access_controller_test.cpp @@ -26,7 +26,7 @@ #include "rpc/rpc_address.h" #include "rpc/rpc_message.h" #include "security/access_controller.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/flags.h" diff --git a/src/security/test/negotiation_manager_test.cpp b/src/security/test/negotiation_manager_test.cpp index 179b72382f..2f5429e5c6 100644 --- a/src/security/test/negotiation_manager_test.cpp +++ b/src/security/test/negotiation_manager_test.cpp @@ -27,7 +27,7 @@ #include "rpc/rpc_holder.h" #include "rpc/rpc_message.h" #include "security/negotiation_utils.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "security_types.h" #include "utils/autoref_ptr.h" #include "utils/flags.h" diff --git a/src/server/available_detector.cpp b/src/server/available_detector.cpp index 1052b0ff7a..8b130e8b23 100644 --- a/src/server/available_detector.cpp +++ b/src/server/available_detector.cpp @@ -41,8 +41,8 @@ #include "perf_counter/perf_counter.h" #include "result_writer.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/blob.h" #include "utils/error_code.h" #include "utils/flags.h" diff --git a/src/server/available_detector.h b/src/server/available_detector.h index bc31e2fed5..4e974615a9 100644 --- a/src/server/available_detector.h +++ b/src/server/available_detector.h @@ -27,8 +27,8 @@ #include "perf_counter/perf_counter_wrapper.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/synchronize.h" namespace dsn { diff --git a/src/server/info_collector.cpp b/src/server/info_collector.cpp index eb6cc25a95..a59d42ec1a 100644 --- a/src/server/info_collector.cpp +++ b/src/server/info_collector.cpp @@ -33,9 +33,9 @@ #include "pegasus/client.h" #include "result_writer.h" #include "rpc/group_host_port.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" #include "shell/command_executor.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/flags.h" #include "utils/fmt_logging.h" #include "utils/strings.h" diff --git a/src/server/info_collector.h b/src/server/info_collector.h index 727864b652..747d5d7107 100644 --- a/src/server/info_collector.h +++ b/src/server/info_collector.h @@ -30,9 +30,9 @@ #include "perf_counter/perf_counter.h" #include "perf_counter/perf_counter_wrapper.h" #include "rpc/rpc_host_port.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" #include "shell/command_helper.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/synchronize.h" struct shell_context; @@ -43,7 +43,6 @@ class pegasus_client; namespace server { class hotspot_partition_calculator; - class result_writer; class info_collector diff --git a/src/server/pegasus_manual_compact_service.cpp b/src/server/pegasus_manual_compact_service.cpp index e55077e7a4..2c8a604ac9 100644 --- a/src/server/pegasus_manual_compact_service.cpp +++ b/src/server/pegasus_manual_compact_service.cpp @@ -32,8 +32,8 @@ #include "common/replication.codes.h" #include "pegasus_server_impl.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/flags.h" #include "utils/fmt_logging.h" diff --git a/src/server/pegasus_mutation_duplicator.h b/src/server/pegasus_mutation_duplicator.h index 0ac19c68df..e3b488960e 100644 --- a/src/server/pegasus_mutation_duplicator.h +++ b/src/server/pegasus_mutation_duplicator.h @@ -28,8 +28,8 @@ #include "replica/duplication/mutation_duplicator.h" #include "rrdb/rrdb.client.h" #include "runtime/pipeline.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/chrono_literals.h" #include #include "utils/metrics.h" diff --git a/src/server/pegasus_server_impl.cpp b/src/server/pegasus_server_impl.cpp index a91add8e5f..835596cd73 100644 --- a/src/server/pegasus_server_impl.cpp +++ b/src/server/pegasus_server_impl.cpp @@ -64,13 +64,13 @@ #include "rrdb/rrdb.code.definition.h" #include "rrdb/rrdb_types.h" #include "runtime/api_layer1.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" #include "server/key_ttl_compaction_filter.h" #include "server/pegasus_manual_compact_service.h" #include "server/pegasus_read_service.h" #include "server/pegasus_scan_context.h" #include "server/range_read_limiter.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/chrono_literals.h" diff --git a/src/server/pegasus_server_impl.h b/src/server/pegasus_server_impl.h index be664105b2..f65c43266c 100644 --- a/src/server/pegasus_server_impl.h +++ b/src/server/pegasus_server_impl.h @@ -46,8 +46,8 @@ #include "pegasus_value_schema.h" #include "range_read_limiter.h" #include "replica/replication_app_base.h" -#include "runtime/task/task.h" -#include "runtime/task/task_tracker.h" +#include "task/task.h" +#include "task/task_tracker.h" #include "utils/error_code.h" #include "utils/flags.h" #include "utils/metrics.h" diff --git a/src/server/pegasus_server_write.h b/src/server/pegasus_server_write.h index 2329ec586a..add75b392d 100644 --- a/src/server/pegasus_server_write.h +++ b/src/server/pegasus_server_write.h @@ -29,7 +29,7 @@ #include "pegasus_write_service.h" #include "replica/replica_base.h" #include "rrdb/rrdb_types.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/metrics.h" namespace dsn { diff --git a/src/server/pegasus_write_service.cpp b/src/server/pegasus_write_service.cpp index 2fb5733265..af2e07302a 100644 --- a/src/server/pegasus_write_service.cpp +++ b/src/server/pegasus_write_service.cpp @@ -38,8 +38,8 @@ #include "rrdb/rrdb_types.h" #include "runtime/api_layer1.h" #include "runtime/message_utils.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "server/pegasus_server_impl.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" diff --git a/src/server/result_writer.cpp b/src/server/result_writer.cpp index 5629106b90..4d3a9160e0 100644 --- a/src/server/result_writer.cpp +++ b/src/server/result_writer.cpp @@ -24,8 +24,8 @@ #include #include "pegasus/client.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task_code.h" #include "utils/flags.h" #include "utils/fmt_logging.h" #include "utils/threadpool_code.h" diff --git a/src/server/result_writer.h b/src/server/result_writer.h index d9f92e4da5..fc204aeb3b 100644 --- a/src/server/result_writer.h +++ b/src/server/result_writer.h @@ -21,7 +21,7 @@ #include -#include "runtime/task/task_tracker.h" +#include "task/task_tracker.h" namespace pegasus { class pegasus_client; diff --git a/src/server/test/hotkey_collector_test.cpp b/src/server/test/hotkey_collector_test.cpp index 43d68b705c..7219c5ca04 100644 --- a/src/server/test/hotkey_collector_test.cpp +++ b/src/server/test/hotkey_collector_test.cpp @@ -17,9 +17,9 @@ #include "server/hotkey_collector.h" -#include #include #include +#include #include #include "base/pegasus_key_schema.h" @@ -27,14 +27,14 @@ #include "common/replication.codes.h" #include "gtest/gtest.h" #include "pegasus_server_test_base.h" +#include "rpc/rpc_holder.h" #include "rrdb/rrdb.code.definition.h" #include "rrdb/rrdb_types.h" -#include "rpc/rpc_holder.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task_tracker.h" #include "server/hotkey_collector_state.h" #include "server/pegasus_read_service.h" #include "server/test/message_utils.h" +#include "task/async_calls.h" +#include "task/task_tracker.h" #include "utils/error_code.h" #include "utils/flags.h" #include "utils/fmt_logging.h" diff --git a/src/server/test/pegasus_write_service_test.cpp b/src/server/test/pegasus_write_service_test.cpp index 01e2ef0a8b..e5c5b43828 100644 --- a/src/server/test/pegasus_write_service_test.cpp +++ b/src/server/test/pegasus_write_service_test.cpp @@ -32,15 +32,15 @@ #include "gtest/gtest.h" #include "message_utils.h" #include "pegasus_server_test_base.h" +#include "rpc/rpc_message.h" #include "rrdb/rrdb.code.definition.h" #include "rrdb/rrdb_types.h" #include "runtime/message_utils.h" -#include "rpc/rpc_message.h" -#include "runtime/task/task_code.h" #include "server/pegasus_server_write.h" #include "server/pegasus_write_service.h" #include "server/pegasus_write_service_impl.h" #include "server/rocksdb_wrapper.h" +#include "task/task_code.h" #include "utils/blob.h" #include "utils/fail_point.h" diff --git a/src/shell/command_helper.h b/src/shell/command_helper.h index 3e3b11ca45..db8e3c6f3b 100644 --- a/src/shell/command_helper.h +++ b/src/shell/command_helper.h @@ -53,7 +53,7 @@ #include "http/http_client.h" #include "perf_counter/perf_counter_utils.h" #include "remote_cmd/remote_command.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "tools/mutation_log_tool.h" #include "utils/fmt_utils.h" #include diff --git a/src/shell/commands/bulk_load.cpp b/src/shell/commands/bulk_load.cpp index 5c6246f7e4..bd155d0b05 100644 --- a/src/shell/commands/bulk_load.cpp +++ b/src/shell/commands/bulk_load.cpp @@ -38,9 +38,9 @@ #include "bulk_load_types.h" #include "client/replication_ddl_client.h" #include "rpc/rpc_address.h" -#include "runtime/task/task_spec.h" #include "shell/command_executor.h" #include "shell/commands.h" +#include "task/task_spec.h" #include "utils/error_code.h" #include "utils/errors.h" #include "utils/output_utils.h" diff --git a/src/shell/commands/data_operations.cpp b/src/shell/commands/data_operations.cpp index cf73d72b7a..3c8c31ca7a 100644 --- a/src/shell/commands/data_operations.cpp +++ b/src/shell/commands/data_operations.cpp @@ -52,13 +52,13 @@ #include "pegasus_utils.h" #include "rpc/rpc_host_port.h" #include "rrdb/rrdb_types.h" -#include "runtime/task/async_calls.h" #include "shell/args.h" #include "shell/command_executor.h" #include "shell/command_helper.h" #include "shell/command_utils.h" #include "shell/commands.h" #include "shell/sds/sds.h" +#include "task/async_calls.h" #include "utils/blob.h" #include "utils/defer.h" #include "utils/error_code.h" diff --git a/src/shell/commands/debugger.cpp b/src/shell/commands/debugger.cpp index b52dfdab14..d854291ff3 100644 --- a/src/shell/commands/debugger.cpp +++ b/src/shell/commands/debugger.cpp @@ -52,15 +52,15 @@ #include "pegasus_key_schema.h" #include "pegasus_utils.h" #include "pegasus_value_schema.h" -#include "rrdb/rrdb.code.definition.h" -#include "rrdb/rrdb_types.h" #include "rpc/rpc_message.h" #include "rpc/serialization.h" -#include "runtime/task/task_code.h" +#include "rrdb/rrdb.code.definition.h" +#include "rrdb/rrdb_types.h" #include "shell/args.h" #include "shell/command_executor.h" #include "shell/commands.h" #include "shell/sds/sds.h" +#include "task/task_code.h" #include "tools/mutation_log_tool.h" #include "utils/blob.h" #include "utils/filesystem.h" diff --git a/src/runtime/task/CMakeLists.txt b/src/task/CMakeLists.txt similarity index 83% rename from src/runtime/task/CMakeLists.txt rename to src/task/CMakeLists.txt index ad09763cf6..e0eff8836b 100644 --- a/src/runtime/task/CMakeLists.txt +++ b/src/task/CMakeLists.txt @@ -22,16 +22,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -set(MY_PROJ_NAME dsn.task) - -# Search mode for source files under CURRENT project directory? -# "GLOB_RECURSE" for recursive search -# "GLOB" for non-recursive search +set(MY_PROJ_NAME dsn_task) set(MY_SRC_SEARCH_MODE "GLOB") - -set(MY_PROJ_LIBS "") - -# Extra files that will be installed -set(MY_BINPLACES "") - +set(MY_PROJ_SRC "") +set(MY_PROJ_LIBS + dsn_runtime + dsn_utils) dsn_add_object() +add_subdirectory(tests) diff --git a/src/runtime/task/async_calls.h b/src/task/async_calls.h similarity index 99% rename from src/runtime/task/async_calls.h rename to src/task/async_calls.h index 3a01d1d1c9..8a44217577 100644 --- a/src/runtime/task/async_calls.h +++ b/src/task/async_calls.h @@ -26,14 +26,14 @@ #pragma once +#include "aio/file_io.h" #include "runtime/api_task.h" #include "runtime/api_layer1.h" #include "runtime/app_model.h" +#include "rpc/serialization.h" +#include "task/task_tracker.h" #include "utils/api_utilities.h" #include "utils/function_traits.h" -#include "aio/file_io.h" -#include "runtime/task/task_tracker.h" -#include "rpc/serialization.h" namespace dsn { diff --git a/src/runtime/task/future_types.h b/src/task/future_types.h similarity index 100% rename from src/runtime/task/future_types.h rename to src/task/future_types.h diff --git a/src/runtime/task/hpc_task_queue.cpp b/src/task/hpc_task_queue.cpp similarity index 94% rename from src/runtime/task/hpc_task_queue.cpp rename to src/task/hpc_task_queue.cpp index 7249caa8b2..5d0c435591 100644 --- a/src/runtime/task/hpc_task_queue.cpp +++ b/src/task/hpc_task_queue.cpp @@ -26,13 +26,13 @@ #include "hpc_task_queue.h" -#include +#include "concurrentqueue/lightweightsemaphore.h" #include "boost/iterator/function_output_iterator.hpp" #include "concurrentqueue/concurrentqueue.h" -#include "runtime/task/task.h" -#include "runtime/task/task_queue.h" -#include "runtime/task/task_spec.h" +#include "task.h" +#include "task_queue.h" +#include "task_spec.h" namespace dsn { class task_worker_pool; diff --git a/src/runtime/task/hpc_task_queue.h b/src/task/hpc_task_queue.h similarity index 95% rename from src/runtime/task/hpc_task_queue.h rename to src/task/hpc_task_queue.h index 7b60a58be1..e30bce713f 100644 --- a/src/runtime/task/hpc_task_queue.h +++ b/src/task/hpc_task_queue.h @@ -26,10 +26,10 @@ #pragma once -#include +#include "concurrentqueue/concurrentqueue.h" #include "concurrentqueue/lightweightsemaphore.h" -#include "runtime/task/task_code.h" +#include "task_code.h" #include "task_queue.h" namespace dsn { diff --git a/src/runtime/task/simple_task_queue.cpp b/src/task/simple_task_queue.cpp similarity index 96% rename from src/runtime/task/simple_task_queue.cpp rename to src/task/simple_task_queue.cpp index 879a9700c6..d582203781 100644 --- a/src/runtime/task/simple_task_queue.cpp +++ b/src/task/simple_task_queue.cpp @@ -26,7 +26,6 @@ #include "simple_task_queue.h" -#include #include #include #include @@ -38,12 +37,15 @@ #include "boost/asio/error.hpp" #include "boost/asio/impl/io_context.hpp" #include "boost/asio/impl/io_context.ipp" +#include "boost/asio/io_service.hpp" #include "boost/date_time/posix_time/posix_time_duration.hpp" #include "boost/system/error_code.hpp" -#include "runtime/task/task.h" -#include "runtime/task/task_spec.h" -#include "runtime/task/task_worker.h" #include "runtime/tool_api.h" +#include "task.h" +#include "task/task_queue.h" +#include "task/timer_service.h" +#include "task_spec.h" +#include "task_worker.h" #include "utils/fmt_logging.h" #include "utils/threadpool_spec.h" diff --git a/src/runtime/task/simple_task_queue.h b/src/task/simple_task_queue.h similarity index 95% rename from src/runtime/task/simple_task_queue.h rename to src/task/simple_task_queue.h index 62aac25f72..bd7f0efa5c 100644 --- a/src/runtime/task/simple_task_queue.h +++ b/src/task/simple_task_queue.h @@ -30,9 +30,9 @@ #include #include "boost/asio/io_service.hpp" -#include "runtime/task/task_code.h" -#include "runtime/task/task_queue.h" -#include "runtime/task/timer_service.h" +#include "task_code.h" +#include "task_queue.h" +#include "timer_service.h" #include "utils/priority_queue.h" namespace dsn { diff --git a/src/runtime/task/task.cpp b/src/task/task.cpp similarity index 99% rename from src/runtime/task/task.cpp rename to src/task/task.cpp index 7d83948f3b..164f1cec6a 100644 --- a/src/runtime/task/task.cpp +++ b/src/task/task.cpp @@ -33,10 +33,11 @@ #include "runtime/global_config.h" #include "runtime/node_scoper.h" #include "runtime/service_engine.h" -#include "runtime/task/task_spec.h" -#include "runtime/task/task_tracker.h" -#include "runtime/task/task_worker.h" +#include "task/task_code.h" #include "task_engine.h" +#include "task_spec.h" +#include "task_tracker.h" +#include "task_worker.h" #include "utils/fmt_logging.h" #include "utils/process_utils.h" #include "utils/rand.h" diff --git a/src/runtime/task/task.h b/src/task/task.h similarity index 99% rename from src/runtime/task/task.h rename to src/task/task.h index fe27e6b007..49a5ba05dc 100644 --- a/src/runtime/task/task.h +++ b/src/task/task.h @@ -26,8 +26,8 @@ #pragma once -#include #include +#include #include #include #include @@ -36,10 +36,10 @@ #include #include +#include "rpc/rpc_message.h" #include "runtime/api_layer1.h" #include "runtime/api_task.h" -#include "rpc/rpc_message.h" -#include "runtime/task/task_code.h" +#include "task_code.h" #include "task_spec.h" #include "task_tracker.h" #include "utils/autoref_ptr.h" diff --git a/src/runtime/task/task_code.cpp b/src/task/task_code.cpp similarity index 100% rename from src/runtime/task/task_code.cpp rename to src/task/task_code.cpp diff --git a/src/runtime/task/task_code.h b/src/task/task_code.h similarity index 100% rename from src/runtime/task/task_code.h rename to src/task/task_code.h diff --git a/src/runtime/task/task_engine.cpp b/src/task/task_engine.cpp similarity index 98% rename from src/runtime/task/task_engine.cpp rename to src/task/task_engine.cpp index 138afedac7..69b0b37d2a 100644 --- a/src/runtime/task/task_engine.cpp +++ b/src/task/task_engine.cpp @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "runtime/task/task_engine.h" +#include "task_engine.h" // IWYU pragma: no_include #include @@ -34,11 +34,12 @@ #include "nlohmann/json.hpp" #include "runtime/global_config.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_queue.h" -#include "runtime/task/task_spec.h" -#include "runtime/task/task_worker.h" -#include "runtime/task/timer_service.h" +#include "task.h" +#include "task/task_code.h" +#include "task_queue.h" +#include "task_spec.h" +#include "task_worker.h" +#include "timer_service.h" #include "utils/command_manager.h" #include "utils/factory_store.h" #include "utils/fmt_logging.h" diff --git a/src/runtime/task/task_engine.h b/src/task/task_engine.h similarity index 99% rename from src/runtime/task/task_engine.h rename to src/task/task_engine.h index 6a8fe2a0ad..5a737a5224 100644 --- a/src/runtime/task/task_engine.h +++ b/src/task/task_engine.h @@ -32,7 +32,7 @@ #include #include "nlohmann/json_fwd.hpp" -#include "runtime/task/task_code.h" +#include "task_code.h" #include "utils/command_manager.h" #include "utils/threadpool_spec.h" diff --git a/src/runtime/task/task_engine.sim.cpp b/src/task/task_engine.sim.cpp similarity index 99% rename from src/runtime/task/task_engine.sim.cpp rename to src/task/task_engine.sim.cpp index 1703001817..9ed7115a25 100644 --- a/src/runtime/task/task_engine.sim.cpp +++ b/src/task/task_engine.sim.cpp @@ -28,8 +28,8 @@ #include #include "runtime/scheduler.h" -#include "runtime/task/task.h" -#include "runtime/task/task_queue.h" +#include "task.h" +#include "task_queue.h" #include "task_engine.sim.h" #include "utils/fmt_logging.h" #include "utils/process_utils.h" diff --git a/src/runtime/task/task_engine.sim.h b/src/task/task_engine.sim.h similarity index 100% rename from src/runtime/task/task_engine.sim.h rename to src/task/task_engine.sim.h diff --git a/src/runtime/task/task_queue.cpp b/src/task/task_queue.cpp similarity index 98% rename from src/runtime/task/task_queue.cpp rename to src/task/task_queue.cpp index be54bdf25f..0fcea9e60b 100644 --- a/src/runtime/task/task_queue.cpp +++ b/src/task/task_queue.cpp @@ -27,13 +27,14 @@ #include "task_queue.h" #include + #include "fmt/core.h" #include "rpc/network.h" #include "rpc/rpc_engine.h" #include "rpc/rpc_message.h" -#include "runtime/task/task.h" -#include "runtime/task/task_spec.h" +#include "task.h" #include "task_engine.h" +#include "task_spec.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/exp_delay.h" diff --git a/src/runtime/task/task_queue.h b/src/task/task_queue.h similarity index 100% rename from src/runtime/task/task_queue.h rename to src/task/task_queue.h diff --git a/src/runtime/task/task_spec.cpp b/src/task/task_spec.cpp similarity index 99% rename from src/runtime/task/task_spec.cpp rename to src/task/task_spec.cpp index d760de6c44..ff38b1fbdc 100644 --- a/src/runtime/task/task_spec.cpp +++ b/src/task/task_spec.cpp @@ -32,6 +32,7 @@ #include #include "rpc/rpc_message.h" +#include "task/task_code.h" #include "utils/flags.h" #include "utils/fmt_logging.h" #include "utils/threadpool_spec.h" diff --git a/src/runtime/task/task_spec.h b/src/task/task_spec.h similarity index 99% rename from src/runtime/task/task_spec.h rename to src/task/task_spec.h index 058beedced..ed709d829d 100644 --- a/src/runtime/task/task_spec.h +++ b/src/task/task_spec.h @@ -31,7 +31,7 @@ #include #include -#include "runtime/task/task_code.h" +#include "task_code.h" #include "utils/config_api.h" #include "utils/config_helper.h" #include "utils/customizable_id.h" diff --git a/src/runtime/task/task_tracker.cpp b/src/task/task_tracker.cpp similarity index 100% rename from src/runtime/task/task_tracker.cpp rename to src/task/task_tracker.cpp diff --git a/src/runtime/task/task_tracker.h b/src/task/task_tracker.h similarity index 100% rename from src/runtime/task/task_tracker.h rename to src/task/task_tracker.h diff --git a/src/runtime/task/task_worker.cpp b/src/task/task_worker.cpp similarity index 98% rename from src/runtime/task/task_worker.cpp rename to src/task/task_worker.cpp index 5b5cf2063c..01fec9887e 100644 --- a/src/runtime/task/task_worker.cpp +++ b/src/task/task_worker.cpp @@ -39,10 +39,10 @@ #include #include "runtime/service_engine.h" -#include "runtime/task/task.h" -#include "runtime/task/task_engine.h" -#include "runtime/task/task_queue.h" -#include "runtime/task/task_worker.h" +#include "task.h" +#include "task_engine.h" +#include "task_queue.h" +#include "task_worker.h" #include "utils/fmt_logging.h" #include "utils/join_point.h" #include "utils/ports.h" diff --git a/src/runtime/task/task_worker.h b/src/task/task_worker.h similarity index 100% rename from src/runtime/task/task_worker.h rename to src/task/task_worker.h diff --git a/src/task/tests/CMakeLists.txt b/src/task/tests/CMakeLists.txt new file mode 100644 index 0000000000..82440e1dfa --- /dev/null +++ b/src/task/tests/CMakeLists.txt @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set(MY_PROJ_NAME dsn_task_tests) +set(MY_PROJ_SRC "") +set(MY_SRC_SEARCH_MODE "GLOB") +set(MY_PROJ_LIBS + dsn_task + dsn_runtime + dsn_meta_server + dsn_replication_common + dsn_utils + gtest) +set(MY_BINPLACES + config-test.ini + config-test-sim.ini + run.sh) +dsn_add_test() diff --git a/src/runtime/test/async_call.cpp b/src/task/tests/async_call_test.cpp similarity index 97% rename from src/runtime/test/async_call.cpp rename to src/task/tests/async_call_test.cpp index e98c36cf63..ddc6172c02 100644 --- a/src/runtime/test/async_call.cpp +++ b/src/task/tests/async_call_test.cpp @@ -35,15 +35,16 @@ #include #include "gtest/gtest.h" -#include "runtime/api_task.h" #include "rpc/rpc_address.h" #include "rpc/rpc_message.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_tracker.h" +#include "runtime/api_task.h" #include "runtime/test_utils.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_tracker.h" #include "utils/autoref_ptr.h" +#include "utils/enum_helper.h" #include "utils/error_code.h" #include "utils/fmt_logging.h" #include "utils/thread_access_checker.h" @@ -81,7 +82,7 @@ class tracker_class void callback_function3() { ++global_value; } }; -TEST(async_call, task_call) +TEST(async_call_test, task_call) { /* normal lpc*/ tracker_class *tc = new tracker_class(); @@ -123,7 +124,7 @@ TEST(async_call, task_call) EXPECT_FALSE(test_tasks[i]->cancel(true)); } -TEST(async_call, rpc_call) +TEST(async_call_test, rpc_call) { const auto addr = rpc_address::from_host_port("localhost", 20101); const auto addr2 = rpc_address::from_host_port("localhost", TEST_PORT_END); @@ -210,7 +211,7 @@ bool spin_wait(const std::function &pred, int wait_times) } return pred(); } -TEST(async_call, task_destructor) +TEST(async_call_test, task_destructor) { { task_ptr t(new simple_task(LPC_TEST_CLIENTLET, nullptr)); diff --git a/src/task/tests/config-test-sim.ini b/src/task/tests/config-test-sim.ini new file mode 100644 index 0000000000..a0cd215f44 --- /dev/null +++ b/src/task/tests/config-test-sim.ini @@ -0,0 +1,38 @@ +; Licensed to the Apache Software Foundation (ASF) under one +; or more contributor license agreements. See the NOTICE file +; distributed with this work for additional information +; regarding copyright ownership. The ASF licenses this file +; to you under the Apache License, Version 2.0 (the +; "License"); you may not use this file except in compliance +; with the License. You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, +; software distributed under the License is distributed on an +; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +; KIND, either express or implied. See the License for the +; specific language governing permissions and limitations +; under the License. + +[apps..default] +type = test +run = true +count = 1 +pools = THREAD_POOL_DEFAULT, THREAD_POOL_TEST_SERVER + +[apps.client] +arguments = localhost 20101 +ports = +delay_seconds = 1 + +[apps.server_group] +arguments = +ports = 20201 +count = 3 + +[core] +tool = simulator +pause_on_start = false +logging_start_level = LOG_LEVEL_DEBUG +logging_factory_name = dsn::tools::screen_logger diff --git a/src/task/tests/config-test.ini b/src/task/tests/config-test.ini new file mode 100644 index 0000000000..a86fc8c3f8 --- /dev/null +++ b/src/task/tests/config-test.ini @@ -0,0 +1,52 @@ +; Licensed to the Apache Software Foundation (ASF) under one +; or more contributor license agreements. See the NOTICE file +; distributed with this work for additional information +; regarding copyright ownership. The ASF licenses this file +; to you under the Apache License, Version 2.0 (the +; "License"); you may not use this file except in compliance +; with the License. You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, +; software distributed under the License is distributed on an +; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +; KIND, either express or implied. See the License for the +; specific language governing permissions and limitations +; under the License. + +[apps..default] +type = test +run = true +count = 1 +pools = THREAD_POOL_DEFAULT, THREAD_POOL_TEST_SERVER, THREAD_POOL_FOR_TEST_1, THREAD_POOL_FOR_TEST_2 + +[apps.client] +arguments = localhost 20101 +ports = +delay_seconds = 1 + +[apps.server_group] +arguments = +ports = 20201 +count = 3 + +[core] +tool = nativerun +pause_on_start = false +logging_start_level = LOG_LEVEL_DEBUG +logging_factory_name = dsn::tools::screen_logger + +[threadpool.THREAD_POOL_FOR_TEST_1] +worker_count = 2 +worker_priority = THREAD_xPRIORITY_HIGHEST +worker_share_core = false +worker_affinity_mask = 1 +partitioned = false + +[threadpool.THREAD_POOL_FOR_TEST_2] +worker_count = 2 +worker_priority = THREAD_xPRIORITY_NORMAL +worker_share_core = true +worker_affinity_mask = 1 +partitioned = true diff --git a/src/runtime/test/lpc.cpp b/src/task/tests/lpc_test.cpp similarity index 93% rename from src/runtime/test/lpc.cpp rename to src/task/tests/lpc_test.cpp index 0f6d7e2bac..d293b2710c 100644 --- a/src/runtime/test/lpc.cpp +++ b/src/task/tests/lpc_test.cpp @@ -29,9 +29,9 @@ #include "gtest/gtest.h" #include "runtime/api_task.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_worker.h" +#include "task/task.h" +#include "task/task_code.h" +#include "task/task_worker.h" #include "runtime/test_utils.h" #include "utils/autoref_ptr.h" @@ -43,7 +43,7 @@ void on_lpc_test(void *p) result = ::dsn::task::get_current_worker()->name(); } -TEST(core, lpc) +TEST(lpc_test, basic) { std::string result = "heheh"; dsn::task_ptr t(new dsn::raw_task(LPC_TEST_HASH, std::bind(&on_lpc_test, (void *)&result), 1)); diff --git a/src/task/tests/main.cpp b/src/task/tests/main.cpp new file mode 100644 index 0000000000..e43ee68ee5 --- /dev/null +++ b/src/task/tests/main.cpp @@ -0,0 +1,43 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include +#include +#include + +#include "runtime/app_model.h" +#include "runtime/service_app.h" +#include "runtime/test_utils.h" + +int g_test_count = 0; +int g_test_ret = 0; + +GTEST_API_ int main(int argc, char **argv) +{ + testing::InitGoogleTest(&argc, argv); + + dsn::service_app::register_factory("test"); + dsn_run(argc, argv, false); + while (g_test_count == 0) { + std::this_thread::sleep_for(std::chrono::seconds(1)); + } + +#ifndef ENABLE_GCOV + dsn_exit(g_test_ret); +#endif + return g_test_ret; +} diff --git a/src/task/tests/run.sh b/src/task/tests/run.sh new file mode 100755 index 0000000000..02d23173b6 --- /dev/null +++ b/src/task/tests/run.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +if [ -z "${REPORT_DIR}" ]; then + REPORT_DIR="." +fi + +test_cases=(config-test.ini config-test-sim.ini) +for test_case in ${test_cases[*]}; do + output_xml="${REPORT_DIR}/dsn_task_tests_${test_case/.ini/.xml}" + echo "============ run dsn_task_tests ${test_case} ============" + rm -f core* pegasus.log.* + GTEST_OUTPUT="xml:${output_xml}" ./dsn_task_tests ${test_case} + + if [ $? -ne 0 ]; then + echo "run dsn_task_tests $test_case failed" + echo "---- ls ----" + ls -l + if [ "$(find . -name 'pegasus.log.*' | wc -l)" -ne 0 ]; then + echo "---- tail -n 100 pegasus.log.* ----" + tail -n 100 "$(find . -name 'pegasus.log.*')" + fi + if [ -f core ]; then + echo "---- gdb ./dsn_task_tests core ----" + gdb ./dsn_task_tests core -ex "thread apply all bt" -ex "set pagination 0" -batch + fi + exit 1 + fi + echo "============ done dsn_task_tests ${test_case} ============" +done + +echo "============ done dsn_task_tests ============" diff --git a/src/runtime/test/task_engine.cpp b/src/task/tests/task_engine_test.cpp similarity index 93% rename from src/runtime/test/task_engine.cpp rename to src/task/tests/task_engine_test.cpp index be02295b95..30b321ba1f 100644 --- a/src/runtime/test/task_engine.cpp +++ b/src/task/tests/task_engine_test.cpp @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "runtime/task/task_engine.h" +#include "task/task_engine.h" #include #include @@ -34,7 +34,7 @@ #include "gtest/gtest.h" #include "runtime/global_config.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "runtime/test_utils.h" #include "utils/enum_helper.h" #include "utils/threadpool_code.h" @@ -48,10 +48,12 @@ using namespace ::dsn; DEFINE_THREAD_POOL_CODE(THREAD_POOL_FOR_TEST_1) DEFINE_THREAD_POOL_CODE(THREAD_POOL_FOR_TEST_2) -TEST(core, task_engine) +TEST(task_engine_test, basic) { - if (dsn::service_engine::instance().spec().tool == "simulator") - return; + if (dsn::service_engine::instance().spec().tool == "simulator") { + GTEST_SKIP() << "Set 'tool = nativerun' in '[core]' section in config.ini to enable this " + "test case."; + } service_node *node = task::get_current_node2(); ASSERT_NE(nullptr, node); ASSERT_STREQ("client", node->full_name()); diff --git a/src/runtime/test/task_test.cpp b/src/task/tests/task_test.cpp similarity index 93% rename from src/runtime/test/task_test.cpp rename to src/task/tests/task_test.cpp index 6052bdec7d..60346661bc 100644 --- a/src/runtime/test/task_test.cpp +++ b/src/task/tests/task_test.cpp @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#include "runtime/task/task.h" +#include "task/task.h" #include #include "aio/aio_task.h" #include "aio/file_io.h" #include "gtest/gtest.h" -#include "runtime/task/task_code.h" -#include "runtime/task/task_spec.h" +#include "task/task_code.h" +#include "task/task_spec.h" #include "utils/flags.h" #include "utils/threadpool_code.h" @@ -67,7 +67,7 @@ class task_test : public ::testing::Test static void test_signal_finished_task() { - // config-test.ini is not encrypted, so set FLAGS_encrypt_data_at_rest = false on force. + // config.ini is not encrypted, so set FLAGS_encrypt_data_at_rest = false on force. FLAGS_encrypt_data_at_rest = false; disk_file *fp = file::open("config-test.ini", file::FileOpenType::kReadOnly); diff --git a/src/runtime/task/timer_service.h b/src/task/timer_service.h similarity index 100% rename from src/runtime/task/timer_service.h rename to src/task/timer_service.h diff --git a/src/test/function_test/base_api/test_copy.cpp b/src/test/function_test/base_api/test_copy.cpp index fb3b33293b..bf04a1dce4 100644 --- a/src/test/function_test/base_api/test_copy.cpp +++ b/src/test/function_test/base_api/test_copy.cpp @@ -32,7 +32,7 @@ #include "gtest/gtest.h" #include "include/pegasus/client.h" #include "pegasus/error.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "shell/command_helper.h" #include "test/function_test/utils/test_util.h" #include "test/function_test/utils/utils.h" diff --git a/src/test/kill_test/partition_kill_testor.cpp b/src/test/kill_test/partition_kill_testor.cpp index d1dad5d3e2..9ab0da1b53 100644 --- a/src/test/kill_test/partition_kill_testor.cpp +++ b/src/test/kill_test/partition_kill_testor.cpp @@ -29,7 +29,7 @@ #include "dsn.layer2_types.h" #include "partition_kill_testor.h" #include "remote_cmd/remote_command.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "test/kill_test/kill_testor.h" #include "utils/autoref_ptr.h" #include "utils/error_code.h" diff --git a/src/test/pressure_test/main.cpp b/src/test/pressure_test/main.cpp index 876df3789d..914a61f4e3 100644 --- a/src/test/pressure_test/main.cpp +++ b/src/test/pressure_test/main.cpp @@ -29,9 +29,9 @@ #include "pegasus/client.h" #include "pegasus/error.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/async_calls.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/flags.h" #include "utils/fmt_logging.h" diff --git a/src/tools/mutation_log_tool.cpp b/src/tools/mutation_log_tool.cpp index 5c1bacbe96..ef367e7461 100644 --- a/src/tools/mutation_log_tool.cpp +++ b/src/tools/mutation_log_tool.cpp @@ -40,7 +40,7 @@ #include "replica/replica.h" #include "replica/replica_stub.h" #include "rpc/rpc_message.h" -#include "runtime/task/task_spec.h" +#include "task/task_spec.h" #include "utils/autoref_ptr.h" #include "utils/blob.h" #include "utils/defer.h" diff --git a/src/utils/distributed_lock_service.h b/src/utils/distributed_lock_service.h index 4f43150e9b..271d0b90fc 100644 --- a/src/utils/distributed_lock_service.h +++ b/src/utils/distributed_lock_service.h @@ -26,24 +26,24 @@ #pragma once -#include "runtime/api_task.h" +#include +#include +#include + +#include "common/gpid.h" #include "runtime/api_layer1.h" #include "runtime/app_model.h" -#include "utils/api_utilities.h" -#include "utils/error_code.h" -#include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" -#include "common/gpid.h" +#include "runtime/api_task.h" #include "rpc/serialization.h" #include "rpc/rpc_stream.h" #include "runtime/serverlet.h" #include "runtime/service_app.h" #include "rpc/rpc_address.h" +#include "task/task_code.h" +#include "task/future_types.h" +#include "utils/api_utilities.h" #include "utils/error_code.h" -#include "runtime/task/future_types.h" -#include -#include -#include +#include "utils/threadpool_code.h" namespace dsn { namespace dist { diff --git a/src/utils/latency_tracer.h b/src/utils/latency_tracer.h index e1136d475a..6fbf2a85a4 100644 --- a/src/utils/latency_tracer.h +++ b/src/utils/latency_tracer.h @@ -23,7 +23,7 @@ #include #include "common/replication.codes.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/flags.h" #include "utils/ports.h" #include "utils/synchronize.h" diff --git a/src/utils/metrics.cpp b/src/utils/metrics.cpp index 06a5754c73..099ee9fd1a 100644 --- a/src/utils/metrics.cpp +++ b/src/utils/metrics.cpp @@ -33,7 +33,7 @@ #include "runtime/api_layer1.h" #include "runtime/service_app.h" #include "runtime/service_engine.h" -#include "runtime/task/task.h" +#include "task/task.h" #include "utils/flags.h" #include "utils/rand.h" #include "utils/shared_io_service.h" diff --git a/src/utils/test/env.cpp b/src/utils/test/env.cpp index 3f0cd9c078..ee147eefb6 100644 --- a/src/utils/test/env.cpp +++ b/src/utils/test/env.cpp @@ -32,10 +32,10 @@ #include #include +#include "common/gpid.h" #include "gtest/gtest.h" #include "test_util/test_util.h" #include "utils/env.h" -#include "utils/error_code.h" #include "utils/filesystem.h" #include "utils/flags.h" #include "utils/rand.h" diff --git a/src/utils/test/fmt_logging_test.cpp b/src/utils/test/fmt_logging_test.cpp index c19126c7c5..ae65906b1d 100644 --- a/src/utils/test/fmt_logging_test.cpp +++ b/src/utils/test/fmt_logging_test.cpp @@ -31,7 +31,7 @@ #include "common/gpid.h" #include "common/replication.codes.h" #include "gtest/gtest.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "utils/error_code.h" #include "utils/errors.h" #include "utils/fmt_logging.h" diff --git a/src/zookeeper/distributed_lock_service_zookeeper.cpp b/src/zookeeper/distributed_lock_service_zookeeper.cpp index 5b4f8b8269..30686831e1 100644 --- a/src/zookeeper/distributed_lock_service_zookeeper.cpp +++ b/src/zookeeper/distributed_lock_service_zookeeper.cpp @@ -34,7 +34,7 @@ #include "lock_struct.h" #include "lock_types.h" #include "runtime/service_app.h" -#include "runtime/task/async_calls.h" +#include "task/async_calls.h" #include "utils/flags.h" #include "utils/fmt_logging.h" #include "utils/strings.h" diff --git a/src/zookeeper/distributed_lock_service_zookeeper.h b/src/zookeeper/distributed_lock_service_zookeeper.h index 6d04e672ed..df90472afc 100644 --- a/src/zookeeper/distributed_lock_service_zookeeper.h +++ b/src/zookeeper/distributed_lock_service_zookeeper.h @@ -36,9 +36,9 @@ #include "boost/container/detail/std_fwd.hpp" #include "lock_types.h" -#include "runtime/task/future_types.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/future_types.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/distributed_lock_service.h" #include "utils/error_code.h" diff --git a/src/zookeeper/lock_struct.cpp b/src/zookeeper/lock_struct.cpp index d88837fe2d..a0e9ad78ce 100644 --- a/src/zookeeper/lock_struct.cpp +++ b/src/zookeeper/lock_struct.cpp @@ -36,8 +36,8 @@ #include "distributed_lock_service_zookeeper.h" #include "lock_struct.h" #include "lock_types.h" -#include "runtime/task/async_calls.h" -#include "runtime/task/task.h" +#include "task/async_calls.h" +#include "task/task.h" #include "utils/blob.h" #include "utils/error_code.h" #include "utils/fmt_logging.h" diff --git a/src/zookeeper/lock_struct.h b/src/zookeeper/lock_struct.h index bc65494e61..8bd660760d 100644 --- a/src/zookeeper/lock_struct.h +++ b/src/zookeeper/lock_struct.h @@ -32,7 +32,7 @@ #include #include "lock_types.h" -#include "runtime/task/future_types.h" +#include "task/future_types.h" #include "utils/autoref_ptr.h" #include "utils/distributed_lock_service.h" #include "utils/fmt_utils.h" diff --git a/src/zookeeper/lock_types.h b/src/zookeeper/lock_types.h index 6cddd64844..3bf6e4038b 100644 --- a/src/zookeeper/lock_types.h +++ b/src/zookeeper/lock_types.h @@ -29,7 +29,7 @@ #include "utils/autoref_ptr.h" #include "utils/error_code.h" #include "utils/threadpool_code.h" -#include "runtime/task/task_code.h" +#include "task/task_code.h" #include "common/gpid.h" #include "utils/distributed_lock_service.h" diff --git a/src/zookeeper/test/distributed_lock_zookeeper.cpp b/src/zookeeper/test/distributed_lock_zookeeper.cpp index 75747a4da9..860e9eb762 100644 --- a/src/zookeeper/test/distributed_lock_zookeeper.cpp +++ b/src/zookeeper/test/distributed_lock_zookeeper.cpp @@ -35,8 +35,8 @@ #include "gtest/gtest.h" #include "runtime/service_app.h" -#include "runtime/task/task.h" -#include "runtime/task/task_code.h" +#include "task/task.h" +#include "task/task_code.h" #include "utils/autoref_ptr.h" #include "utils/distributed_lock_service.h" #include "utils/error_code.h"