diff --git a/src/common/fs_manager.cpp b/src/common/fs_manager.cpp index f1e9a11810..636e50bb0c 100644 --- a/src/common/fs_manager.cpp +++ b/src/common/fs_manager.cpp @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * fs_manager's implement: used to track the disk position for all the allocated replicas - * - * Revision history: - * 2017-08-08: sunweijie@xiaomi.com, first draft - */ - #include "fs_manager.h" #include diff --git a/src/common/fs_manager.h b/src/common/fs_manager.h index 7b7f03f516..875d0bdbe4 100644 --- a/src/common/fs_manager.h +++ b/src/common/fs_manager.h @@ -84,6 +84,7 @@ struct dir_node void update_disk_stat(); }; +// Track the data directories and replicas. class fs_manager { public: diff --git a/src/common/gpid.h b/src/common/gpid.h index ba2f9ee5bc..183aae40dc 100644 --- a/src/common/gpid.h +++ b/src/common/gpid.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once #include diff --git a/src/common/json_helper.h b/src/common/json_helper.h index bbead87a2d..3c5bed8eab 100644 --- a/src/common/json_helper.h +++ b/src/common/json_helper.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once #include diff --git a/src/common/replication_other_types.h b/src/common/replication_other_types.h index 557d97ecb4..b5f62205c3 100644 --- a/src/common/replication_other_types.h +++ b/src/common/replication_other_types.h @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ #ifndef replication_OTHER_TYPES_H #define replication_OTHER_TYPES_H diff --git a/src/failure_detector/failure_detector.h b/src/failure_detector/failure_detector.h index 85186ac65e..0520cc4b4e 100644 --- a/src/failure_detector/failure_detector.h +++ b/src/failure_detector/failure_detector.h @@ -24,41 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * interface for a perfect failure detector - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * Dec., 2015, @shengofsun (Weijie Sun), make zlock preoteced, - * give the subClasses flexibility - * xxxx-xx-xx, author, fix bug about xxx - */ - -/* - * Notes on the failure detector: - * - * 1. Due to the fact that we can only check the liveness inside check-all-records call, - * which happens every "check_interval_seconds" seconds, worker may disconnect from master - * in the period earlier than the lease_seconds to ensure the perfect FD. - * In the worst case, workers may disconnect themselves - * after "lease"-"check_interval_seconds" seconds; - * - * Similarily, master may claim a worker dead more slowly even the workers are dead - * for longer than grace_seconds. In the worst case, it will be - * "grace"+"check_interval_seconds" seconds. - * - * 2. In practice, your should set check_interval_seconds a small value for a fine-grained FD. - * For client, you may set it as 2 second as it usually connect to a small number of masters. - * For master, you may set it as 5 or 10 seconds. - * - * 3. We should always use dedicated thread pools for THREAD_POOL_FD, - * and set thread priority to being highest so as to minimize the performance - * interference with other workloads. - * - * 4. The lease_periods must be less than the grace_periods, as required by prefect FD. - * - */ #pragma once #include @@ -106,6 +71,29 @@ class failure_detector_callback virtual void on_worker_connected(::dsn::rpc_address node) = 0; }; +// The interface for a perfect failure detector. +// +// Notes on the failure detector: +// +// 1. Due to the fact that we can only check the liveness inside check-all-records call, +// which happens every "check_interval_seconds" seconds, worker may disconnect from master +// in the period earlier than the lease_seconds to ensure the perfect FD. +// In the worst case, workers may disconnect themselves +// after "lease"-"check_interval_seconds" seconds; +// +// Similarily, master may claim a worker dead more slowly even the workers are dead +// for longer than grace_seconds. In the worst case, it will be +// "grace"+"check_interval_seconds" seconds. +// +// 2. In practice, your should set check_interval_seconds a small value for a fine-grained FD. +// For client, you may set it as 2 second as it usually connect to a small number of masters. +// For master, you may set it as 5 or 10 seconds. +// +// 3. We should always use dedicated thread pools for THREAD_POOL_FD, +// and set thread priority to being highest so as to minimize the performance +// interference with other workloads. +// +// 4. The lease_periods must be less than the grace_periods, as required by prefect FD. class failure_detector : public failure_detector_service, public failure_detector_client, public failure_detector_callback diff --git a/src/failure_detector/failure_detector_multimaster.cpp b/src/failure_detector/failure_detector_multimaster.cpp index 42fc7ba2b3..66b5d190e4 100644 --- a/src/failure_detector/failure_detector_multimaster.cpp +++ b/src/failure_detector/failure_detector_multimaster.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include diff --git a/src/failure_detector/fd.client.h b/src/failure_detector/fd.client.h index 586a9dc72b..96fde50fe0 100644 --- a/src/failure_detector/fd.client.h +++ b/src/failure_detector/fd.client.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "fd.code.definition.h" #include diff --git a/src/failure_detector/fd.server.h b/src/failure_detector/fd.server.h index 6ba37b448e..e518b8c47a 100644 --- a/src/failure_detector/fd.server.h +++ b/src/failure_detector/fd.server.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "fd.code.definition.h" #include diff --git a/src/meta/distributed_lock_service_simple.cpp b/src/meta/distributed_lock_service_simple.cpp index 2fc25bf350..cc95287850 100644 --- a/src/meta/distributed_lock_service_simple.cpp +++ b/src/meta/distributed_lock_service_simple.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * a simple version of distributed lock service for development - * - * Revision history: - * 2015-11-04, @imzhenyu (Zhenyu.Guo@microsoft.com), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include "common/replication.codes.h" diff --git a/src/meta/distributed_lock_service_simple.h b/src/meta/distributed_lock_service_simple.h index 59b2bde5e6..fe43a950d4 100644 --- a/src/meta/distributed_lock_service_simple.h +++ b/src/meta/distributed_lock_service_simple.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * a simple version of distributed lock service for development - * - * Revision history: - * 2015-11-04, @imzhenyu (Zhenyu.Guo@microsoft.com), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include @@ -53,7 +44,9 @@ namespace dsn { namespace dist { -// Only for test purpose. + +// A simple version of distributed lock service. +// NOTE: Only for test purpose. class distributed_lock_service_simple : public distributed_lock_service { public: diff --git a/src/meta/greedy_load_balancer.h b/src/meta/greedy_load_balancer.h index 862a29c197..14243c2da7 100644 --- a/src/meta/greedy_load_balancer.h +++ b/src/meta/greedy_load_balancer.h @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * A greedy load balancer based on Dijkstra & Ford-Fulkerson - * - * Revision history: - * 2016-02-03, Weijie Sun, first version - */ - #pragma once #include @@ -51,6 +43,7 @@ namespace replication { class load_balance_policy; class meta_service; +// A greedy load balancer based on Dijkstra & Ford-Fulkerson. class greedy_load_balancer : public server_load_balancer { public: diff --git a/src/meta/meta_data.cpp b/src/meta/meta_data.cpp index 23dba0c929..a44180d4a0 100644 --- a/src/meta/meta_data.cpp +++ b/src/meta/meta_data.cpp @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * the meta server's date structure, impl file - * - * Revision history: - * 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), first version - * xxxx-xx-xx, author, fix bug about xxx - */ #include #include diff --git a/src/meta/meta_data.h b/src/meta/meta_data.h index cf8acf5ba3..ea236fa5cc 100644 --- a/src/meta/meta_data.h +++ b/src/meta/meta_data.h @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * the meta server's date structure - * - * Revision history: - * 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), first version - * xxxx-xx-xx, author, fix bug about xxx - */ #pragma once #include diff --git a/src/meta/meta_options.cpp b/src/meta/meta_options.cpp index ebc39ee597..7956ff35e2 100644 --- a/src/meta/meta_options.cpp +++ b/src/meta/meta_options.cpp @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * the meta server's options, impl file - * - * Revision history: - * 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), first version - * xxxx-xx-xx, author, fix bug about xxx - */ #include "meta_options.h" #include diff --git a/src/meta/meta_options.h b/src/meta/meta_options.h index 880dc46640..f33d83174e 100644 --- a/src/meta/meta_options.h +++ b/src/meta/meta_options.h @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * the meta server's options - * - * Revision history: - * 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), first version - * xxxx-xx-xx, author, fix bug about xxx - */ #pragma once #include @@ -49,6 +41,7 @@ class fd_suboptions std::vector distributed_lock_service_args; }; +// The meta server's options. class meta_options { public: diff --git a/src/meta/meta_service.h b/src/meta/meta_service.h index 58f5a902a1..435d0a0ac2 100644 --- a/src/meta/meta_service.h +++ b/src/meta/meta_service.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * meta server service for EON (rDSN layer 2) - * - * Revision history: - * 2015-03-09, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include @@ -132,6 +123,7 @@ enum class meta_leader_state : int kNotLeaderAndCannotForwardRpc, // meta isn't leader, and rpc-msg can't forward to others }; +// Meta server service for EON (rDSN layer 2). class meta_service : public serverlet { public: diff --git a/src/meta/meta_service_app.h b/src/meta/meta_service_app.h index a321bfa57f..4c56062a20 100644 --- a/src/meta/meta_service_app.h +++ b/src/meta/meta_service_app.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once #include diff --git a/src/meta/meta_state_service.h b/src/meta/meta_state_service.h index e8c14fec8d..d79f1b3652 100644 --- a/src/meta/meta_state_service.h +++ b/src/meta/meta_state_service.h @@ -24,23 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * interface of the reliable meta state service - * it is usually for storing meta state of dist systems, such as membership - * - * Revision history: - * 2015-10-28, Weijie Sun, first version - * 2015-11-05, @imzhenyu (Zhenyu Guo), adjust the interface, so that - * (1) return task_ptr/tracker for callers to cancel or wait; - * (2) add factory for provider registration; - * (3) add cb_code parameter, then users can specify where the callback - * should be executed - * 2015-11-06, @imzhenyu (Zhenyu Guo), add watch/unwatch API - * 2015-12-28, @shengofsun (Weijie SUn), add transaction api - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include @@ -68,6 +51,8 @@ typedef std::function &ret_st typedef future_task> err_stringv_future; typedef dsn::ref_ptr err_stringv_future_ptr; +// The interface of the reliable meta state service. +// It is usually for storing meta state of dist systems, such as membership. class meta_state_service { public: diff --git a/src/meta/meta_state_service_simple.h b/src/meta/meta_state_service_simple.h index 697b5b159a..6a415531f6 100644 --- a/src/meta/meta_state_service_simple.h +++ b/src/meta/meta_state_service_simple.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * a simple version of meta state service for development - * - * Revision history: - * 2015-11-03, @imzhenyu (Zhenyu.Guo@microsoft.com), setup the sketch - * 2015-11-11, Tianyi WANG, first version done - */ - #include #include #include @@ -66,7 +57,8 @@ DEFINE_TASK_CODE_AIO(LPC_META_STATE_SERVICE_SIMPLE_INTERNAL, TASK_PRIORITY_HIGH, THREAD_POOL_DEFAULT); -// Only for test purpose. +// A simple version of meta state service. +// NOTE: Only for test purpose. class meta_state_service_simple : public meta_state_service { public: diff --git a/src/meta/meta_state_service_zookeeper.h b/src/meta/meta_state_service_zookeeper.h index 1187e5af9d..9c450f543e 100644 --- a/src/meta/meta_state_service_zookeeper.h +++ b/src/meta/meta_state_service_zookeeper.h @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * meta state service implemented with zookeeper - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ - #pragma once #include diff --git a/src/meta/server_load_balancer.h b/src/meta/server_load_balancer.h index 6becef0556..774b7bb86a 100644 --- a/src/meta/server_load_balancer.h +++ b/src/meta/server_load_balancer.h @@ -24,16 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * base interface of the server load balancer which defines the scheduling - * policy of how to place the partition replica to the nodes - * - * Revision history: - * 2015-12-29, @imzhenyu (Zhenyu Guo), first draft - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include @@ -95,6 +85,8 @@ class newly_partitions typedef dsn::object_extension_helper newly_partitions_ext; newly_partitions *get_newly_partitions(node_mapper &mapper, const dsn::rpc_address &addr); +// The interface of the server load balancer which defines the scheduling policy of how to +// place the partition replica to the nodes. class server_load_balancer { public: diff --git a/src/meta/server_state.cpp b/src/meta/server_state.cpp index 2b6c6d9108..4d6e127543 100644 --- a/src/meta/server_state.cpp +++ b/src/meta/server_state.cpp @@ -25,15 +25,6 @@ * THE SOFTWARE. */ -/* - * Description: - * the meta server's server_state, impl file - * - * Revision history: - * xxxx-xx-xx, author, first version - * 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), refactor - */ - // IWYU pragma: no_include #include // IWYU pragma: no_include diff --git a/src/meta/server_state.h b/src/meta/server_state.h index a3feb28f9a..ec1205d02a 100644 --- a/src/meta/server_state.h +++ b/src/meta/server_state.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * the meta server's server_state, definition file - * - * Revision history: - * xxxx-xx-xx, author, first version - * 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), refactor - */ - #pragma once // IWYU pragma: no_include diff --git a/src/meta/test/meta_state/main.cpp b/src/meta/test/meta_state/main.cpp index 08818e59fa..decf35f135 100644 --- a/src/meta/test/meta_state/main.cpp +++ b/src/meta/test/meta_state/main.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/nfs/nfs_code_definition.h b/src/nfs/nfs_code_definition.h index 6cd1c08814..a517d6c980 100644 --- a/src/nfs/nfs_code_definition.h +++ b/src/nfs/nfs_code_definition.h @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ #pragma once namespace dsn { diff --git a/src/nfs/nfs_node_simple.cpp b/src/nfs/nfs_node_simple.cpp index bb334a5085..1b51b379f7 100644 --- a/src/nfs/nfs_node_simple.cpp +++ b/src/nfs/nfs_node_simple.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include "nfs/nfs_node.h" diff --git a/src/nfs/nfs_node_simple.h b/src/nfs/nfs_node_simple.h index 15e2344168..d34c75348f 100644 --- a/src/nfs/nfs_node_simple.h +++ b/src/nfs/nfs_node_simple.h @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ #pragma once #include diff --git a/src/perf_counter/test/perf_counter_test.cpp b/src/perf_counter/test/perf_counter_test.cpp index a95dc29df0..748f29e614 100644 --- a/src/perf_counter/test/perf_counter_test.cpp +++ b/src/perf_counter/test/perf_counter_test.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for perf counter. - * - * Revision history: - * Nov., 2015, @shengofsun (Weijie Sun), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - // IWYU pragma: no_include #include #include diff --git a/src/perf_counter/test/perf_counters_test.cpp b/src/perf_counter/test/perf_counters_test.cpp index 4dfcd008ef..b830d63ba3 100644 --- a/src/perf_counter/test/perf_counters_test.cpp +++ b/src/perf_counter/test/perf_counters_test.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for perf_counters. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "perf_counter/perf_counters.h" #include diff --git a/src/replica/disk_cleaner.h b/src/replica/disk_cleaner.h index 9e2edb7523..54e37db491 100644 --- a/src/replica/disk_cleaner.h +++ b/src/replica/disk_cleaner.h @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ + #pragma once #include diff --git a/src/replica/mutation.cpp b/src/replica/mutation.cpp index cb1a74bbe0..7814bf299a 100644 --- a/src/replica/mutation.cpp +++ b/src/replica/mutation.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "mutation.h" #include diff --git a/src/replica/mutation.h b/src/replica/mutation.h index 6eec440ea8..d5b7f238ad 100644 --- a/src/replica/mutation.h +++ b/src/replica/mutation.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/replica/replica.h b/src/replica/replica.h index dece645950..68965a7d8c 100644 --- a/src/replica/replica.h +++ b/src/replica/replica.h @@ -24,24 +24,8 @@ * THE SOFTWARE. */ -/* - * Description: - * replica interface, the base object which rdsn replicates - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once -// -// a replica is a replication partition of a serivce, -// which handles all replication related issues -// and on_request the app messages to replication_app_base -// which is binded to this replication partition -// - #include #include #include @@ -169,6 +153,11 @@ struct deny_client } }; +// The replica interface, the base object which rdsn replicates. +// +// A replica is a replication partition of a serivce, which handles all replication related +// issues and on_request the app messages to replication_app_base which is binded to this +// replication partition. class replica : public serverlet, public ref_counter, public replica_base { public: diff --git a/src/replica/replica_check.cpp b/src/replica/replica_check.cpp index 1565e55d96..ee3ac90469 100644 --- a/src/replica/replica_check.cpp +++ b/src/replica/replica_check.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * replica membership state periodical checking - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include @@ -72,6 +63,9 @@ namespace dsn { namespace replication { + +// The replica membership state periodical checking part of replica. + DSN_DEFINE_bool(replication, group_check_disabled, false, "whether group check is disabled"); DSN_DEFINE_int32(replication, group_check_interval_ms, diff --git a/src/replica/replica_chkpt.cpp b/src/replica/replica_chkpt.cpp index b24f11157b..cf123af10e 100644 --- a/src/replica/replica_chkpt.cpp +++ b/src/replica/replica_chkpt.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * checkpoint the replicated app - * - * Revision history: - * Nov., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include @@ -75,6 +66,8 @@ namespace dsn { namespace replication { +// The checkpoint of the replicated app part of replica. + DSN_DEFINE_int32(replication, checkpoint_max_interval_hours, 2, diff --git a/src/replica/replica_config.cpp b/src/replica/replica_config.cpp index ed438636f2..de14a2d123 100644 --- a/src/replica/replica_config.cpp +++ b/src/replica/replica_config.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * replica configuration management - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - // IWYU pragma: no_include #include #include @@ -86,6 +77,8 @@ namespace dsn { namespace replication { +// The configuration management part of replica. + bool get_bool_envs(const std::map &envs, const std::string &name, bool &value) diff --git a/src/replica/replica_context.cpp b/src/replica/replica_context.cpp index 67833799ec..5c882d1538 100644 --- a/src/replica/replica_context.cpp +++ b/src/replica/replica_context.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * context for replica with different roles - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/replica/replica_context.h b/src/replica/replica_context.h index 4724926160..32da41d38b 100644 --- a/src/replica/replica_context.h +++ b/src/replica/replica_context.h @@ -85,6 +85,7 @@ typedef std::unordered_map<::dsn::rpc_address, remote_learner_state> learner_map } \ } +// Context of the primary replica. class primary_context { public: @@ -189,6 +190,7 @@ class primary_context std::unordered_map secondary_disk_status; }; +// Context of the secondary replica. class secondary_context { public: @@ -203,6 +205,7 @@ class secondary_context ::dsn::task_ptr catchup_with_private_log_task; }; +// Context of the potential secondary replica. class potential_secondary_context { public: @@ -251,6 +254,7 @@ class potential_secondary_context ::dsn::task_ptr completion_notify_task; }; +// Context of the partition split replica. class partition_split_context { public: diff --git a/src/replica/replica_failover.cpp b/src/replica/replica_failover.cpp index c465c221d7..90f88c0985 100644 --- a/src/replica/replica_failover.cpp +++ b/src/replica/replica_failover.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * failure handling in replica - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include @@ -52,6 +43,8 @@ namespace dsn { namespace replication { +// The failure handling part of replica. + void replica::handle_local_failure(error_code error) { LOG_INFO_PREFIX("handle local failure error {}, status = {}", error, enum_to_string(status())); diff --git a/src/replica/replica_learn.cpp b/src/replica/replica_learn.cpp index 3fc23ed73d..ed1c8050d1 100644 --- a/src/replica/replica_learn.cpp +++ b/src/replica/replica_learn.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * replication learning process - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include @@ -86,6 +77,8 @@ namespace dsn { namespace replication { +// The replication learning process part of replica. + DSN_DEFINE_int32(replication, learn_app_max_concurrent_count, 5, diff --git a/src/replica/replica_stub.cpp b/src/replica/replica_stub.cpp index dc5a30899b..e48a2e15ea 100644 --- a/src/replica/replica_stub.cpp +++ b/src/replica/replica_stub.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * replica container - replica stub - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include // IWYU pragma: no_include #include diff --git a/src/replica/replica_stub.h b/src/replica/replica_stub.h index e257028db1..03a6333aa2 100644 --- a/src/replica/replica_stub.h +++ b/src/replica/replica_stub.h @@ -26,12 +26,6 @@ #pragma once -// -// the replica_stub is the *singleton* entry to -// access all replica managed in the same process -// replica_stub(singleton) --> replica --> replication_app_base -// - #include #include #include @@ -129,6 +123,8 @@ typedef dsn::ref_ptr replica_stub_ptr; class duplication_sync_timer; class replica_backup_server; +// The replica_stub is the *singleton* entry to access all replica managed in the same process +// replica_stub(singleton) --> replica --> replication_app_base class replica_stub : public serverlet, public ref_counter { public: diff --git a/src/replica/storage/simple_kv/simple_kv.app.example.h b/src/replica/storage/simple_kv/simple_kv.app.example.h index d2a8e79560..578a623ad3 100644 --- a/src/replica/storage/simple_kv/simple_kv.app.example.h +++ b/src/replica/storage/simple_kv/simple_kv.app.example.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "simple_kv.client.h" #include "simple_kv.server.h" diff --git a/src/replica/storage/simple_kv/simple_kv.code.definition.h b/src/replica/storage/simple_kv/simple_kv.code.definition.h index ef56ab767c..b668f3a950 100644 --- a/src/replica/storage/simple_kv/simple_kv.code.definition.h +++ b/src/replica/storage/simple_kv/simple_kv.code.definition.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "common/replication.codes.h" diff --git a/src/replica/storage/simple_kv/simple_kv.main.cpp b/src/replica/storage/simple_kv/simple_kv.main.cpp index 444757916e..5b2ac4ff95 100644 --- a/src/replica/storage/simple_kv/simple_kv.main.cpp +++ b/src/replica/storage/simple_kv/simple_kv.main.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "http/http_server.h" // framework specific tools #include "meta/meta_service_app.h" diff --git a/src/replica/storage/simple_kv/simple_kv.server.h b/src/replica/storage/simple_kv/simple_kv.server.h index a3a614a4d5..84d6ab2c82 100644 --- a/src/replica/storage/simple_kv/simple_kv.server.h +++ b/src/replica/storage/simple_kv/simple_kv.server.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/replica/storage/simple_kv/simple_kv.server.impl.cpp b/src/replica/storage/simple_kv/simple_kv.server.impl.cpp index 3238366964..a0002bc54a 100644 --- a/src/replica/storage/simple_kv/simple_kv.server.impl.cpp +++ b/src/replica/storage/simple_kv/simple_kv.server.impl.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "simple_kv.server.impl.h" #include diff --git a/src/replica/storage/simple_kv/simple_kv.server.impl.h b/src/replica/storage/simple_kv/simple_kv.server.impl.h index 2cfd6bc761..240ed87899 100644 --- a/src/replica/storage/simple_kv/simple_kv.server.impl.h +++ b/src/replica/storage/simple_kv/simple_kv.server.impl.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/replica/storage/simple_kv/test/case.cpp b/src/replica/storage/simple_kv/test/case.cpp index 94962e65f7..a69e3129a6 100644 --- a/src/replica/storage/simple_kv/test/case.cpp +++ b/src/replica/storage/simple_kv/test/case.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "case.h" #include diff --git a/src/replica/storage/simple_kv/test/case.h b/src/replica/storage/simple_kv/test/case.h index 565119808b..4450b91349 100644 --- a/src/replica/storage/simple_kv/test/case.h +++ b/src/replica/storage/simple_kv/test/case.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/replica/storage/simple_kv/test/checker.cpp b/src/replica/storage/simple_kv/test/checker.cpp index cd02519c17..427126ad3c 100644 --- a/src/replica/storage/simple_kv/test/checker.cpp +++ b/src/replica/storage/simple_kv/test/checker.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include // IWYU pragma: no_include #include diff --git a/src/replica/storage/simple_kv/test/checker.h b/src/replica/storage/simple_kv/test/checker.h index 0047e5053d..0578ac1330 100644 --- a/src/replica/storage/simple_kv/test/checker.h +++ b/src/replica/storage/simple_kv/test/checker.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/replica/storage/simple_kv/test/client.cpp b/src/replica/storage/simple_kv/test/client.cpp index 905cdb080c..f93dffe1b0 100644 --- a/src/replica/storage/simple_kv/test/client.cpp +++ b/src/replica/storage/simple_kv/test/client.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "client.h" #include diff --git a/src/replica/storage/simple_kv/test/client.h b/src/replica/storage/simple_kv/test/client.h index 8864cf2c5c..66f71d5aae 100644 --- a/src/replica/storage/simple_kv/test/client.h +++ b/src/replica/storage/simple_kv/test/client.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/replica/storage/simple_kv/test/common.cpp b/src/replica/storage/simple_kv/test/common.cpp index 18d3594717..cdc3ed115c 100644 --- a/src/replica/storage/simple_kv/test/common.cpp +++ b/src/replica/storage/simple_kv/test/common.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "common.h" #include diff --git a/src/replica/storage/simple_kv/test/common.h b/src/replica/storage/simple_kv/test/common.h index 533dadc7e9..f042d2b213 100644 --- a/src/replica/storage/simple_kv/test/common.h +++ b/src/replica/storage/simple_kv/test/common.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/replica/storage/simple_kv/test/injector.cpp b/src/replica/storage/simple_kv/test/injector.cpp index 978c6ec440..0b3f856ba6 100644 --- a/src/replica/storage/simple_kv/test/injector.cpp +++ b/src/replica/storage/simple_kv/test/injector.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "injector.h" #include diff --git a/src/replica/storage/simple_kv/test/injector.h b/src/replica/storage/simple_kv/test/injector.h index 5b404b5e7d..b1fc30ff06 100644 --- a/src/replica/storage/simple_kv/test/injector.h +++ b/src/replica/storage/simple_kv/test/injector.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "runtime/tool_api.h" diff --git a/src/replica/storage/simple_kv/test/simple_kv.main.cpp b/src/replica/storage/simple_kv/test/simple_kv.main.cpp index ce4866b395..3ea189a203 100644 --- a/src/replica/storage/simple_kv/test/simple_kv.main.cpp +++ b/src/replica/storage/simple_kv/test/simple_kv.main.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Replication testing framework. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/replica/storage/simple_kv/test/simple_kv.server.impl.cpp b/src/replica/storage/simple_kv/test/simple_kv.server.impl.cpp index 31338567d7..baf66a755a 100644 --- a/src/replica/storage/simple_kv/test/simple_kv.server.impl.cpp +++ b/src/replica/storage/simple_kv/test/simple_kv.server.impl.cpp @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #include "simple_kv.server.impl.h" #include diff --git a/src/replica/storage/simple_kv/test/simple_kv.server.impl.h b/src/replica/storage/simple_kv/test/simple_kv.server.impl.h index 83e3515740..1235cdbc68 100644 --- a/src/replica/storage/simple_kv/test/simple_kv.server.impl.h +++ b/src/replica/storage/simple_kv/test/simple_kv.server.impl.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once #include diff --git a/src/reporter/pegasus_counter_reporter.h b/src/reporter/pegasus_counter_reporter.h index cc95eac7f9..4a1e97ea04 100644 --- a/src/reporter/pegasus_counter_reporter.h +++ b/src/reporter/pegasus_counter_reporter.h @@ -48,7 +48,7 @@ namespace pegasus { namespace server { // Falcon field description: -// http://git.n.xiaomi.com/falcon/doc/wikis/instance_monitor +// https://book.open-falcon.org/zh/philosophy/data-model.html struct falcon_metric { std::string endpoint; // metric host diff --git a/src/runtime/env.sim.cpp b/src/runtime/env.sim.cpp index 7c274f4498..25135e32bc 100644 --- a/src/runtime/env.sim.cpp +++ b/src/runtime/env.sim.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "env.sim.h" #include diff --git a/src/runtime/env.sim.h b/src/runtime/env.sim.h index b6f0568183..2785bb102e 100644 --- a/src/runtime/env.sim.h +++ b/src/runtime/env.sim.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "runtime/env_provider.h" diff --git a/src/runtime/fault_injector.cpp b/src/runtime/fault_injector.cpp index a06eca131f..b47f7d04fa 100644 --- a/src/runtime/fault_injector.cpp +++ b/src/runtime/fault_injector.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * inject failure through join points to mimic all network/disk/slow execution etc. failures - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "runtime/fault_injector.h" #include @@ -60,6 +51,8 @@ struct service_spec; namespace tools { +// Inject failure through join points to mimic all network/disk/slow execution etc. failures. + struct fj_opt { bool fault_injection_enabled; diff --git a/src/runtime/global_config.cpp b/src/runtime/global_config.cpp index 71e7bcc475..7b7aafc40e 100644 --- a/src/runtime/global_config.cpp +++ b/src/runtime/global_config.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * configuration of rDSN - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/runtime/global_config.h b/src/runtime/global_config.h index b7333ccbad..ca18df9192 100644 --- a/src/runtime/global_config.h +++ b/src/runtime/global_config.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * rdsn configurations - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - /// Attention: There are some types which are defined in dsn_runtime being used in this file, /// so this file is coupled with dsn_runtime. If you want to add some variables/types here or /// include this file, please make sure whether you want to couple with dsn_runtime or not. diff --git a/src/runtime/nativerun.cpp b/src/runtime/nativerun.cpp index d488b890a6..ea629dfec0 100644 --- a/src/runtime/nativerun.cpp +++ b/src/runtime/nativerun.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "runtime/nativerun.h" #include diff --git a/src/runtime/nativerun.h b/src/runtime/nativerun.h index b354ced698..2acdae6cca 100644 --- a/src/runtime/nativerun.h +++ b/src/runtime/nativerun.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * the nativerun tool which is a simple but runnable deployment runtime for zion - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "runtime/tool_api.h" @@ -42,6 +33,7 @@ struct service_spec; namespace tools { +// The nativerun tool which is a simple but runnable deployment runtime for zion. class nativerun : public tool_app { public: diff --git a/src/runtime/providers.common.cpp b/src/runtime/providers.common.cpp index b3fc676680..966ecf3e83 100644 --- a/src/runtime/providers.common.cpp +++ b/src/runtime/providers.common.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include "runtime/env_provider.h" diff --git a/src/runtime/rpc/dsn_message_parser.cpp b/src/runtime/rpc/dsn_message_parser.cpp index afb8d2000d..6c72a06519 100644 --- a/src/runtime/rpc/dsn_message_parser.cpp +++ b/src/runtime/rpc/dsn_message_parser.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * Jun. 2016, Zuoyan Qin, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "dsn_message_parser.h" #include diff --git a/src/runtime/rpc/dsn_message_parser.h b/src/runtime/rpc/dsn_message_parser.h index cb6ddf45c4..bdc16672de 100644 --- a/src/runtime/rpc/dsn_message_parser.h +++ b/src/runtime/rpc/dsn_message_parser.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* -* Description: -* message parser for browser-generated http request -* -* Revision history: -* Jun. 2016, Zuoyan Qin, first version -* xxxx-xx-xx, author, fix bug about xxx -*/ - #pragma once #include "runtime/rpc/message_parser.h" @@ -40,6 +31,7 @@ namespace dsn { class message_ex; +// Message parser for browser-generated http request. class dsn_message_parser : public message_parser { public: diff --git a/src/runtime/rpc/message_parser.cpp b/src/runtime/rpc/message_parser.cpp index 33dbac7720..e9c0da964c 100644 --- a/src/runtime/rpc/message_parser.cpp +++ b/src/runtime/rpc/message_parser.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/runtime/rpc/message_parser_manager.h b/src/runtime/rpc/message_parser_manager.h index 31d16818b1..b3fc7fa4c9 100644 --- a/src/runtime/rpc/message_parser_manager.h +++ b/src/runtime/rpc/message_parser_manager.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * message parser manager - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "runtime/rpc/message_parser.h" diff --git a/src/runtime/rpc/network.sim.cpp b/src/runtime/rpc/network.sim.cpp index d5d62a2305..a2c185dbc4 100644 --- a/src/runtime/rpc/network.sim.cpp +++ b/src/runtime/rpc/network.sim.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/runtime/rpc/raw_message_parser.cpp b/src/runtime/rpc/raw_message_parser.cpp index bf68f62323..53cde8de6c 100644 --- a/src/runtime/rpc/raw_message_parser.cpp +++ b/src/runtime/rpc/raw_message_parser.cpp @@ -24,13 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, fix bug about xxx - */ #include "raw_message_parser.h" #include diff --git a/src/runtime/rpc/raw_message_parser.h b/src/runtime/rpc/raw_message_parser.h index f1c0fb43cf..1b39a41768 100644 --- a/src/runtime/rpc/raw_message_parser.h +++ b/src/runtime/rpc/raw_message_parser.h @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* -* Description: -* message parser for user customed request -* -* Revision history: -* xxxx-xx-xx, author, fix bug about xxx -*/ - #ifndef RAW_MESSAGE_PARSER_H #define RAW_MESSAGE_PARSER_H @@ -46,6 +38,7 @@ DEFINE_CUSTOMIZED_ID(network_header_format, NET_HDR_RAW) class rpc_session; +// Message parser for user customed request. class raw_message_parser : public message_parser { private: diff --git a/src/runtime/rpc/rpc_message.h b/src/runtime/rpc/rpc_message.h index 51c8e49401..d07cb0c5b6 100644 --- a/src/runtime/rpc/rpc_message.h +++ b/src/runtime/rpc/rpc_message.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/runtime/scheduler.cpp b/src/runtime/scheduler.cpp index 458dde7163..cfb6051880 100644 --- a/src/runtime/scheduler.cpp +++ b/src/runtime/scheduler.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/runtime/scheduler.h b/src/runtime/scheduler.h index b039586dcd..422690f2a9 100644 --- a/src/runtime/scheduler.h +++ b/src/runtime/scheduler.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/runtime/serverlet.h b/src/runtime/serverlet.h index 8aeeebefa9..347d5f384a 100644 --- a/src/runtime/serverlet.h +++ b/src/runtime/serverlet.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once #include "runtime/service_app.h" diff --git a/src/runtime/service_app.h b/src/runtime/service_app.h index 31b6382b03..0e6e2cfc86 100644 --- a/src/runtime/service_app.h +++ b/src/runtime/service_app.h @@ -24,22 +24,12 @@ * THE SOFTWARE. */ -/* - * Description: - * application model atop zion in c++ - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #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" @@ -66,6 +56,7 @@ struct service_app_info std::string data_dir; }; +// The application model atop zion in C++. class service_app { public: diff --git a/src/runtime/service_engine.h b/src/runtime/service_engine.h index a4f7b599fb..1e6528f0fa 100644 --- a/src/runtime/service_engine.h +++ b/src/runtime/service_engine.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/runtime/simulator.cpp b/src/runtime/simulator.cpp index 8ebb5ee0d6..87c242c905 100644 --- a/src/runtime/simulator.cpp +++ b/src/runtime/simulator.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "runtime/simulator.h" #include diff --git a/src/runtime/task/future_types.h b/src/runtime/task/future_types.h index e1eea51f48..1a88c8d426 100644 --- a/src/runtime/task/future_types.h +++ b/src/runtime/task/future_types.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once #include diff --git a/src/runtime/task/task_engine.h b/src/runtime/task/task_engine.h index 31e9226522..cbff4e3514 100644 --- a/src/runtime/task/task_engine.h +++ b/src/runtime/task/task_engine.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/runtime/task/task_engine.sim.cpp b/src/runtime/task/task_engine.sim.cpp index 45412d1148..1424585221 100644 --- a/src/runtime/task/task_engine.sim.cpp +++ b/src/runtime/task/task_engine.sim.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include diff --git a/src/runtime/task/task_engine.sim.h b/src/runtime/task/task_engine.sim.h index fc12e16e63..85ded58eab 100644 --- a/src/runtime/task/task_engine.sim.h +++ b/src/runtime/task/task_engine.sim.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/runtime/task/task_spec.h b/src/runtime/task/task_spec.h index ea3b18ea55..9ce31bd225 100644 --- a/src/runtime/task/task_spec.h +++ b/src/runtime/task/task_spec.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * specification for the labeled tasks (task kinds) - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include @@ -147,6 +138,7 @@ class task; std::set &get_storage_rpc_req_codes(); +// Specification for the labeled tasks (task kinds). class task_spec : public extensible_object { public: diff --git a/src/runtime/task/task_worker.h b/src/runtime/task/task_worker.h index 26ce2f75af..426491508b 100644 --- a/src/runtime/task/task_worker.h +++ b/src/runtime/task/task_worker.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * task worker (thread) abstraction - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include @@ -56,6 +47,7 @@ class task_worker_pool; /*! task worker processes the input tasks from the bound task queue */ +// The task worker (a.k.a. thread) abstraction class. class task_worker : public extensible_object { public: diff --git a/src/runtime/test/async_call.cpp b/src/runtime/test/async_call.cpp index 7c96ee3776..0b55f2e788 100644 --- a/src/runtime/test/async_call.cpp +++ b/src/runtime/test/async_call.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for clientlet. - * - * Revision history: - * Nov., 2015, @shengofsun (Weijie Sun), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/runtime/test/lpc.cpp b/src/runtime/test/lpc.cpp index bcbc10281c..286cf1c487 100644 --- a/src/runtime/test/lpc.cpp +++ b/src/runtime/test/lpc.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include diff --git a/src/runtime/test/main.cpp b/src/runtime/test/main.cpp index 00ad6981f1..0e0400eb6c 100644 --- a/src/runtime/test/main.cpp +++ b/src/runtime/test/main.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/runtime/test/netprovider.cpp b/src/runtime/test/netprovider.cpp index b6ab3932be..f0b568300c 100644 --- a/src/runtime/test/netprovider.cpp +++ b/src/runtime/test/netprovider.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for net provider. - * - * Revision history: - * Nov., 2015, @shengofsun (Weijie Sun), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/runtime/test/rpc_message.cpp b/src/runtime/test/rpc_message.cpp index 22f87275b0..a596b2cd29 100644 --- a/src/runtime/test/rpc_message.cpp +++ b/src/runtime/test/rpc_message.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for rpc_message. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/runtime/test/service_api_c.cpp b/src/runtime/test/service_api_c.cpp index 77c1db85c2..263063f222 100644 --- a/src/runtime/test/service_api_c.cpp +++ b/src/runtime/test/service_api_c.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for c service api. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/runtime/test/sim_lock.cpp b/src/runtime/test/sim_lock.cpp index 772548a800..7bde41bf28 100644 --- a/src/runtime/test/sim_lock.cpp +++ b/src/runtime/test/sim_lock.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for sim lock. - * - * Revision history: - * Nov., 2015, @xiaotz (Xiaotong Zhang), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include diff --git a/src/runtime/test/task_engine.cpp b/src/runtime/test/task_engine.cpp index 9e9c033ae4..573e931ec1 100644 --- a/src/runtime/test/task_engine.cpp +++ b/src/runtime/test/task_engine.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for task engine. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "runtime/task/task_engine.h" #include diff --git a/src/runtime/test/test_utils.h b/src/runtime/test/test_utils.h index 5e8dd67fa5..29520eee97 100644 --- a/src/runtime/test/test_utils.h +++ b/src/runtime/test/test_utils.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "runtime/api_task.h" diff --git a/src/runtime/tool_api.cpp b/src/runtime/tool_api.cpp index 4a28a0db96..fa9bff1542 100644 --- a/src/runtime/tool_api.cpp +++ b/src/runtime/tool_api.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "runtime/tool_api.h" #include diff --git a/src/runtime/tool_api.h b/src/runtime/tool_api.h index 492033328f..c9e145a435 100644 --- a/src/runtime/tool_api.h +++ b/src/runtime/tool_api.h @@ -24,18 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * define the interface for implementing and plug-in the tools & - * runtime components into rDSN. - * In rDSN, both developement tools and runtime libraries - * (e.g., high performance components) are considered tools. - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - /*! @defgroup tool-api-hooks Join Points @ingroup tool-api @@ -72,6 +60,10 @@ struct service_spec; namespace tools { +// Define the interface for implementing and plug-in the tools & runtime components into rDSN. +// In rDSN, both developement tools and runtime libraries (e.g., high performance components) are +// considered tools. + /*! @addtogroup tool-api-providers @{ diff --git a/src/runtime/zlocks.cpp b/src/runtime/zlocks.cpp index 98becc645f..bf2c7f1a4c 100644 --- a/src/runtime/zlocks.cpp +++ b/src/runtime/zlocks.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/server/pegasus_scan_context.h b/src/server/pegasus_scan_context.h index 9f363924c1..7c256df0d2 100644 --- a/src/server/pegasus_scan_context.h +++ b/src/server/pegasus_scan_context.h @@ -97,7 +97,7 @@ class pegasus_context_cache // 3. we should keep context id positive, as negtive value have specical meanings. // // a more detailed description on the context id confliction is here: - // https://github.com/XiaoMi/pegasus/issues/156 + // https://github.com/apache/incubator-pegasus/issues/156 // // however, currently the implementation is not 100% correct. // diff --git a/src/server/pegasus_server_impl_init.cpp b/src/server/pegasus_server_impl_init.cpp index 855d6c6710..23c61b50d8 100644 --- a/src/server/pegasus_server_impl_init.cpp +++ b/src/server/pegasus_server_impl_init.cpp @@ -202,7 +202,7 @@ DSN_DEFINE_bool(pegasus.server, // treated as 4, a value of 19 will be treated as 16. // // Default: 0 (disabled) -// see https://github.com/XiaoMi/pegasus-rocksdb/blob/v6.6.4-compatible/include/rocksdb/table.h#L247 +// see https://github.com/facebook/rocksdb/blob/v6.6.4/include/rocksdb/table.h#L247 DSN_DEFINE_int32(pegasus.server, read_amp_bytes_per_bit, 0, diff --git a/src/server/pegasus_write_service.h b/src/server/pegasus_write_service.h index 9fb854ffda..6f6380f1cb 100644 --- a/src/server/pegasus_write_service.h +++ b/src/server/pegasus_write_service.h @@ -133,7 +133,7 @@ class pegasus_write_service : dsn::replication::replica_base ~pegasus_write_service(); // Write empty record. - // See this document (https://github.com/XiaoMi/pegasus/wiki/last_flushed_decree) + // See this document (https://pegasus.apache.org/zh/2018/03/07/last_flushed_decree.html) // to know why we must have empty write. int empty_put(int64_t decree); diff --git a/src/tools/mutation_log_tool.h b/src/tools/mutation_log_tool.h index 08480f18d1..d313bdc4a4 100644 --- a/src/tools/mutation_log_tool.h +++ b/src/tools/mutation_log_tool.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/utils/autoref_ptr.h b/src/utils/autoref_ptr.h index a3a7dfd2b2..501698f852 100644 --- a/src/utils/autoref_ptr.h +++ b/src/utils/autoref_ptr.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/utils/config_api.h b/src/utils/config_api.h index 4e0cf69fb1..62b0ec6512 100644 --- a/src/utils/config_api.h +++ b/src/utils/config_api.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once #include diff --git a/src/utils/configuration.cpp b/src/utils/configuration.cpp index c69a556d2c..d9d4c1ac64 100644 --- a/src/utils/configuration.cpp +++ b/src/utils/configuration.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/utils/coredump.h b/src/utils/coredump.h index 2e57ad45b6..f97c7eab47 100644 --- a/src/utils/coredump.h +++ b/src/utils/coredump.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/utils/distributed_lock_service.h b/src/utils/distributed_lock_service.h index 87c1fee8e9..0a8749021c 100644 --- a/src/utils/distributed_lock_service.h +++ b/src/utils/distributed_lock_service.h @@ -24,21 +24,6 @@ * THE SOFTWARE. */ -/* -* Description: -* interface of the reliable distributed lock service -* -* Revision history: -* 2015-10-28, Weijie Sun, first version -* 2015-11-5, @imzhenyu (Zhenyu Guo), remove create and destroy API as they are -* unnecessary, adjust the interface, so that -* (1) return task_ptr for callers to cancel or wait; -* (2) add factory for provider registration; -* (3) add cb_code parameter, then users can specify where the callback -* should be executed -* xxxx-xx-xx, author, fix bug about xxx -*/ - #pragma once #include "runtime/api_task.h" @@ -68,6 +53,7 @@ typedef std::function lock_future; typedef dsn::ref_ptr lock_future_ptr; +// The interface of the reliable distributed lock service. class distributed_lock_service { public: diff --git a/src/utils/enum_helper.h b/src/utils/enum_helper.h index 25d78b9094..003de4621d 100644 --- a/src/utils/enum_helper.h +++ b/src/utils/enum_helper.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/utils/error_code.cpp b/src/utils/error_code.cpp index cfeff52d12..4b26fcc57d 100644 --- a/src/utils/error_code.cpp +++ b/src/utils/error_code.cpp @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #include "utils/error_code.h" #include "utils/customizable_id.h" diff --git a/src/utils/exp_delay.h b/src/utils/exp_delay.h index d3d950ebaf..09b5389348 100644 --- a/src/utils/exp_delay.h +++ b/src/utils/exp_delay.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * delay for admission control - * - * Revision history: - * Nov., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "utils/singleton.h" @@ -44,6 +35,7 @@ namespace dsn { const double s_default_delay_points[DELAY_COUNT] = {1.0, 1.2, 1.4, 1.6, 1.8, 2.0}; const int s_default_delay[DELAY_COUNT] = {0, 0, 1, 2, 5, 10}; // millieseconds +// Delay for admission control. class exp_delay { public: diff --git a/src/utils/extensible_object.h b/src/utils/extensible_object.h index 56d25bd9cc..ffdf4241f5 100644 --- a/src/utils/extensible_object.h +++ b/src/utils/extensible_object.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * state extension for cpp objects - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "utils/utils.h" @@ -49,6 +40,7 @@ namespace dsn { typedef void (*extension_deletor)(void *); typedef void *(*extension_creator)(void *); +// State extension for cpp objects. class extensible { public: diff --git a/src/utils/factory_store.h b/src/utils/factory_store.h index 561cedca2b..72d203e0c7 100644 --- a/src/utils/factory_store.h +++ b/src/utils/factory_store.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * factory registry for object creation - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "utils/singleton_store.h" @@ -47,6 +38,7 @@ enum provider_type namespace utils { +// Factory registry for object creation. template class factory_store { diff --git a/src/utils/filesystem.cpp b/src/utils/filesystem.cpp index 9f3d773805..0ebe07ef77 100644 --- a/src/utils/filesystem.cpp +++ b/src/utils/filesystem.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * File system utility functions. - * - * Revision history: - * 2015-08-24, HX Lin(linmajia@live.com), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/utils/fixed_size_buffer_pool.h b/src/utils/fixed_size_buffer_pool.h index d2b05b42e3..ab0ed4f4d7 100644 --- a/src/utils/fixed_size_buffer_pool.h +++ b/src/utils/fixed_size_buffer_pool.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once /// diff --git a/src/utils/gpid.cpp b/src/utils/gpid.cpp index 7dd34a23c3..1d3bb3e27c 100644 --- a/src/utils/gpid.cpp +++ b/src/utils/gpid.cpp @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #include #include "common/gpid.h" diff --git a/src/utils/link.h b/src/utils/link.h index 00cdc27b72..96cd5071f8 100644 --- a/src/utils/link.h +++ b/src/utils/link.h @@ -24,19 +24,11 @@ * THE SOFTWARE. */ -/* - * Description: - * single and double linked list - * - * Revision history: - * Mar., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include +// single linked list. // // assuming public T::T* next; exists and inited to nullptr in T::T(...) // @@ -116,6 +108,7 @@ class slist T *_last; }; +// double linked list. class dlink { public: diff --git a/src/utils/lockp.std.h b/src/utils/lockp.std.h index e797e2423e..b61b6f093e 100644 --- a/src/utils/lockp.std.h +++ b/src/utils/lockp.std.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "utils/synchronize.h" diff --git a/src/utils/priority_queue.h b/src/utils/priority_queue.h index 56de0cf913..1c46d11bc1 100644 --- a/src/utils/priority_queue.h +++ b/src/utils/priority_queue.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/utils/shared_io_service.h b/src/utils/shared_io_service.h index b22bffc7fd..b4bad95790 100644 --- a/src/utils/shared_io_service.h +++ b/src/utils/shared_io_service.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include diff --git a/src/utils/singleton_store.h b/src/utils/singleton_store.h index bd680b5d6d..1db4bb008c 100644 --- a/src/utils/singleton_store.h +++ b/src/utils/singleton_store.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "utils/singleton.h" diff --git a/src/utils/synchronize.h b/src/utils/synchronize.h index 80a51a6f67..8f1a66cd20 100644 --- a/src/utils/synchronize.h +++ b/src/utils/synchronize.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once #include "utils/ports.h" diff --git a/src/utils/test/env.cpp b/src/utils/test/env.cpp index ab3763c274..7aff1f8ab2 100644 --- a/src/utils/test/env.cpp +++ b/src/utils/test/env.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for rpc_address. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/utils/test/logging.cpp b/src/utils/test/logging.cpp index eb3170d2a9..9ac1d3235f 100644 --- a/src/utils/test/logging.cpp +++ b/src/utils/test/logging.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for logging. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/utils/test/priority_queue.cpp b/src/utils/test/priority_queue.cpp index ebe985e928..239d7e0604 100644 --- a/src/utils/test/priority_queue.cpp +++ b/src/utils/test/priority_queue.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for priority_queue. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "utils/priority_queue.h" #include diff --git a/src/utils/test/sema.cpp b/src/utils/test/sema.cpp index 2da4df61d1..e16318d8b8 100644 --- a/src/utils/test/sema.cpp +++ b/src/utils/test/sema.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * Unit-test for semaphore. - * - * Revision history: - * Nov., 2015, @qinzuoyan (Zuoyan Qin), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "utils/hpc_locks/sema.h" #include diff --git a/src/utils/test/utils.cpp b/src/utils/test/utils.cpp index 5ca3010470..e9fc83f812 100644 --- a/src/utils/test/utils.cpp +++ b/src/utils/test/utils.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include #include #include diff --git a/src/utils/thread_access_checker.h b/src/utils/thread_access_checker.h index f5414ca494..623dfc0f85 100644 --- a/src/utils/thread_access_checker.h +++ b/src/utils/thread_access_checker.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once namespace dsn { diff --git a/src/utils/threadpool_spec.h b/src/utils/threadpool_spec.h index f9bd082a1e..90df20a9d5 100644 --- a/src/utils/threadpool_spec.h +++ b/src/utils/threadpool_spec.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once #include diff --git a/src/utils/time_utils.h b/src/utils/time_utils.h index 5a0a2eb68d..0e4d50f700 100644 --- a/src/utils/time_utils.h +++ b/src/utils/time_utils.h @@ -23,6 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #pragma once // IWYU pragma: no_include diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index 65520af921..c3ebb8c9f4 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * What is this file about? - * - * Revision history: - * xxxx-xx-xx, author, first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #include "utils/utils.h" #include diff --git a/src/utils/work_queue.h b/src/utils/work_queue.h index 62ecdba256..72f2a61575 100644 --- a/src/utils/work_queue.h +++ b/src/utils/work_queue.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * the work queue abstraction - * - * Revision history: - * Oct., 2015, @imzhenyu (Zhenyu Guo), first version - * xxxx-xx-xx, author, fix bug about xxx - */ - #pragma once #include "utils/synchronize.h" @@ -41,6 +32,7 @@ namespace dsn { +// The work queue abstraction class. template class work_queue { diff --git a/src/zookeeper/distributed_lock_service_zookeeper.cpp b/src/zookeeper/distributed_lock_service_zookeeper.cpp index 6ea7e9b23e..6d57ef4bd0 100644 --- a/src/zookeeper/distributed_lock_service_zookeeper.cpp +++ b/src/zookeeper/distributed_lock_service_zookeeper.cpp @@ -34,13 +34,6 @@ #include "lock_struct.h" #include "lock_types.h" #include "runtime/service_app.h" -/* - * Description: - * distributed lock service implemented with zookeeper - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ #include "runtime/task/async_calls.h" #include "utils/flags.h" #include "utils/fmt_logging.h" diff --git a/src/zookeeper/distributed_lock_service_zookeeper.h b/src/zookeeper/distributed_lock_service_zookeeper.h index facddd1899..206e73459a 100644 --- a/src/zookeeper/distributed_lock_service_zookeeper.h +++ b/src/zookeeper/distributed_lock_service_zookeeper.h @@ -24,13 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * distributed lock service implemented with zookeeper - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ #pragma once #include diff --git a/src/zookeeper/lock_struct.cpp b/src/zookeeper/lock_struct.cpp index 5144166432..56b0fd33be 100644 --- a/src/zookeeper/lock_struct.cpp +++ b/src/zookeeper/lock_struct.cpp @@ -26,14 +26,6 @@ #include #include -/* - * Description: - * distributed lock service implemented with zookeeper, the implementation - * of lock_structure - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ #include #include #include diff --git a/src/zookeeper/lock_struct.h b/src/zookeeper/lock_struct.h index eca2696ad5..fa10f94398 100644 --- a/src/zookeeper/lock_struct.h +++ b/src/zookeeper/lock_struct.h @@ -24,13 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * distributed lock service implemented with zookeeper, the definition of each lock structure - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ #pragma once #include diff --git a/src/zookeeper/lock_types.h b/src/zookeeper/lock_types.h index 01035e422f..d368fc514d 100644 --- a/src/zookeeper/lock_types.h +++ b/src/zookeeper/lock_types.h @@ -24,13 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * distributed lock service implemented with zookeeper, some types definition - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ #pragma once #include "utils/autoref_ptr.h" diff --git a/src/zookeeper/zookeeper_error.cpp b/src/zookeeper/zookeeper_error.cpp index 03a53a1add..3504990a59 100644 --- a/src/zookeeper/zookeeper_error.cpp +++ b/src/zookeeper/zookeeper_error.cpp @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * transform zookeeper error code to dsn error code, implementation - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ - #include #include "utils/error_code.h" diff --git a/src/zookeeper/zookeeper_error.h b/src/zookeeper/zookeeper_error.h index fa51ff87fe..a78f41be2d 100644 --- a/src/zookeeper/zookeeper_error.h +++ b/src/zookeeper/zookeeper_error.h @@ -24,13 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * transform zookeeper error code to dsn error code, header - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ #pragma once #include "utils/error_code.h" diff --git a/src/zookeeper/zookeeper_session.cpp b/src/zookeeper/zookeeper_session.cpp index bfa7bed7a9..9a467b64c7 100644 --- a/src/zookeeper/zookeeper_session.cpp +++ b/src/zookeeper/zookeeper_session.cpp @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * a C++ wrapper of zookeeper c async api, implementation - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ - #include #include #include diff --git a/src/zookeeper/zookeeper_session.h b/src/zookeeper/zookeeper_session.h index 41323fccf7..b359f867b9 100644 --- a/src/zookeeper/zookeeper_session.h +++ b/src/zookeeper/zookeeper_session.h @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * a C++ wrapper of zookeeper c async api, header - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ - #include #include #include @@ -52,6 +44,7 @@ struct String_vector; namespace dsn { namespace dist { +// A C++ wrapper of zookeeper c async APIs. class zookeeper_session { public: diff --git a/src/zookeeper/zookeeper_session_mgr.cpp b/src/zookeeper/zookeeper_session_mgr.cpp index 60ddb43d76..8f4750df88 100644 --- a/src/zookeeper/zookeeper_session_mgr.cpp +++ b/src/zookeeper/zookeeper_session_mgr.cpp @@ -24,14 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * a singleton to manager all zookeeper sessions, so that each zookeeper session - * can be shared by all threads in one service-node. The implementation file. - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ #include "zookeeper_session_mgr.h" #include diff --git a/src/zookeeper/zookeeper_session_mgr.h b/src/zookeeper/zookeeper_session_mgr.h index eaa0843f1f..ada6bc4f7b 100644 --- a/src/zookeeper/zookeeper_session_mgr.h +++ b/src/zookeeper/zookeeper_session_mgr.h @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -/* - * Description: - * a singleton to manager all zookeeper sessions, so that each zookeeper session - * can be shared by all threads in one service-node. The Header file. - * - * Revision history: - * 2015-12-04, @shengofsun (sunweijie@xiaomi.com) - */ - #include "utils/singleton.h" #pragma once @@ -44,6 +35,8 @@ namespace dist { class zookeeper_session; +// A singleton to manage all zookeeper sessions, so that each zookeeper session +// can be shared by all threads in one service-node. class zookeeper_session_mgr : public utils::singleton { public: