Repository: XiaoMi/rdsn Branch: master Commit: bf76b99a2eea Files: 927 Total size: 6.2 MB Directory structure: gitextract_4xu5fau8/ ├── .clang-format ├── .github/ │ └── workflows/ │ ├── check_license_header.yaml │ ├── compilation.yaml │ ├── cpp_actions.yaml │ ├── cpp_always_pass_actions.yaml │ ├── issue_ref.yaml │ └── non_cpp_actions.yaml ├── .gitignore ├── .licenserc.yaml ├── CMakeLists.txt ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bin/ │ ├── FindDL.cmake │ ├── FindJemalloc.cmake │ ├── FindRT.cmake │ ├── compiler_info.cmake │ ├── dsn.cmake │ └── thrift_utils.cmake ├── compile_thrift.py ├── include/ │ └── dsn/ │ ├── c/ │ │ ├── api_common.h │ │ ├── api_layer1.h │ │ ├── api_task.h │ │ ├── api_utilities.h │ │ └── app_model.h │ ├── cpp/ │ │ ├── json_helper.h │ │ ├── message_utils.h │ │ ├── pipeline.h │ │ ├── rpc_holder.h │ │ ├── rpc_stream.h │ │ ├── serialization.h │ │ ├── serialization_helper/ │ │ │ ├── dsn.layer2_types.h │ │ │ ├── dsn_types.h │ │ │ └── thrift_helper.h │ │ ├── serverlet.h │ │ └── service_app.h │ ├── dist/ │ │ ├── block_service.h │ │ ├── common.h │ │ ├── distributed_lock_service.h │ │ ├── failure_detector/ │ │ │ ├── failure_detector.h │ │ │ ├── fd.client.h │ │ │ ├── fd.code.definition.h │ │ │ └── fd.server.h │ │ ├── failure_detector.h │ │ ├── failure_detector_multimaster.h │ │ ├── fmt_logging.h │ │ ├── meta_state_service.h │ │ ├── nfs_node.h │ │ ├── remote_command.h │ │ ├── replication/ │ │ │ ├── duplication_common.h │ │ │ ├── meta_service_app.h │ │ │ ├── mutation_duplicator.h │ │ │ ├── mutation_log_tool.h │ │ │ ├── partition_resolver.h │ │ │ ├── replica_base.h │ │ │ ├── replica_envs.h │ │ │ ├── replica_test_utils.h │ │ │ ├── replication.codes.h │ │ │ ├── replication_app_base.h │ │ │ ├── replication_ddl_client.h │ │ │ ├── replication_enums.h │ │ │ ├── replication_other_types.h │ │ │ ├── replication_service_app.h │ │ │ ├── replication_types.h │ │ │ └── storage_serverlet.h │ │ └── replication.h │ ├── http/ │ │ └── http_server.h │ ├── perf_counter/ │ │ ├── perf_counter.h │ │ ├── perf_counter_utils.h │ │ ├── perf_counter_wrapper.h │ │ └── perf_counters.h │ ├── service_api_c.h │ ├── service_api_cpp.h │ ├── tool/ │ │ ├── nativerun.h │ │ ├── node_scoper.h │ │ ├── providers.common.h │ │ └── simulator.h │ ├── tool-api/ │ │ ├── aio_task.h │ │ ├── async_calls.h │ │ ├── auto_codes.h │ │ ├── command_manager.h │ │ ├── env_provider.h │ │ ├── file_io.h │ │ ├── future_types.h │ │ ├── global_config.h │ │ ├── gpid.h │ │ ├── group_address.h │ │ ├── logging_provider.h │ │ ├── message_parser.h │ │ ├── network.h │ │ ├── rpc_address.h │ │ ├── rpc_message.h │ │ ├── task.h │ │ ├── task_code.h │ │ ├── task_queue.h │ │ ├── task_spec.h │ │ ├── task_tracker.h │ │ ├── task_worker.h │ │ ├── thread_access_checker.h │ │ ├── threadpool_code.h │ │ ├── threadpool_spec.h │ │ ├── timer_service.h │ │ ├── uniq_timestamp_us.h │ │ └── zlocks.h │ ├── tool_api.h │ ├── toollet/ │ │ ├── fault_injector.h │ │ ├── profiler.h │ │ └── tracer.h │ ├── utility/ │ │ ├── TokenBucket.h │ │ ├── absl/ │ │ │ ├── base/ │ │ │ │ └── internal/ │ │ │ │ └── invoke.h │ │ │ └── utility/ │ │ │ └── utility.h │ │ ├── alloc.h │ │ ├── apply.h │ │ ├── autoref_ptr.h │ │ ├── binary_reader.h │ │ ├── binary_writer.h │ │ ├── blob.h │ │ ├── casts.h │ │ ├── chrono_literals.h │ │ ├── clock.h │ │ ├── config_api.h │ │ ├── config_helper.h │ │ ├── configuration.h │ │ ├── crc.h │ │ ├── customizable_id.h │ │ ├── defer.h │ │ ├── dlib.h │ │ ├── endians.h │ │ ├── enum_helper.h │ │ ├── error_code.h │ │ ├── errors.h │ │ ├── exp_delay.h │ │ ├── extensible_object.h │ │ ├── factory_store.h │ │ ├── fail_point.h │ │ ├── filesystem.h │ │ ├── fixed_size_buffer_pool.h │ │ ├── flags.h │ │ ├── function_traits.h │ │ ├── hpc_locks/ │ │ │ ├── autoresetevent.h │ │ │ ├── autoreseteventcondvar.h │ │ │ ├── benaphore.h │ │ │ ├── bitfield.h │ │ │ ├── readme.txt │ │ │ ├── rwlock.h │ │ │ └── sema.h │ │ ├── join_point.h │ │ ├── link.h │ │ ├── long_adder.h │ │ ├── math.h │ │ ├── metrics.h │ │ ├── nth_element.h │ │ ├── optional.h │ │ ├── output_utils.h │ │ ├── ports.h │ │ ├── preloadable.h │ │ ├── priority_queue.h │ │ ├── process_utils.h │ │ ├── rand.h │ │ ├── safe_strerror_posix.h │ │ ├── singleton.h │ │ ├── singleton_store.h │ │ ├── smart_pointers.h │ │ ├── string_conv.h │ │ ├── string_splitter.h │ │ ├── string_view.h │ │ ├── strings.h │ │ ├── synchronize.h │ │ ├── sys_exit_hook.h │ │ ├── timer.h │ │ ├── utils.h │ │ └── work_queue.h │ └── utils/ │ ├── latency_tracer.h │ ├── time_utils.h │ ├── token_bucket_throttling_controller.h │ └── token_buckets.h ├── run.sh ├── scripts/ │ └── linux/ │ ├── build.sh │ ├── clear_zk.sh │ ├── install.sh │ ├── learn_stat.py │ ├── run-clang-format.py │ ├── run-clang-format.sh │ ├── start_zk.sh │ └── stop_zk.sh ├── src/ │ ├── CMakeLists.txt │ ├── aio/ │ │ ├── CMakeLists.txt │ │ ├── aio_provider.cpp │ │ ├── aio_provider.h │ │ ├── aio_task.cpp │ │ ├── disk_engine.cpp │ │ ├── disk_engine.h │ │ ├── file_io.cpp │ │ ├── native_linux_aio_provider.cpp │ │ ├── native_linux_aio_provider.h │ │ └── test/ │ │ ├── CMakeLists.txt │ │ ├── aio.cpp │ │ ├── clear.sh │ │ ├── config.ini │ │ ├── copy_source.txt │ │ ├── main.cpp │ │ └── run.sh │ ├── block_service/ │ │ ├── CMakeLists.txt │ │ ├── block_service_manager.cpp │ │ ├── block_service_manager.h │ │ ├── directio_writable_file.cpp │ │ ├── directio_writable_file.h │ │ ├── fds/ │ │ │ ├── CMakeLists.txt │ │ │ ├── fds_service.cpp │ │ │ └── fds_service.h │ │ ├── hdfs/ │ │ │ ├── CMakeLists.txt │ │ │ ├── hdfs_service.cpp │ │ │ └── hdfs_service.h │ │ ├── local/ │ │ │ ├── CMakeLists.txt │ │ │ ├── local_service.cpp │ │ │ └── local_service.h │ │ └── test/ │ │ ├── CMakeLists.txt │ │ ├── block_service_manager_test.cpp │ │ ├── block_service_mock.h │ │ ├── clear.sh │ │ ├── config-test.ini │ │ ├── fds_service_test.cpp │ │ ├── hdfs_service_test.cpp │ │ ├── local_service_test.cpp │ │ ├── main.cpp │ │ └── run.sh │ ├── client/ │ │ ├── CMakeLists.txt │ │ ├── partition_resolver.cpp │ │ ├── partition_resolver_manager.cpp │ │ ├── partition_resolver_manager.h │ │ ├── partition_resolver_simple.cpp │ │ ├── partition_resolver_simple.h │ │ └── replication_ddl_client.cpp │ ├── common/ │ │ ├── CMakeLists.txt │ │ ├── backup.thrift │ │ ├── backup_common.cpp │ │ ├── backup_common.h │ │ ├── bulk_load.thrift │ │ ├── bulk_load_common.cpp │ │ ├── bulk_load_common.h │ │ ├── common.cpp │ │ ├── consensus.thrift │ │ ├── duplication.thrift │ │ ├── duplication_common.cpp │ │ ├── fs_manager.cpp │ │ ├── fs_manager.h │ │ ├── manual_compact.h │ │ ├── meta_admin.thrift │ │ ├── metadata.thrift │ │ ├── partition_split.thrift │ │ ├── partition_split_common.h │ │ ├── replica_admin.thrift │ │ ├── replication_common.cpp │ │ ├── replication_common.h │ │ └── test/ │ │ ├── CMakeLists.txt │ │ ├── common_test.cpp │ │ ├── config-test.ini │ │ ├── duplication_common_test.cpp │ │ ├── fs_manager_test.cpp │ │ ├── main.cpp │ │ ├── replication_common_test.cpp │ │ └── run.sh │ ├── dsn.layer2.thrift │ ├── dsn.thrift │ ├── failure_detector/ │ │ ├── CMakeLists.txt │ │ ├── failure_detector.cpp │ │ ├── failure_detector_multimaster.cpp │ │ ├── fd.thrift │ │ └── test/ │ │ ├── CMakeLists.txt │ │ ├── clear.sh │ │ ├── config-test.ini │ │ ├── config-whitelist-test-failed.ini │ │ ├── config-whitelist-test.ini │ │ ├── failure_detector.cpp │ │ ├── gtest.filter │ │ ├── main.cpp │ │ └── run.sh │ ├── http/ │ │ ├── CMakeLists.txt │ │ ├── builtin_http_calls.cpp │ │ ├── builtin_http_calls.h │ │ ├── config_http_service.cpp │ │ ├── http_call_registry.h │ │ ├── http_message_parser.cpp │ │ ├── http_message_parser.h │ │ ├── http_server.cpp │ │ ├── http_server_impl.h │ │ ├── perf_counter_http_service.cpp │ │ ├── pprof_http_service.cpp │ │ ├── pprof_http_service.h │ │ ├── service_version.cpp │ │ ├── service_version.h │ │ ├── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── http_server_test.cpp │ │ │ ├── perf_counter_http_service_test.cpp │ │ │ ├── run.sh │ │ │ └── uri_decoder_test.cpp │ │ ├── uri_decoder.cpp │ │ └── uri_decoder.h │ ├── meta/ │ │ ├── CMakeLists.txt │ │ ├── app_balance_policy.cpp │ │ ├── app_balance_policy.h │ │ ├── app_env_validator.cpp │ │ ├── app_env_validator.h │ │ ├── backup_engine.cpp │ │ ├── backup_engine.h │ │ ├── cluster_balance_policy.cpp │ │ ├── cluster_balance_policy.h │ │ ├── distributed_lock_service_simple.cpp │ │ ├── distributed_lock_service_simple.h │ │ ├── dump_file.h │ │ ├── duplication/ │ │ │ ├── duplication_info.cpp │ │ │ ├── duplication_info.h │ │ │ ├── meta_duplication_service.cpp │ │ │ └── meta_duplication_service.h │ │ ├── greedy_load_balancer.cpp │ │ ├── greedy_load_balancer.h │ │ ├── load_balance_policy.cpp │ │ ├── load_balance_policy.h │ │ ├── meta_backup_service.cpp │ │ ├── meta_backup_service.h │ │ ├── meta_bulk_load_ingestion_context.cpp │ │ ├── meta_bulk_load_ingestion_context.h │ │ ├── meta_bulk_load_service.cpp │ │ ├── meta_bulk_load_service.h │ │ ├── meta_data.cpp │ │ ├── meta_data.h │ │ ├── meta_http_service.cpp │ │ ├── meta_http_service.h │ │ ├── meta_options.cpp │ │ ├── meta_options.h │ │ ├── meta_rpc_types.h │ │ ├── meta_server_failure_detector.cpp │ │ ├── meta_server_failure_detector.h │ │ ├── meta_service.cpp │ │ ├── meta_service.h │ │ ├── meta_service_app.cpp │ │ ├── meta_split_service.cpp │ │ ├── meta_split_service.h │ │ ├── meta_state_service_simple.cpp │ │ ├── meta_state_service_simple.h │ │ ├── meta_state_service_utils.cpp │ │ ├── meta_state_service_utils.h │ │ ├── meta_state_service_utils_impl.h │ │ ├── meta_state_service_zookeeper.cpp │ │ ├── meta_state_service_zookeeper.h │ │ ├── partition_guardian.cpp │ │ ├── partition_guardian.h │ │ ├── server_load_balancer.cpp │ │ ├── server_load_balancer.h │ │ ├── server_state.cpp │ │ ├── server_state.h │ │ ├── server_state_restore.cpp │ │ └── test/ │ │ ├── CMakeLists.txt │ │ ├── backup_test.cpp │ │ ├── balancer_simulator/ │ │ │ ├── CMakeLists.txt │ │ │ └── balancer_simulator.cpp │ │ ├── balancer_validator.cpp │ │ ├── clear.sh │ │ ├── cluster_balance_policy_test.cpp │ │ ├── config-test.ini │ │ ├── copy_replica_operation_test.cpp │ │ ├── dummy_balancer.h │ │ ├── dump_file.cpp │ │ ├── duplication_info_test.cpp │ │ ├── ford_fulkerson_test.cpp │ │ ├── json_compacity.cpp │ │ ├── main.cpp │ │ ├── meta_app_envs_test.cpp │ │ ├── meta_app_operation_test.cpp │ │ ├── meta_backup_test.cpp │ │ ├── meta_bulk_load_ingestion_test.cpp │ │ ├── meta_bulk_load_service_test.cpp │ │ ├── meta_data.cpp │ │ ├── meta_duplication_service_test.cpp │ │ ├── meta_http_service_test.cpp │ │ ├── meta_mauanl_compaction_test.cpp │ │ ├── meta_partition_guardian_test.cpp │ │ ├── meta_service_test.cpp │ │ ├── meta_service_test_app.h │ │ ├── meta_split_service_test.cpp │ │ ├── meta_state/ │ │ │ ├── CMakeLists.txt │ │ │ ├── clear.cmd │ │ │ ├── clear.sh │ │ │ ├── config-test.ini │ │ │ ├── gtest.filter │ │ │ ├── main.cpp │ │ │ ├── meta_state_service.cpp │ │ │ └── run.sh │ │ ├── meta_state_service_utils_test.cpp │ │ ├── meta_test_base.cpp │ │ ├── meta_test_base.h │ │ ├── misc/ │ │ │ ├── misc.cpp │ │ │ └── misc.h │ │ ├── run.sh │ │ ├── server_state_restore_test.cpp │ │ ├── server_state_test.cpp │ │ ├── state_sync_test.cpp │ │ ├── suite1 │ │ ├── suite2 │ │ └── update_configuration_test.cpp │ ├── nfs/ │ │ ├── CMakeLists.txt │ │ ├── nfs.thrift │ │ ├── nfs_client_impl.cpp │ │ ├── nfs_client_impl.h │ │ ├── nfs_code_definition.h │ │ ├── nfs_node.cpp │ │ ├── nfs_node_impl.cpp │ │ ├── nfs_node_simple.h │ │ ├── nfs_server_impl.cpp │ │ ├── nfs_server_impl.h │ │ └── test/ │ │ ├── CMakeLists.txt │ │ ├── clear.sh │ │ ├── config.ini │ │ ├── main.cpp │ │ ├── nfs_test_file1 │ │ ├── nfs_test_file2 │ │ └── run.sh │ ├── perf_counter/ │ │ ├── CMakeLists.txt │ │ ├── builtin_counters.cpp │ │ ├── builtin_counters.h │ │ ├── perf_counter.cpp │ │ ├── perf_counter_atomic.h │ │ ├── perf_counters.cpp │ │ └── test/ │ │ ├── CMakeLists.txt │ │ ├── clear.sh │ │ ├── main.cpp │ │ ├── perf_counter_test.cpp │ │ ├── perf_counters_test.cpp │ │ └── run.sh │ ├── remote_cmd/ │ │ ├── CMakeLists.txt │ │ ├── command.thrift │ │ └── remote_command.cpp │ ├── replica/ │ │ ├── CMakeLists.txt │ │ ├── backup/ │ │ │ ├── cold_backup_context.cpp │ │ │ ├── cold_backup_context.h │ │ │ ├── replica_backup_manager.cpp │ │ │ ├── replica_backup_manager.h │ │ │ ├── replica_backup_server.cpp │ │ │ ├── replica_backup_server.h │ │ │ └── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── config-test.ini │ │ │ ├── main.cpp │ │ │ ├── replica_backup_manager_test.cpp │ │ │ └── run.sh │ │ ├── bulk_load/ │ │ │ ├── replica_bulk_loader.cpp │ │ │ ├── replica_bulk_loader.h │ │ │ └── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── config-test.ini │ │ │ ├── main.cpp │ │ │ ├── replica_bulk_loader_test.cpp │ │ │ └── run.sh │ │ ├── disk_cleaner.cpp │ │ ├── disk_cleaner.h │ │ ├── duplication/ │ │ │ ├── duplication_pipeline.cpp │ │ │ ├── duplication_pipeline.h │ │ │ ├── duplication_sync_timer.cpp │ │ │ ├── duplication_sync_timer.h │ │ │ ├── load_from_private_log.cpp │ │ │ ├── load_from_private_log.h │ │ │ ├── mutation_batch.cpp │ │ │ ├── mutation_batch.h │ │ │ ├── replica_duplicator.cpp │ │ │ ├── replica_duplicator.h │ │ │ ├── replica_duplicator_manager.cpp │ │ │ ├── replica_duplicator_manager.h │ │ │ ├── replica_follower.cpp │ │ │ ├── replica_follower.h │ │ │ └── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── config-test.ini │ │ │ ├── duplication_sync_timer_test.cpp │ │ │ ├── duplication_test_base.h │ │ │ ├── load_from_private_log_test.cpp │ │ │ ├── log.1.0.all_loaded_are_write_empties │ │ │ ├── log.1.0.handle_real_private_log │ │ │ ├── log.1.0.handle_real_private_log2 │ │ │ ├── main.cpp │ │ │ ├── mutation_batch_test.cpp │ │ │ ├── replica_duplicator_manager_test.cpp │ │ │ ├── replica_duplicator_test.cpp │ │ │ ├── replica_follower_test.cpp │ │ │ ├── replica_http_service_test.cpp │ │ │ ├── run.sh │ │ │ └── ship_mutation_test.cpp │ │ ├── log_block.cpp │ │ ├── log_block.h │ │ ├── log_file.cpp │ │ ├── log_file.h │ │ ├── log_file_stream.h │ │ ├── mutation.cpp │ │ ├── mutation.h │ │ ├── mutation_cache.cpp │ │ ├── mutation_cache.h │ │ ├── mutation_log.cpp │ │ ├── mutation_log.h │ │ ├── mutation_log_replay.cpp │ │ ├── mutation_log_utils.cpp │ │ ├── mutation_log_utils.h │ │ ├── prepare_list.cpp │ │ ├── prepare_list.h │ │ ├── replica.cpp │ │ ├── replica.h │ │ ├── replica_2pc.cpp │ │ ├── replica_backup.cpp │ │ ├── replica_check.cpp │ │ ├── replica_chkpt.cpp │ │ ├── replica_config.cpp │ │ ├── replica_context.cpp │ │ ├── replica_context.h │ │ ├── replica_disk_migrator.cpp │ │ ├── replica_disk_migrator.h │ │ ├── replica_failover.cpp │ │ ├── replica_http_service.cpp │ │ ├── replica_http_service.h │ │ ├── replica_init.cpp │ │ ├── replica_learn.cpp │ │ ├── replica_restore.cpp │ │ ├── replica_stub.cpp │ │ ├── replica_stub.h │ │ ├── replica_test_utils.cpp │ │ ├── replica_throttle.cpp │ │ ├── replication_app_base.cpp │ │ ├── replication_service_app.cpp │ │ ├── split/ │ │ │ ├── replica_split_manager.cpp │ │ │ ├── replica_split_manager.h │ │ │ └── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── config-test.ini │ │ │ ├── main.cpp │ │ │ ├── replica_split_test.cpp │ │ │ └── run.sh │ │ ├── storage/ │ │ │ ├── CMakeLists.txt │ │ │ └── simple_kv/ │ │ │ ├── CMakeLists.txt │ │ │ ├── clear.sh │ │ │ ├── config.ini │ │ │ ├── run.sh │ │ │ ├── simple_kv.app.example.h │ │ │ ├── simple_kv.client.h │ │ │ ├── simple_kv.code.definition.h │ │ │ ├── simple_kv.main.cpp │ │ │ ├── simple_kv.server.h │ │ │ ├── simple_kv.server.impl.cpp │ │ │ ├── simple_kv.server.impl.h │ │ │ ├── simple_kv.thrift │ │ │ └── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── addcase.sh │ │ │ ├── case-000.act │ │ │ ├── case-000.ini │ │ │ ├── case-001.act │ │ │ ├── case-001.ini │ │ │ ├── case-002.act │ │ │ ├── case-002.ini │ │ │ ├── case-003.act │ │ │ ├── case-003.ini │ │ │ ├── case-004.act │ │ │ ├── case-004.ini │ │ │ ├── case-005.act │ │ │ ├── case-005.ini │ │ │ ├── case-006.act │ │ │ ├── case-006.ini │ │ │ ├── case-100.act │ │ │ ├── case-100.ini │ │ │ ├── case-101.act │ │ │ ├── case-101.ini │ │ │ ├── case-102.act │ │ │ ├── case-102.ini │ │ │ ├── case-103.act │ │ │ ├── case-103.ini │ │ │ ├── case-104.act │ │ │ ├── case-104.ini │ │ │ ├── case-105.act │ │ │ ├── case-105.ini │ │ │ ├── case-106.act │ │ │ ├── case-106.ini │ │ │ ├── case-107.act │ │ │ ├── case-107.ini │ │ │ ├── case-108.act │ │ │ ├── case-108.ini │ │ │ ├── case-109.act │ │ │ ├── case-109.ini │ │ │ ├── case-200.act │ │ │ ├── case-200.ini │ │ │ ├── case-201.act │ │ │ ├── case-201.ini │ │ │ ├── case-202-0.act │ │ │ ├── case-202-0.ini │ │ │ ├── case-202-1.act │ │ │ ├── case-202-1.ini │ │ │ ├── case-203-0.act │ │ │ ├── case-203-0.ini │ │ │ ├── case-204.act │ │ │ ├── case-204.ini │ │ │ ├── case-205.act │ │ │ ├── case-205.ini │ │ │ ├── case-206.act │ │ │ ├── case-206.ini │ │ │ ├── case-207.act │ │ │ ├── case-207.ini │ │ │ ├── case-208.act │ │ │ ├── case-208.ini │ │ │ ├── case-209.act │ │ │ ├── case-209.ini │ │ │ ├── case-210.act │ │ │ ├── case-210.ini │ │ │ ├── case-211.act │ │ │ ├── case-211.ini │ │ │ ├── case-212.act │ │ │ ├── case-212.ini │ │ │ ├── case-213.act │ │ │ ├── case-213.ini │ │ │ ├── case-214.act │ │ │ ├── case-214.ini │ │ │ ├── case-215.act │ │ │ ├── case-215.ini │ │ │ ├── case-216.act │ │ │ ├── case-216.ini │ │ │ ├── case-300-0.act │ │ │ ├── case-300-0.ini │ │ │ ├── case-300-1.act │ │ │ ├── case-300-1.ini │ │ │ ├── case-300-2.act │ │ │ ├── case-300-2.ini │ │ │ ├── case-301.act │ │ │ ├── case-301.ini │ │ │ ├── case-302.act │ │ │ ├── case-302.ini │ │ │ ├── case-303.act │ │ │ ├── case-303.ini │ │ │ ├── case-304.act │ │ │ ├── case-304.ini │ │ │ ├── case-305.act │ │ │ ├── case-305.ini │ │ │ ├── case-306.act │ │ │ ├── case-306.ini │ │ │ ├── case-307.act │ │ │ ├── case-307.ini │ │ │ ├── case-400.act │ │ │ ├── case-400.ini │ │ │ ├── case-401.act │ │ │ ├── case-401.ini │ │ │ ├── case-402.act │ │ │ ├── case-402.ini │ │ │ ├── case-600.act │ │ │ ├── case-600.ini │ │ │ ├── case-601.act │ │ │ ├── case-601.ini │ │ │ ├── case-602.act │ │ │ ├── case-602.ini │ │ │ ├── case-603.act │ │ │ ├── case-603.ini │ │ │ ├── case.cpp │ │ │ ├── case.h │ │ │ ├── checker.cpp │ │ │ ├── checker.h │ │ │ ├── clear.sh │ │ │ ├── client.cpp │ │ │ ├── client.h │ │ │ ├── common.cpp │ │ │ ├── common.h │ │ │ ├── config.ini │ │ │ ├── injector.cpp │ │ │ ├── injector.h │ │ │ ├── run.sh │ │ │ ├── simple_kv.main.cpp │ │ │ ├── simple_kv.server.impl.cpp │ │ │ └── simple_kv.server.impl.h │ │ └── test/ │ │ ├── CMakeLists.txt │ │ ├── backup_block_service_mock.h │ │ ├── clear.sh │ │ ├── cold_backup_context_test.cpp │ │ ├── config-test.ini │ │ ├── log_block_test.cpp │ │ ├── log_file_test.cpp │ │ ├── main.cpp │ │ ├── mock_utils.h │ │ ├── mutation_log_learn_test.cpp │ │ ├── mutation_log_test.cpp │ │ ├── open_replica_test.cpp │ │ ├── replica_disk_migrate_test.cpp │ │ ├── replica_disk_test.cpp │ │ ├── replica_disk_test_base.h │ │ ├── replica_learn_test.cpp │ │ ├── replica_test.cpp │ │ ├── replica_test_base.h │ │ ├── replication_service_test_app.h │ │ ├── run.sh │ │ └── throttling_controller_test.cpp │ ├── runtime/ │ │ ├── CMakeLists.txt │ │ ├── build_config.h │ │ ├── core_main.cpp │ │ ├── dsn.layer2_types.cpp │ │ ├── env.sim.cpp │ │ ├── env.sim.h │ │ ├── fault_injector.cpp │ │ ├── global_config.cpp │ │ ├── message_utils.cpp │ │ ├── nativerun.cpp │ │ ├── profiler.cpp │ │ ├── profiler_header.h │ │ ├── providers.common.cpp │ │ ├── rpc/ │ │ │ ├── CMakeLists.txt │ │ │ ├── asio_net_provider.cpp │ │ │ ├── asio_net_provider.h │ │ │ ├── asio_rpc_session.cpp │ │ │ ├── asio_rpc_session.h │ │ │ ├── dsn_message_parser.cpp │ │ │ ├── dsn_message_parser.h │ │ │ ├── message_parser.cpp │ │ │ ├── message_parser_manager.h │ │ │ ├── network.cpp │ │ │ ├── network.sim.cpp │ │ │ ├── network.sim.h │ │ │ ├── raw_message_parser.cpp │ │ │ ├── raw_message_parser.h │ │ │ ├── request_meta.thrift │ │ │ ├── rpc_engine.cpp │ │ │ ├── rpc_engine.h │ │ │ ├── rpc_message.cpp │ │ │ ├── rpc_task.cpp │ │ │ ├── thrift_message_parser.cpp │ │ │ └── thrift_message_parser.h │ │ ├── scheduler.cpp │ │ ├── scheduler.h │ │ ├── security/ │ │ │ ├── CMakeLists.txt │ │ │ ├── access_controller.cpp │ │ │ ├── access_controller.h │ │ │ ├── client_negotiation.cpp │ │ │ ├── client_negotiation.h │ │ │ ├── init.cpp │ │ │ ├── init.h │ │ │ ├── kinit_context.cpp │ │ │ ├── kinit_context.h │ │ │ ├── meta_access_controller.cpp │ │ │ ├── meta_access_controller.h │ │ │ ├── negotiation.cpp │ │ │ ├── negotiation.h │ │ │ ├── negotiation_manager.cpp │ │ │ ├── negotiation_manager.h │ │ │ ├── negotiation_utils.h │ │ │ ├── replica_access_controller.cpp │ │ │ ├── replica_access_controller.h │ │ │ ├── sasl_client_wrapper.cpp │ │ │ ├── sasl_client_wrapper.h │ │ │ ├── sasl_init.cpp │ │ │ ├── sasl_init.h │ │ │ ├── sasl_server_wrapper.cpp │ │ │ ├── sasl_server_wrapper.h │ │ │ ├── sasl_wrapper.cpp │ │ │ ├── sasl_wrapper.h │ │ │ ├── security.thrift │ │ │ ├── server_negotiation.cpp │ │ │ └── server_negotiation.h │ │ ├── service_api_c.cpp │ │ ├── service_engine.cpp │ │ ├── service_engine.h │ │ ├── sim_clock.h │ │ ├── simulator.cpp │ │ ├── task/ │ │ │ ├── CMakeLists.txt │ │ │ ├── hpc_task_queue.cpp │ │ │ ├── hpc_task_queue.h │ │ │ ├── simple_task_queue.cpp │ │ │ ├── simple_task_queue.h │ │ │ ├── task.cpp │ │ │ ├── task_code.cpp │ │ │ ├── task_engine.cpp │ │ │ ├── task_engine.h │ │ │ ├── task_engine.sim.cpp │ │ │ ├── task_engine.sim.h │ │ │ ├── task_queue.cpp │ │ │ ├── task_spec.cpp │ │ │ ├── task_tracker.cpp │ │ │ └── task_worker.cpp │ │ ├── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── async_call.cpp │ │ │ ├── clear.sh │ │ │ ├── client_negotiation_test.cpp │ │ │ ├── command.txt │ │ │ ├── config-test-corrupt-message.ini │ │ │ ├── config-test-sim.ini │ │ │ ├── config-test.ini │ │ │ ├── corrupt_message.cpp │ │ │ ├── gtest.filter │ │ │ ├── lpc.cpp │ │ │ ├── main.cpp │ │ │ ├── message_reader_test.cpp │ │ │ ├── message_utils_test.cpp │ │ │ ├── meta_access_controller_test.cpp │ │ │ ├── negotiation_manager_test.cpp │ │ │ ├── netprovider.cpp │ │ │ ├── pipeline_test.cpp │ │ │ ├── replica_access_controller_test.cpp │ │ │ ├── rpc.cpp │ │ │ ├── rpc_holder_test.cpp │ │ │ ├── rpc_message.cpp │ │ │ ├── run.sh │ │ │ ├── server_negotiation_test.cpp │ │ │ ├── service_api_c.cpp │ │ │ ├── sim_lock.cpp │ │ │ ├── task_engine.cpp │ │ │ ├── task_test.cpp │ │ │ ├── test_utils.h │ │ │ └── thrift_message_parser_test.cpp │ │ ├── threadpool_code.cpp │ │ ├── tool_api.cpp │ │ ├── tracer.cpp │ │ └── zlocks.cpp │ ├── tools/ │ │ ├── CMakeLists.txt │ │ └── mutation_log_tool.cpp │ ├── utils/ │ │ ├── CMakeLists.txt │ │ ├── alloc.cpp │ │ ├── binary_reader.cpp │ │ ├── binary_writer.cpp │ │ ├── clock.cpp │ │ ├── command_manager.cpp │ │ ├── config_api.cpp │ │ ├── configuration.cpp │ │ ├── coredump.h │ │ ├── coredump.posix.cpp │ │ ├── crc.cpp │ │ ├── error_code.cpp │ │ ├── fail_point.cpp │ │ ├── fail_point_impl.h │ │ ├── filesystem.cpp │ │ ├── flags.cpp │ │ ├── gpid.cpp │ │ ├── latency_tracer.cpp │ │ ├── lockp.std.h │ │ ├── logging.cpp │ │ ├── long_adder.cpp │ │ ├── long_adder_bench/ │ │ │ ├── CMakeLists.txt │ │ │ └── long_adder_bench.cpp │ │ ├── math.cpp │ │ ├── memutil.h │ │ ├── metrics.cpp │ │ ├── output_utils.cpp │ │ ├── process_utils.cpp │ │ ├── rand.cpp │ │ ├── rpc_address.cpp │ │ ├── safe_strerror_posix.cpp │ │ ├── shared_io_service.cpp │ │ ├── shared_io_service.h │ │ ├── simple_logger.cpp │ │ ├── simple_logger.h │ │ ├── string_view.cpp │ │ ├── strings.cpp │ │ ├── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── TokenBucketTest.cpp │ │ │ ├── TokenBucketTest.h │ │ │ ├── address.cpp │ │ │ ├── autoref_ptr_test.cpp │ │ │ ├── binary_reader_test.cpp │ │ │ ├── clear.sh │ │ │ ├── command_manager.cpp │ │ │ ├── config-bad-section.ini │ │ │ ├── config-dup-key.ini │ │ │ ├── config-dup-section.ini │ │ │ ├── config-empty.ini │ │ │ ├── config-no-key.ini │ │ │ ├── config-no-section.ini │ │ │ ├── config-null-section.ini │ │ │ ├── config-sample.ini │ │ │ ├── config-unmatch-section.ini │ │ │ ├── configuration.cpp │ │ │ ├── endian_test.cpp │ │ │ ├── env.cpp │ │ │ ├── fail_point_test.cpp │ │ │ ├── file_system_test.cpp │ │ │ ├── file_utils.cpp │ │ │ ├── flag_test.cpp │ │ │ ├── fmt_logging_test.cpp │ │ │ ├── hostname_test.cpp │ │ │ ├── join_point_test.cpp │ │ │ ├── json_helper_test.cpp │ │ │ ├── latency_tracer_test.cpp │ │ │ ├── lock.std.cpp │ │ │ ├── logger.cpp │ │ │ ├── logging.cpp │ │ │ ├── long_adder_test.cpp │ │ │ ├── main.cpp │ │ │ ├── memutil_test.cpp │ │ │ ├── metrics_test.cpp │ │ │ ├── nth_element_bench/ │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── nth_element_bench.cpp │ │ │ ├── nth_element_test.cpp │ │ │ ├── nth_element_utils.h │ │ │ ├── output_utils_test.cpp │ │ │ ├── percentile_utils.h │ │ │ ├── priority_queue.cpp │ │ │ ├── rand_test.cpp │ │ │ ├── run.sh │ │ │ ├── sema.cpp │ │ │ ├── smart_pointers_test.cpp │ │ │ ├── string_conv_test.cpp │ │ │ ├── string_view_test.cpp │ │ │ ├── time_utils_test.cpp │ │ │ ├── token_bucket_throttling_controller_test.cpp │ │ │ ├── token_buckets_test.cpp │ │ │ └── utils.cpp │ │ ├── thread_access_checker.cpp │ │ ├── throttling_controller.cpp │ │ ├── throttling_controller.h │ │ ├── time_utils.cpp │ │ ├── token_bucket_throttling_controller.cpp │ │ ├── token_buckets.cpp │ │ ├── utils.cpp │ │ └── zlock_provider.h │ └── zookeeper/ │ ├── CMakeLists.txt │ ├── distributed_lock_service_zookeeper.cpp │ ├── distributed_lock_service_zookeeper.h │ ├── lock_struct.cpp │ ├── lock_struct.h │ ├── lock_types.h │ ├── test/ │ │ ├── CMakeLists.txt │ │ ├── clear.sh │ │ ├── config-test.ini │ │ ├── distributed_lock_zookeeper.cpp │ │ ├── main.cpp │ │ └── run.sh │ ├── zookeeper_error.cpp │ ├── zookeeper_error.h │ ├── zookeeper_session.cpp │ ├── zookeeper_session.h │ ├── zookeeper_session_mgr.cpp │ └── zookeeper_session_mgr.h └── thirdparty/ ├── CMakeLists.txt ├── fix_fds_for_macos.patch ├── fix_s2_for_aarch64.patch └── fix_thrift_for_cpp11.patch ================================================ FILE CONTENTS ================================================ ================================================ FILE: .clang-format ================================================ # The MIT License (MIT) # # Copyright (c) 2015 Microsoft Corporation # # -=- Robust Distributed System Nucleus (rDSN) -=- # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. --- Language: Cpp # BasedOnStyle: LLVM AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false AlignEscapedNewlinesLeft: false AlignOperands: true AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: All AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: true BinPackArguments: false BinPackParameters: false BraceWrapping: AfterClass: true AfterControlStatement: false AfterEnum: true AfterFunction: true AfterNamespace: false AfterObjCDeclaration: false AfterStruct: true AfterUnion: true BeforeCatch: false BeforeElse: false IndentBraces: false BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true ColumnLimit: 100 CommentPragmas: '^ IWYU pragma:' ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: true ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] IncludeCategories: - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority: 2 - Regex: '^(<|"(gtest|isl|json)/)' Priority: 3 - Regex: '.*' Priority: 1 IncludeIsMainRegex: '$' IndentCaseLabels: false IndentWidth: 4 IndentWrappedFunctionNames: false JavaScriptQuotes: Leave JavaScriptWrapImports: true KeepEmptyLinesAtTheStartOfBlocks: true MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: None ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: true PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakComment: 300 PenaltyBreakFirstLessLess: 120 PenaltyBreakString: 1000 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 PointerAlignment: Right ReflowComments: true SortIncludes: false SpaceAfterCStyleCast: false SpaceBeforeAssignmentOperators: true SpaceBeforeParens: ControlStatements SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false Standard: Cpp11 TabWidth: 4 UseTab: Never ... ================================================ FILE: .github/workflows/check_license_header.yaml ================================================ # 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. --- name: License Check on: pull_request: push: branches: - master - 'v[0-9]+.*' # release branch - ci-test # testing branch for github action - '*dev' # developing branch jobs: license-check: name: Check License Header runs-on: ubuntu-latest steps: - name: "Checkout" uses: actions/checkout@v2 - name: Check License Header uses: apache/skywalking-eyes@v0.3.0 with: # Optional: set the log level. The default value is `info`. # log: debug # Optional: set the config file. The default value is `.licenserc.yaml`. config: .licenserc.yaml ================================================ FILE: .github/workflows/compilation.yaml ================================================ ############################################################################## # 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. ############################################################################## name: rdsn compilation on: push: # when new tag created tags: - v* # when this file is updated paths: - '.github/workflows/compilation.yml' # for manually triggering workflow workflow_dispatch: # run for every day 2am UTC+8(Beijing) schedule: - cron: '0 18 */1 * *' jobs: compilation: runs-on: ubuntu-latest strategy: fail-fast: false matrix: os: - ubuntu1604 - ubuntu1804 - ubuntu2004 #- centos6 is EOL - centos7 compiler-family: - gcc include: - compiler-family: clang compiler: "clang-10,clang++-10" os: ubuntu2004 - compiler-family: clang compiler: "clang-9,clang++-9" os: ubuntu1804 container: image: apache/pegasus:thirdparties-bin-${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Unpack prebuilt third-parties run: unzip /root/thirdparties-bin.zip -d ./thirdparty - name: Compilation on GCC if: ${{ matrix.compiler-family == 'gcc' }} run: ./run.sh build -c --skip_thirdparty - name: Compilation on Clang if: ${{ matrix.compiler-family == 'clang' }} env: COMPILER: ${{ matrix.compiler }} run: ./run.sh build --compiler $COMPILER --skip_thirdparty ================================================ FILE: .github/workflows/cpp_actions.yaml ================================================ # Developer Notes: # # This config is for github actions. Before merging your changes of this file, # it's recommended to create a PR against the ci-test branch to test if it works # as expected. name: Code Lint and Unit Test on: # run on each pull request pull_request: types: [ synchronize, opened, reopened ] paths: - .github/workflows/cpp_actions.yaml - CMakeLists.txt - bin/** - compile_thrift.py - include/** - run.sh - scripts/** - src/** - thirdparty/** branches: - master - 'v[0-9]+.*' # release branch - ci-test # testing branch for github action - '*dev' # developing branch # for manually triggering workflow workflow_dispatch: defaults: run: shell: bash jobs: lint: name: Lint runs-on: ubuntu-latest container: image: apache/pegasus:clang-format-3.9 steps: - uses: actions/checkout@v2 with: fetch-depth: 1 - name: clang-format run: ./scripts/linux/run-clang-format.py --clang-format-executable=clang-format-3.9 -r src include test: name: Test needs: lint runs-on: self-hosted container: image: apache/pegasus:thirdparties-bin-ubuntu1804 env: CCACHE_DIR: /tmp/ccache/pegasus CCACHE_MAXSIZE: 10G volumes: # Place ccache compilation intermediate results in host memory, that's shared among containers. - /tmp/ccache/pegasus:/tmp/ccache/pegasus # Read docs at https://docs.docker.com/storage/tmpfs/ for more details of using tmpfs in docker. options: --mount type=tmpfs,destination=/tmp/pegasus --cap-add=SYS_PTRACE steps: - uses: actions/checkout@v2 - uses: dorny/paths-filter@v2 id: changes with: filters: | thirdparty: - 'thirdparty/**' - name: Unpack prebuilt third-parties if: steps.changes.outputs.thirdparty == 'false' run: unzip /root/thirdparties-bin.zip -d ./thirdparty - name: Rebuild third-parties if: steps.changes.outputs.thirdparty == 'true' working-directory: thirdparty run: | mkdir build cmake -DCMAKE_BUILD_TYPE=Release -B build/ cmake --build build/ -j $(($(nproc)/2+1)) - name: Compilation run: ./run.sh build -c --skip_thirdparty - name: Unit Testing run: | export LD_LIBRARY_PATH=`pwd`/thirdparty/output/lib:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server ulimit -s unlimited ./run.sh test --skip_thirdparty test-with-sanitizer-address: name: Test With Sanitizer Address needs: lint runs-on: self-hosted container: image: apache/pegasus:thirdparties-bin-ubuntu1804 env: CCACHE_DIR: /tmp/ccache/pegasus CCACHE_MAXSIZE: 10G volumes: # Place ccache compilation intermediate results in host memory, that's shared among containers. - /tmp/ccache/pegasus:/tmp/ccache/pegasus # Read docs at https://docs.docker.com/storage/tmpfs/ for more details of using tmpfs in docker. options: --mount type=tmpfs,destination=/tmp/pegasus --cap-add=SYS_PTRACE steps: - uses: actions/checkout@v2 - uses: dorny/paths-filter@v2 id: changes with: filters: | thirdparty: - 'thirdparty/**' - name: Unpack prebuilt third-parties if: steps.changes.outputs.thirdparty == 'false' run: unzip /root/thirdparties-bin.zip -d ./thirdparty - name: Rebuild third-parties if: steps.changes.outputs.thirdparty == 'true' working-directory: thirdparty run: | mkdir build cmake -DCMAKE_BUILD_TYPE=Release -B build/ cmake --build build/ -j $(($(nproc)/2+1)) - name: Compilation run: ./run.sh build -c --sanitizer address --skip_thirdparty --disable_gperf - name: Unit Testing run: | export LD_LIBRARY_PATH=`pwd`/thirdparty/output/lib:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server ulimit -s unlimited ./run.sh test --sanitizer address --skip_thirdparty --disable_gperf test-with-sanitizer-leak: name: Test With Sanitizer Leak needs: lint runs-on: self-hosted container: image: apache/pegasus:thirdparties-bin-ubuntu1804 env: CCACHE_DIR: /tmp/ccache/pegasus CCACHE_MAXSIZE: 10G volumes: # Place ccache compilation intermediate results in host memory, that's shared among containers. - /tmp/ccache/pegasus:/tmp/ccache/pegasus # Read docs at https://docs.docker.com/storage/tmpfs/ for more details of using tmpfs in docker. options: --mount type=tmpfs,destination=/tmp/pegasus --cap-add=SYS_PTRACE steps: - uses: actions/checkout@v2 - uses: dorny/paths-filter@v2 id: changes with: filters: | thirdparty: - 'thirdparty/**' - name: Unpack prebuilt third-parties if: steps.changes.outputs.thirdparty == 'false' run: unzip /root/thirdparties-bin.zip -d ./thirdparty - name: Rebuild third-parties if: steps.changes.outputs.thirdparty == 'true' working-directory: thirdparty run: | mkdir build cmake -DCMAKE_BUILD_TYPE=Release -B build/ cmake --build build/ -j $(($(nproc)/2+1)) - name: Compilation run: ./run.sh build -c --sanitizer leak --skip_thirdparty --disable_gperf - name: Unit Testing run: | export LD_LIBRARY_PATH=`pwd`/thirdparty/output/lib:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server ulimit -s unlimited ./run.sh test --sanitizer leak --skip_thirdparty --disable_gperf test-with-sanitizer-undefined: name: Test With Sanitizer Undefined needs: lint runs-on: self-hosted container: image: apache/pegasus:thirdparties-bin-ubuntu1804 env: CCACHE_DIR: /tmp/ccache/pegasus CCACHE_MAXSIZE: 10G volumes: # Place ccache compilation intermediate results in host memory, that's shared among containers. - /tmp/ccache/pegasus:/tmp/ccache/pegasus # Read docs at https://docs.docker.com/storage/tmpfs/ for more details of using tmpfs in docker. options: --mount type=tmpfs,destination=/tmp/pegasus --cap-add=SYS_PTRACE steps: - uses: actions/checkout@v2 - uses: dorny/paths-filter@v2 id: changes with: filters: | thirdparty: - 'thirdparty/**' - name: Unpack prebuilt third-parties if: steps.changes.outputs.thirdparty == 'false' run: unzip /root/thirdparties-bin.zip -d ./thirdparty - name: Rebuild third-parties if: steps.changes.outputs.thirdparty == 'true' working-directory: thirdparty run: | mkdir build cmake -DCMAKE_BUILD_TYPE=Release -B build/ cmake --build build/ -j $(($(nproc)/2+1)) - name: Compilation run: ./run.sh build -c --sanitizer undefined --skip_thirdparty --disable_gperf - name: Unit Testing run: | export LD_LIBRARY_PATH=`pwd`/thirdparty/output/lib:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server ulimit -s unlimited ./run.sh test --sanitizer undefined --skip_thirdparty --disable_gperf ================================================ FILE: .github/workflows/cpp_always_pass_actions.yaml ================================================ # 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. --- # There are 'paths' filters for .github/workflows/cpp_actions.yaml, # it can be skipped, but lead CI pending, we add this # 'always pass' action to resolve it, see more details: # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks name: Code Lint and Unit Test on: # run on each pull request pull_request: types: [ synchronize, opened, reopened ] paths-ignore: - .github/workflows/cpp_actions.yaml - CMakeLists.txt - bin/** - compile_thrift.py - include/** - run.sh - scripts/** - src/** - thirdparty/** branches: - master - 'v[0-9]+.*' # release branch - ci-test # testing branch for github action - '*dev' # developing branch # for manually triggering workflow workflow_dispatch: jobs: lint: name: Lint runs-on: ubuntu-latest steps: - run: 'echo "No build required" ' test: name: Test runs-on: ubuntu-latest steps: - run: 'echo "No build required" ' test-with-sanitizer-address: name: Test With Sanitizer Address runs-on: ubuntu-latest steps: - run: 'echo "No build required" ' test-with-sanitizer-leak: name: Test With Sanitizer Leak runs-on: ubuntu-latest steps: - run: 'echo "No build required" ' test-with-sanitizer-undefined: name: Test With Sanitizer Undefined runs-on: ubuntu-latest steps: - run: 'echo "No build required" ' ================================================ FILE: .github/workflows/issue_ref.yaml ================================================ # # 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. # name: Issue Check on: pull_request: types: ['opened', 'edited', 'reopened', 'synchronize'] jobs: title: name: Issue check runs-on: ubuntu-latest steps: - name: Check for ticket uses: neofinancial/ticket-check-action@v1.3.0 with: token: ${{ secrets.GITHUB_TOKEN }} ticketPrefix: '#' bodyURLRegex: 'http(s?):\/\/(github.com)(\/apache)(\/incubator-pegasus)(\/issues)\/\d+' ================================================ FILE: .github/workflows/non_cpp_actions.yaml ================================================ # 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. --- name: Non-cpp Code Lint on: # run on each pull request pull_request: types: [ synchronize, opened, reopened ] branches: - master - 'v[0-9]+.*' # release branch - ci-test # testing branch for github action - '*dev' # developing branch # for manually triggering workflow workflow_dispatch: defaults: run: shell: bash jobs: semantic_title: name: Lint PR title runs-on: ubuntu-latest steps: - uses: amannn/action-semantic-pull-request@v4.3.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} markdown-link-check: name: Check Markdown links runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 ================================================ FILE: .gitignore ================================================ # The MIT License (MIT) # # Copyright (c) 2015 Microsoft Corporation # # -=- Robust Distributed System Nucleus (rDSN) -=- # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. .matchfile .kdev4/ .zk_install/ .idea .vscode/ gcov_report/ bin/Linux/thrift builder/ install/ test_reports/ Dockerfile include/thrift/ DSN_ROOT rdsn.github.config rdsn.github.creator rdsn.github.creator.user* rdsn.github.files rdsn.github.includes rDSN.github.* update_qt_config.sh zookeeper-3.4.6.tar.gz zookeeper-3.4.6/ thirdparty/build thirdparty/src thirdparty/output packages/ cmake-build-debug/ ================================================ FILE: .licenserc.yaml ================================================ # 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. header: license: spdx-id: MIT copyright-owner: Microsoft Corporation content: | The MIT License (MIT) Copyright (c) 2015 Microsoft Corporation -=- Robust Distributed System Nucleus (rDSN) -=- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. paths-ignore: # All the type of licenses of this project should be added to LICENSE. - 'LICENSE' # Apache license 2.0 - 'src/common/backup.thrift' - 'src/common/bulk_load.thrift' - 'src/common/duplication.thrift' - 'src/common/partition_split.thrift' - 'src/runtime/rpc/request_meta.thrift' - 'src/runtime/security/security.thrift' - '.licenserc.yaml' - 'bin/FindJemalloc.cmake' - 'bin/compiler_info.cmake' - 'bin/thrift_utils.cmake' - 'CONTRIBUTING.md' - '.github/workflows/check_license_header.yaml' - '.github/workflows/compilation.yaml' - '.github/workflows/cpp_actions.yaml' - '.github/workflows/cpp_always_pass_actions.yaml' - '.github/workflows/issue_ref.yaml' - '.github/workflows/non_cpp_actions.yaml' - 'include/dsn/dist/fmt_logging.h' - 'include/dsn/dist/block_service.h' - 'include/dsn/dist/common.h' - 'include/dsn/dist/remote_command.h' - 'include/dsn/dist/replication/mutation_duplicator.h' - 'include/dsn/dist/replication/duplication_common.h' - 'include/dsn/dist/replication/replication_types.h' - 'include/dsn/utility/clock.h' - 'include/dsn/utility/preloadable.h' - 'include/dsn/utility/sys_exit_hook.h' - 'include/dsn/utils/token_buckets.h' - 'include/dsn/utils/latency_tracer.h' - 'include/dsn/utils/token_bucket_throttling_controller.h' - 'include/dsn/http/http_server.h' - 'include/dsn/cpp/message_utils.h' - 'include/dsn/cpp/rpc_holder.h' - 'include/dsn/cpp/pipeline.h' - 'include/dsn/perf_counter/perf_counter_utils.h' - 'include/dsn/utility/endians.h' - 'include/dsn/utility/fail_point.h' - 'include/dsn/utility/singleton.h' - 'include/dsn/utility/process_utils.h' - 'include/dsn/utility/flags.h' - 'include/dsn/utility/string_conv.h' - 'include/dsn/utility/timer.h' - 'include/dsn/utility/output_utils.h' - 'include/dsn/utility/string_splitter.h' - 'include/dsn/utility/rand.h' - 'include/dsn/utility/math.h' - 'include/dsn/utility/defer.h' - 'include/dsn/utility/alloc.h' - 'include/dsn/utility/casts.h' - 'include/dsn/utility/long_adder.h' - 'include/dsn/utility/metrics.h' - 'include/dsn/utility/nth_element.h' - 'src/aio/aio_task.cpp' - 'src/aio/test/main.cpp' - 'src/meta/test/meta_http_service_test.cpp' - 'src/meta/test/meta_service_test.cpp' - 'src/perf_counter/perf_counter_atomic.h' - 'src/perf_counter/test/main.cpp' - 'src/remote_cmd/remote_command.cpp' - 'src/runtime/sim_clock.h' - 'src/runtime/test/replica_access_controller_test.cpp' - 'src/runtime/test/server_negotiation_test.cpp' - 'src/runtime/test/negotiation_manager_test.cpp' - 'src/runtime/test/task_test.cpp' - 'src/runtime/test/client_negotiation_test.cpp' - 'src/runtime/test/message_reader_test.cpp' - 'src/runtime/test/thrift_message_parser_test.cpp' - 'src/runtime/test/meta_access_controller_test.cpp' - 'src/runtime/security/sasl_wrapper.h' - 'src/runtime/security/sasl_server_wrapper.cpp' - 'src/runtime/security/server_negotiation.cpp' - 'src/runtime/security/server_negotiation.h' - 'src/runtime/security/sasl_server_wrapper.h' - 'src/runtime/security/access_controller.h' - 'src/runtime/security/access_controller.cpp' - 'src/runtime/security/sasl_init.h' - 'src/runtime/security/negotiation_manager.h' - 'src/runtime/security/sasl_client_wrapper.cpp' - 'src/runtime/security/kinit_context.cpp' - 'src/runtime/security/client_negotiation.cpp' - 'src/runtime/security/sasl_init.cpp' - 'src/runtime/security/kinit_context.h' - 'src/runtime/security/negotiation.cpp' - 'src/runtime/security/negotiation_manager.cpp' - 'src/runtime/security/client_negotiation.h' - 'src/runtime/security/negotiation.h' - 'src/runtime/security/security.thrift' - 'src/runtime/security/sasl_wrapper.cpp' - 'src/runtime/security/replica_access_controller.cpp' - 'src/runtime/security/meta_access_controller.h' - 'src/runtime/security/init.cpp' - 'src/runtime/security/init.h' - 'src/runtime/security/replica_access_controller.h' - 'src/runtime/security/sasl_client_wrapper.h' - 'src/runtime/security/negotiation_utils.h' - 'src/runtime/security/meta_access_controller.cpp' - 'src/runtime/rpc/request_meta.thrift' - 'src/meta/meta_state_service_utils_impl.h' - 'src/meta/meta_bulk_load_ingestion_context.cpp' - 'src/meta/partition_guardian.h' - 'src/meta/app_balance_policy.cpp' - 'src/meta/test/meta_test_base.h' - 'src/meta/test/meta_app_operation_test.cpp' - 'src/meta/test/meta_mauanl_compaction_test.cpp' - 'src/meta/test/meta_bulk_load_service_test.cpp' - 'src/meta/test/ford_fulkerson_test.cpp' - 'src/meta/test/cluster_balance_policy_test.cpp' - 'src/meta/test/meta_test_base.cpp' - 'src/meta/test/dummy_balancer.h' - 'src/meta/test/meta_bulk_load_ingestion_test.cpp' - 'src/meta/test/meta_backup_test.cpp' - 'src/meta/test/backup_test.cpp' - 'src/meta/test/main.cpp' - 'src/meta/test/server_state_restore_test.cpp' - 'src/meta/test/copy_replica_operation_test.cpp' - 'src/meta/app_env_validator.cpp' - 'src/meta/meta_rpc_types.h' - 'src/meta/load_balance_policy.cpp' - 'src/meta/meta_bulk_load_service.cpp' - 'src/meta/cluster_balance_policy.cpp' - 'src/meta/meta_split_service.cpp' - 'src/meta/cluster_balance_policy.h' - 'src/meta/app_env_validator.h' - 'src/meta/meta_bulk_load_service.h' - 'src/meta/backup_engine.cpp' - 'src/meta/backup_engine.h' - 'src/meta/meta_backup_service.cpp' - 'src/meta/meta_backup_service.h' - 'src/meta/meta_http_service.h' - 'src/meta/meta_split_service.h' - 'src/meta/meta_state_service_utils.h' - 'src/meta/meta_state_service_utils.cpp' - 'src/meta/meta_http_service.cpp' - 'src/meta/app_balance_policy.h' - 'src/meta/partition_guardian.cpp' - 'src/meta/meta_bulk_load_ingestion_context.h' - 'src/meta/load_balance_policy.h' - 'src/meta/duplication/duplication_info.h' - 'src/meta/duplication/meta_duplication_service.h' - 'src/meta/duplication/duplication_info.cpp' - 'src/meta/duplication/meta_duplication_service.cpp' - 'src/meta/server_state_restore.cpp' - 'src/utils/clock.cpp' - 'src/utils/flags.cpp' - 'src/utils/throttling_controller.h' - 'src/utils/time_utils.cpp' - 'src/utils/test/rand_test.cpp' - 'src/utils/test/latency_tracer_test.cpp' - 'src/utils/test/binary_reader_test.cpp' - 'src/utils/test/fail_point_test.cpp' - 'src/utils/test/hostname_test.cpp' - 'src/utils/test/token_bucket_throttling_controller_test.cpp' - 'src/utils/test/file_system_test.cpp' - 'src/utils/test/endian_test.cpp' - 'src/utils/test/token_buckets_test.cpp' - 'src/utils/test/flag_test.cpp' - 'src/utils/test/main.cpp' - 'src/utils/fail_point.cpp' - 'src/utils/math.cpp' - 'src/utils/latency_tracer.cpp' - 'src/utils/fail_point_impl.h' - 'src/utils/process_utils.cpp' - 'src/utils/token_bucket_throttling_controller.cpp' - 'src/utils/token_buckets.cpp' - 'src/utils/rand.cpp' - 'src/utils/throttling_controller.cpp' - 'src/utils/output_utils.cpp' - 'src/utils/alloc.cpp' - 'src/utils/long_adder.cpp' - 'src/utils/long_adder_bench/long_adder_bench.cpp' - 'src/utils/metrics.cpp' - 'src/utils/shared_io_service.cpp' - 'src/utils/test/long_adder_test.cpp' - 'src/utils/test/metrics_test.cpp' - 'src/utils/test/nth_element_bench/nth_element_bench.cpp' - 'src/utils/test/nth_element_test.cpp' - 'src/utils/test/nth_element_utils.h' - 'src/utils/test/percentile_utils.h' - 'src/common/partition_split.thrift' - 'src/common/common.cpp' - 'src/common/consensus.thrift' - 'src/common/backup_common.h' - 'src/common/bulk_load_common.cpp' - 'src/common/test/fs_manager_test.cpp' - 'src/common/test/common_test.cpp' - 'src/common/test/replication_common_test.cpp' - 'src/common/fs_manager.h' - 'src/common/backup_common.cpp' - 'src/common/bulk_load_common.h' - 'src/common/duplication.thrift' - 'src/common/manual_compact.h' - 'src/common/duplication_common.cpp' - 'src/common/partition_split_common.h' - 'src/common/metadata.thrift' - 'src/common/meta_admin.thrift' - 'src/common/bulk_load.thrift' - 'src/common/backup.thrift' - 'src/common/replica_admin.thrift' - 'src/http/CMakeLists.txt' - 'src/http/builtin_http_calls.h' - 'src/http/test/http_server_test.cpp' - 'src/http/test/perf_counter_http_service_test.cpp' - 'src/http/test/uri_decoder_test.cpp' - 'src/http/http_server_impl.h' - 'src/http/uri_decoder.cpp' - 'src/http/uri_decoder.h' - 'src/http/http_server.cpp' - 'src/http/perf_counter_http_service.cpp' - 'src/http/pprof_http_service.cpp' - 'src/http/builtin_http_calls.cpp' - 'src/http/service_version.cpp' - 'src/http/pprof_http_service.h' - 'src/http/service_version.h' - 'src/http/config_http_service.cpp' - 'src/http/http_call_registry.h' - 'src/block_service/CMakeLists.txt' - 'src/block_service/test/fds_service_test.cpp' - 'src/block_service/test/CMakeLists.txt' - 'src/block_service/test/hdfs_service_test.cpp' - 'src/block_service/test/local_service_test.cpp' - 'src/block_service/test/run.sh' - 'src/block_service/test/block_service_mock.h' - 'src/block_service/test/clear.sh' - 'src/block_service/test/main.cpp' - 'src/block_service/test/block_service_manager_test.cpp' - 'src/block_service/directio_writable_file.h' - 'src/block_service/fds/fds_service.cpp' - 'src/block_service/fds/fds_service.h' - 'src/block_service/block_service_manager.cpp' - 'src/block_service/block_service_manager.h' - 'src/block_service/local/local_service.cpp' - 'src/block_service/local/local_service.h' - 'src/block_service/hdfs/hdfs_service.cpp' - 'src/block_service/hdfs/hdfs_service.h' - 'src/block_service/directio_writable_file.cpp' - 'src/replica/replica_disk_migrator.cpp' - 'src/replica/split/replica_split_manager.cpp' - 'src/replica/split/test/replica_split_test.cpp' - 'src/replica/split/test/main.cpp' - 'src/replica/split/replica_split_manager.h' - 'src/replica/replica_http_service.cpp' - 'src/replica/log_block.cpp' - 'src/replica/test/replica_learn_test.cpp' - 'src/replica/test/log_file_test.cpp' - 'src/replica/test/throttling_controller_test.cpp' - 'src/replica/test/replica_disk_test_base.h' - 'src/replica/test/cold_backup_context_test.cpp' - 'src/replica/test/replica_disk_test.cpp' - 'src/replica/test/log_block_test.cpp' - 'src/replica/test/clear.sh' - 'src/replica/test/replica_test.cpp' - 'src/replica/test/replica_disk_migrate_test.cpp' - 'src/replica/test/main.cpp' - 'src/replica/test/backup_block_service_mock.h' - 'src/replica/test/open_replica_test.cpp' - 'src/replica/replica_backup.cpp' - 'src/replica/disk_cleaner.h' - 'src/replica/mutation_log_replay.cpp' - 'src/replica/bulk_load/test/replica_bulk_loader_test.cpp' - 'src/replica/bulk_load/test/main.cpp' - 'src/replica/bulk_load/replica_bulk_loader.cpp' - 'src/replica/bulk_load/replica_bulk_loader.h' - 'src/replica/disk_cleaner.cpp' - 'src/replica/replica_disk_migrator.h' - 'src/replica/log_block.h' - 'src/replica/replica_throttle.cpp' - 'src/replica/backup/cold_backup_context.h' - 'src/replica/backup/cold_backup_context.cpp' - 'src/replica/backup/test/replica_backup_manager_test.cpp' - 'src/replica/backup/test/main.cpp' - 'src/replica/backup/replica_backup_manager.h' - 'src/replica/backup/replica_backup_server.cpp' - 'src/replica/backup/replica_backup_manager.cpp' - 'src/replica/backup/replica_backup_server.h' - 'src/replica/replica_http_service.h' - 'src/replica/replica_restore.cpp' - 'src/replica/duplication/mutation_batch.h' - 'src/replica/duplication/replica_follower.cpp' - 'src/replica/duplication/replica_duplicator_manager.cpp' - 'src/replica/duplication/duplication_pipeline.cpp' - 'src/replica/duplication/replica_follower.h' - 'src/replica/duplication/replica_duplicator_manager.h' - 'src/replica/duplication/test/replica_http_service_test.cpp' - 'src/replica/duplication/test/replica_duplicator_manager_test.cpp' - 'src/replica/duplication/test/duplication_sync_timer_test.cpp' - 'src/replica/duplication/test/load_from_private_log_test.cpp' - 'src/replica/duplication/test/duplication_test_base.h' - 'src/replica/duplication/test/replica_follower_test.cpp' - 'src/replica/duplication/test/ship_mutation_test.cpp' - 'src/replica/duplication/test/mutation_batch_test.cpp' - 'src/replica/duplication/test/replica_duplicator_test.cpp' - 'src/replica/duplication/test/main.cpp' - 'src/replica/duplication/replica_duplicator.h' - 'src/replica/duplication/duplication_pipeline.h' - 'src/replica/duplication/load_from_private_log.h' - 'src/replica/duplication/mutation_batch.cpp' - 'src/replica/duplication/duplication_sync_timer.h' - 'src/replica/duplication/duplication_sync_timer.cpp' - 'src/replica/duplication/load_from_private_log.cpp' - 'src/replica/duplication/replica_duplicator.cpp' - 'src/perf_counter/builtin_counters.cpp' - 'src/perf_counter/builtin_counters.h' # Copyright (c) Facebook, Inc - 'include/dsn/utility/TokenBucket.h' - 'src/utils/test/TokenBucketTest.cpp' - 'src/utils/test/TokenBucketTest.h' # https://github.com/preshing/cpp11-on-multicore/blob/master/LICENSE - 'include/dsn/utility/hpc_locks/autoreseteventcondvar.h' - 'include/dsn/utility/hpc_locks/rwlock.h' - 'include/dsn/utility/hpc_locks/autoresetevent.h' - 'include/dsn/utility/hpc_locks/sema.h' - 'include/dsn/utility/hpc_locks/bitfield.h' - 'include/dsn/utility/hpc_locks/benaphore.h' # Copyright (c) xxxx The Chromium Authors - 'src/runtime/build_config.h' - 'src/utils/test/autoref_ptr_test.cpp' - 'include/dsn/utility/safe_strerror_posix.h' - 'src/runtime/build_config.h' - 'src/utils/test/autoref_ptr_test.cpp' - 'src/utils/safe_strerror_posix.cpp' # Copyright 2017 The Abseil Authors - 'include/dsn/utility/absl/base/internal/invoke.h' - 'include/dsn/utility/absl/utility/utility.h' - 'include/dsn/utility/smart_pointers.h' - 'include/dsn/utility/string_view.h' - 'src/utils/test/memutil_test.cpp' - 'src/utils/test/string_view_test.cpp' - 'src/utils/test/smart_pointers_test.cpp' - 'src/utils/memutil.h' - 'src/utils/string_view.cpp' # Copyright (c) 2010-2011, Rob Jansen - 'bin/FindRT.cmake' - 'bin/FindDL.cmake' # Copyright (c) 2017 Guillaume Papin - 'scripts/linux/run-clang-format.py' # need manual fix - 'src/failure_detector/test/gtest.filter' - 'src/meta/test/meta_state/gtest.filter' - 'src/meta/test/suite1' - 'src/meta/test/suite2' - 'src/nfs/test/nfs_test_file1' - 'src/nfs/test/nfs_test_file2' - 'src/runtime/test/gtest.filter' - 'thirdparty/fix_fds_for_macos.patch' - 'thirdparty/fix_s2_for_aarch64.patch' - 'thirdparty/fix_thrift_for_cpp11.patch' # should be empty, or ignore all comment lines - 'src/utils/test/config-empty.ini' comment: on-failure ================================================ FILE: CMakeLists.txt ================================================ cmake_minimum_required(VERSION 3.11.0) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # require at least gcc 5.4.0 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4.0) message(FATAL_ERROR "GCC version must be at least 5.4.0!") endif () endif () project(dsn C CXX) include(bin/dsn.cmake) set(DSN_BUILD_RUNTIME TRUE) add_definitions(-DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=0) dsn_common_setup() # add custom target for gcov if(ENABLE_GCOV) find_program(GCOV_PATH gcov) find_program(GCOVR_PATH gcovr) if(NOT GCOV_PATH) message(FATAL_ERROR "gcov not found! Aborting...") endif() # NOT GCOV_PATH if(NOT GCOVR_PATH) message(FATAL_ERROR "gcovr not found! Aborting...") endif() # NOT GCOVR_PATH if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading") endif() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug" set(COVERAGE_COMPILER_FLAGS "-g -O0 --coverage -fprofile-arcs -ftest-coverage" CACHE INTERNAL "") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}") message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov") add_definitions(-DENABLE_GCOV=1) endif() if(SANITIZER) add_definitions(-DSANITIZER=1) endif() # Users don't have to configure CMAKE_INSTALL_PREFIX unless they want to customize # the destination. set(CMAKE_INSTALL_PREFIX ${DSN_ROOT} CACHE STRING "" FORCE) message (STATUS "dsn Installation directory: CMAKE_INSTALL_PREFIX = " ${CMAKE_INSTALL_PREFIX}) # install rdsn/include to ${CMAKE_INCLUDE_PREFIX}/include install(DIRECTORY include/ DESTINATION include) # NOTE: dsn_types.h is not actually a thrift-generated file. As pegasus may reference it, # we should copy also this file to the path the same as other thrift-generated files. install(FILES include/dsn/cpp/serialization_helper/dsn_types.h DESTINATION include) # TODO(wutao1): remove this line after dsn.layer2_types.h is removed from repo. install(FILES include/dsn/cpp/serialization_helper/dsn.layer2_types.h DESTINATION include) include_directories(${DSN_PROJECT_DIR}/include) include_directories(${DSN_PROJECT_DIR}/include/dsn/cpp/serialization_helper) include_directories(${DSN_PROJECT_DIR}/src) add_subdirectory(src) ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to Pegasus This is a rough outline of what a contributor's workflow looks like: - Create a topic branch from where you want to base your work. This is usually master. - Make commits of logical units and add test case if the change fixes a bug or adds new functionality. - Run tests and make sure all the tests are passed. - Make sure your commit messages are in the proper format (see below). - Push your changes to a topic branch in your fork of the repository. - Submit a pull request. - Your PR must receive LGTMs from two maintainers. Thanks for your contributions! ### Format of the Commit Message We follow a rough convention for commit messages that is designed to answer two questions: what changed and why. The subject line should feature the what and the body of the commit should describe the why. ``` utility: introduce rpc_holder This is a wrapper of dsn_message_t. It manages the lifetime follow RAII. Fix #10 ``` The format can be described more formally as follows: ``` :