From d9a348eecb716525224bc3c45464342710751e99 Mon Sep 17 00:00:00 2001 From: kfysck Date: Thu, 4 Sep 2025 02:47:32 +0000 Subject: [PATCH 01/10] feat: update first comment line copyright. --- src/agent-watchdog/agent_entry.cc | 2 +- src/agent-watchdog/agent_entry.h | 2 +- src/agent-watchdog/base.cc | 2 +- src/agent-watchdog/base.h | 2 +- src/agent-watchdog/cold_wipe_entry.cc | 2 +- src/agent-watchdog/cold_wipe_entry.h | 2 +- src/agent-watchdog/core_entry.cc | 2 +- src/agent-watchdog/core_entry.h | 2 +- src/agent-watchdog/daemons.cc | 2 +- src/agent-watchdog/daemons.h | 2 +- src/agent-watchdog/log.cc | 2 +- src/agent-watchdog/log.h | 2 +- src/agent-watchdog/proc_title.c | 2 +- src/agent-watchdog/proc_title.h | 2 +- src/agent-watchdog/sharding_entry.cc | 2 +- src/agent-watchdog/sharding_entry.h | 2 +- src/agent-watchdog/unit.cc | 2 +- src/agent-watchdog/unit.h | 2 +- src/agent/common/da_array.c | 2 +- src/agent/common/da_array.h | 2 +- src/agent/common/da_atomic.h | 2 +- src/agent/common/da_atomic_asm.h | 2 +- src/agent/common/da_atomic_asm8.h | 2 +- src/agent/common/da_atomic_gcc.h | 2 +- src/agent/common/da_atomic_gcc8.h | 2 +- src/agent/common/da_queue.h | 2 +- src/agent/common/da_rbtree.c | 2 +- src/agent/common/da_rbtree.h | 2 +- src/agent/common/da_string.c | 2 +- src/agent/common/da_string.h | 2 +- src/agent/compiler.h | 2 +- src/agent/da.c | 2 +- src/agent/da_buf.c | 2 +- src/agent/da_buf.h | 2 +- src/agent/da_client.c | 2 +- src/agent/da_client.h | 2 +- src/agent/da_conf.c | 2 +- src/agent/da_conf.h | 2 +- src/agent/da_conn.c | 2 +- src/agent/da_conn.h | 2 +- src/agent/da_core.c | 2 +- src/agent/da_core.h | 2 +- src/agent/da_errno.h | 2 +- src/agent/da_listener.c | 2 +- src/agent/da_listener.h | 2 +- src/agent/da_log.c | 2 +- src/agent/da_log.h | 2 +- src/agent/da_mem_pool.c | 2 +- src/agent/da_mem_pool.h | 2 +- src/agent/da_msg.c | 2 +- src/agent/da_msg.h | 2 +- src/agent/da_request.c | 2 +- src/agent/da_request.h | 2 +- src/agent/da_response.c | 2 +- src/agent/da_response.h | 2 +- src/agent/da_server.c | 2 +- src/agent/da_server.h | 2 +- src/agent/da_signal.c | 2 +- src/agent/da_signal.h | 2 +- src/agent/da_stats.c | 2 +- src/agent/da_stats.h | 2 +- src/agent/da_time.c | 2 +- src/agent/da_time.h | 2 +- src/agent/da_top_percentile.c | 2 +- src/agent/da_top_percentile.h | 2 +- src/agent/da_util.c | 2 +- src/agent/da_util.h | 2 +- src/agent/event/da_epoll.c | 2 +- src/agent/event/da_event.h | 2 +- src/agent/hashkit/da_chash.c | 2 +- src/agent/hashkit/da_crc16.c | 2 +- src/agent/hashkit/da_crc32.c | 2 +- src/agent/hashkit/da_fnv.c | 2 +- src/agent/hashkit/da_hsieh.c | 2 +- src/agent/hashkit/da_jenkins.c | 2 +- src/agent/hashkit/da_ketama.c | 2 +- src/agent/hashkit/da_md5.c | 2 +- src/agent/hashkit/da_murmur.c | 2 +- src/agent/hashkit/da_one_at_a_time.c | 2 +- src/agent/my/my_comm.c | 2 +- src/agent/my/my_comm.h | 2 +- src/agent/my/my_net_send.c | 2 +- src/agent/my/my_net_send.h | 2 +- src/agent/my/my_net_write.c | 2 +- src/agent/my/my_net_write.h | 2 +- src/agent/my/my_parse.c | 2 +- src/agent/my/my_parse.h | 2 +- src/agent/proto/da_dtcparse.c | 2 +- src/agent/proto/da_protocal.h | 2 +- src/configcenter/ca_api/app_client_set.c | 2 +- src/configcenter/ca_api/app_client_set.h | 2 +- src/configcenter/ca_api/app_shm_manager.c | 2 +- src/configcenter/ca_api/app_shm_manager.h | 2 +- src/configcenter/ca_api/ca_dump_shm.c | 2 +- src/configcenter/ca_api/ca_quick_find.c | 2 +- src/configcenter/ca_api/ca_quick_find.h | 2 +- src/configcenter/ca_api/config_center_client.h | 2 +- src/connector/connector.cc | 2 +- src/connector/database_connection.cc | 2 +- src/connector/database_connection.h | 2 +- src/connector/mysql_operation.cc | 2 +- src/connector/mysql_operation.h | 2 +- src/core/algorithm/hash.cc | 2 +- src/core/algorithm/hash.h | 2 +- src/core/algorithm/lru_bit.cc | 2 +- src/core/algorithm/lru_bit.h | 2 +- src/core/buffer/buffer_def.h | 2 +- src/core/buffer/buffer_flush.cc | 2 +- src/core/buffer/buffer_flush.h | 2 +- src/core/buffer/buffer_pond.cc | 2 +- src/core/buffer/buffer_pond.h | 2 +- src/core/buffer/buffer_remoteLog.h | 2 +- src/core/chain/barrier_ask_answer_chain.cc | 2 +- src/core/chain/barrier_ask_answer_chain.h | 2 +- src/core/chain/black_hole_ask_chain.cc | 2 +- src/core/chain/black_hole_ask_chain.h | 2 +- src/core/chain/buffer_bypass_answer_chain.cc | 2 +- src/core/chain/buffer_bypass_answer_chain.h | 2 +- src/core/chain/buffer_bypass_ask_chain.cc | 2 +- src/core/chain/buffer_bypass_ask_chain.h | 2 +- src/core/chain/buffer_process_answer_chain.cc | 2 +- src/core/chain/buffer_process_answer_chain.h | 2 +- src/core/chain/buffer_process_ask_chain.cc | 2 +- src/core/chain/buffer_process_ask_chain.h | 2 +- src/core/chain/job_procedure.cc | 2 +- src/core/chain/system_command_ask_chain.cc | 2 +- src/core/chain/system_command_ask_chain.h | 2 +- src/core/data/col_expand.cc | 2 +- src/core/data/col_expand.h | 2 +- src/core/data/container_dtcd.cc | 2 +- src/core/data/data_chunk.h | 2 +- src/core/data/data_process.h | 2 +- src/core/data/defragment.h | 2 +- src/core/global.h | 2 +- src/core/hotbk/hb_feature.cc | 2 +- src/core/hotbk/hb_feature.h | 2 +- src/core/hotbk/hb_log.cc | 2 +- src/core/hotbk/hb_log.h | 2 +- src/core/hotbk/hot_backup_ask_chain.cc | 2 +- src/core/hotbk/hot_backup_ask_chain.h | 2 +- src/core/log/logger.cc | 2 +- src/core/log/logger.h | 2 +- src/core/main.cc | 2 +- src/core/mem/feature.cc | 2 +- src/core/mem/feature.h | 2 +- src/core/mem/fence_queue.h | 2 +- src/core/mem/mallocator.h | 2 +- src/core/mem/pt_malloc.cc | 2 +- src/core/mem/pt_malloc.h | 2 +- src/core/mem/sys_malloc.cc | 2 +- src/core/mem/sys_malloc.h | 2 +- src/core/misc/dtc_code.h | 2 +- src/core/misc/main_supply.cc | 2 +- src/core/misc/main_supply.h | 2 +- src/core/misc/mysql_error.h | 2 +- src/core/misc/purge_processor.h | 2 +- src/core/misc/reader_interface.h | 2 +- src/core/node/empty_filter.cc | 2 +- src/core/node/empty_filter.h | 2 +- src/core/node/node.h | 2 +- src/core/node/node_index.cc | 2 +- src/core/node/node_index.h | 2 +- src/core/node/node_list.h | 2 +- src/core/node/node_set.cc | 2 +- src/core/node/node_set.h | 2 +- src/core/nodegroup/ng_info.cc | 2 +- src/core/nodegroup/ng_info.h | 2 +- src/core/nodegroup/ng_list.h | 2 +- src/core/raw/raw_data.cc | 2 +- src/core/raw/raw_data.h | 2 +- src/core/raw/raw_data_process.cc | 2 +- src/core/raw/raw_data_process.h | 2 +- src/core/task/task_pendlist.cc | 2 +- src/core/task/task_pendlist.h | 2 +- src/core/time/expire_time.cc | 2 +- src/core/time/expire_time.h | 2 +- src/core/tree/t_tree.cc | 2 +- src/core/tree/t_tree.h | 2 +- src/core/tree/tree_data.cc | 2 +- src/core/tree/tree_data.h | 2 +- src/core/tree/tree_data_keycmp.h | 2 +- src/core/tree/tree_data_process.cc | 2 +- src/core/tree/tree_data_process.h | 2 +- src/daemons/base.cc | 2 +- src/daemons/base.h | 2 +- src/daemons/daemon_listener.cc | 2 +- src/daemons/daemon_listener.h | 2 +- src/daemons/daemons.cc | 2 +- src/daemons/daemons.h | 2 +- src/daemons/fault.cc | 2 +- src/daemons/fault.h | 2 +- src/daemons/fork.cc | 2 +- src/daemons/gdb.cc | 2 +- src/daemons/gdb.h | 2 +- src/daemons/gdb_srv.cc | 2 +- src/daemons/helper.cc | 2 +- src/daemons/helper.h | 2 +- src/daemons/logger.cc | 2 +- src/daemons/logger.h | 2 +- src/daemons/main_entry.cc | 2 +- src/daemons/main_entry.h | 2 +- src/daemons/run.cc | 2 +- src/daemons/stattool.cc | 2 +- src/daemons/stattool.h | 2 +- src/daemons/unit.cc | 2 +- src/daemons/unit.h | 2 +- src/data_lifecycle/log.cc | 2 +- src/data_lifecycle/log.h | 2 +- src/hwcserver/log.cc | 2 +- src/hwcserver/log.h | 2 +- src/libs/common/Condition.h | 2 +- src/libs/common/agent/agent_client.cc | 2 +- src/libs/common/agent/agent_client.h | 2 +- src/libs/common/agent/agent_listen_pool.cc | 2 +- src/libs/common/agent/agent_listen_pool.h | 2 +- src/libs/common/agent/agent_listener.cc | 2 +- src/libs/common/agent/agent_listener.h | 2 +- src/libs/common/agent/agent_multi_request.cc | 2 +- src/libs/common/agent/agent_multi_request.h | 2 +- src/libs/common/agent/agent_receiver.cc | 2 +- src/libs/common/agent/agent_receiver.h | 2 +- src/libs/common/agent/agent_sender.cc | 2 +- src/libs/common/agent/agent_sender.h | 2 +- src/libs/common/agent/agent_unit.cc | 2 +- src/libs/common/agent/agent_unit.h | 2 +- src/libs/common/algorithm/bitsop.cc | 2 +- src/libs/common/algorithm/bitsop.h | 2 +- src/libs/common/algorithm/chash.cc | 2 +- src/libs/common/algorithm/chash.h | 2 +- src/libs/common/algorithm/compress.cc | 2 +- src/libs/common/algorithm/compress.h | 2 +- src/libs/common/algorithm/markup_stl.cc | 2 +- src/libs/common/algorithm/markup_stl.h | 2 +- src/libs/common/algorithm/md5.cc | 2 +- src/libs/common/algorithm/md5.h | 2 +- src/libs/common/algorithm/new_hash.cc | 2 +- src/libs/common/algorithm/new_hash.h | 2 +- src/libs/common/algorithm/non_copyable.h | 2 +- src/libs/common/algorithm/relative_hour_calculator.h | 2 +- src/libs/common/algorithm/singleton.h | 2 +- src/libs/common/algorithm/timestamp.h | 2 +- src/libs/common/atomic/atomic.h | 2 +- src/libs/common/atomic/atomic.hpp | 2 +- src/libs/common/atomic/atomic_asm.h | 2 +- src/libs/common/atomic/atomic_asm8.h | 2 +- src/libs/common/atomic/atomic_gcc.h | 2 +- src/libs/common/atomic/atomic_gcc8.h | 2 +- src/libs/common/blacklist/blacklist.cc | 2 +- src/libs/common/blacklist/blacklist.h | 2 +- src/libs/common/blacklist/blacklist_unit.cc | 2 +- src/libs/common/blacklist/blacklist_unit.h | 2 +- src/libs/common/buffer.cc | 2 +- src/libs/common/buffer.h | 2 +- src/libs/common/client/client_async.cc | 2 +- src/libs/common/client/client_async.h | 2 +- src/libs/common/client/client_dgram.cc | 2 +- src/libs/common/client/client_dgram.h | 2 +- src/libs/common/client/client_resource_pool.cc | 2 +- src/libs/common/client/client_resource_pool.h | 2 +- src/libs/common/client/client_sync.cc | 2 +- src/libs/common/client/client_sync.h | 2 +- src/libs/common/client/client_unit.cc | 2 +- src/libs/common/client/client_unit.h | 2 +- src/libs/common/compiler.h | 2 +- src/libs/common/config/auto_config.cc | 2 +- src/libs/common/config/auto_config.h | 2 +- src/libs/common/config/config.cc | 2 +- src/libs/common/config/config.h | 2 +- src/libs/common/config/dbconfig.cc | 2 +- src/libs/common/config/dbconfig.h | 2 +- src/libs/common/config/dbconfig_tdef.cc | 2 +- src/libs/common/config/parse_cluster_config.cc | 2 +- src/libs/common/config/parse_cluster_config.h | 2 +- src/libs/common/connector/connector_client.cc | 2 +- src/libs/common/connector/connector_client.h | 2 +- src/libs/common/connector/connector_group.cc | 2 +- src/libs/common/connector/connector_group.h | 2 +- src/libs/common/consistent_hash_selector.cc | 2 +- src/libs/common/consistent_hash_selector.h | 2 +- src/libs/common/container.h | 2 +- src/libs/common/daemon/daemon.cc | 2 +- src/libs/common/daemon/daemon.h | 2 +- src/libs/common/daemon/daemon_wait.cc | 2 +- src/libs/common/data_connector_ask_chain.cc | 2 +- src/libs/common/data_connector_ask_chain.h | 2 +- src/libs/common/decode/decode.cc | 2 +- src/libs/common/decode/decode.h | 2 +- src/libs/common/decode/decoder_base.cc | 2 +- src/libs/common/decode/decoder_base.h | 2 +- src/libs/common/dtc_error_code.h | 2 +- src/libs/common/dtc_global.cc | 2 +- src/libs/common/dtc_global.h | 2 +- src/libs/common/dtcutils.h | 2 +- src/libs/common/encode.cc | 2 +- src/libs/common/field/field.cc | 2 +- src/libs/common/field/field.h | 2 +- src/libs/common/field/field_api.cc | 2 +- src/libs/common/field/field_api.h | 2 +- src/libs/common/field/field_export.h | 2 +- src/libs/common/file_backed_key_set.cc | 2 +- src/libs/common/file_backed_key_set.h | 2 +- src/libs/common/hotback_task.cc | 2 +- src/libs/common/hotback_task.h | 2 +- src/libs/common/interface.h | 2 +- src/libs/common/job_entrance_ask_chain.cc | 2 +- src/libs/common/job_entrance_ask_chain.h | 2 +- src/libs/common/journal_id.h | 2 +- src/libs/common/key/key_helper.cc | 2 +- src/libs/common/key/key_helper.h | 2 +- src/libs/common/key/key_route_ask_chain.cc | 2 +- src/libs/common/key/key_route_ask_chain.h | 2 +- src/libs/common/key/keycodec.h | 2 +- src/libs/common/list/hlist.h | 2 +- src/libs/common/list/list.h | 2 +- src/libs/common/listener/listener.cc | 2 +- src/libs/common/listener/listener.h | 2 +- src/libs/common/listener/listener_bind.cc | 2 +- src/libs/common/listener/listener_pool.cc | 2 +- src/libs/common/listener/listener_pool.h | 2 +- src/libs/common/localip.c | 2 +- src/libs/common/lock/lock.h | 2 +- src/libs/common/lock/lock_free_queue.h | 2 +- src/libs/common/lock/lock_free_queue_imp.h | 2 +- src/libs/common/lock/system_lock.cc | 2 +- src/libs/common/lock/system_lock.h | 2 +- src/libs/common/log/log.cc | 2 +- src/libs/common/log/log.h | 2 +- src/libs/common/mem_check.cc | 2 +- src/libs/common/mem_check.h | 2 +- src/libs/common/multi_request.cc | 2 +- src/libs/common/multi_request.h | 2 +- src/libs/common/my/my_comm.h | 2 +- src/libs/common/my/my_request.h | 2 +- src/libs/common/namespace.h | 2 +- src/libs/common/packet/packet.h | 2 +- src/libs/common/packet/packet_base.cc | 2 +- src/libs/common/packet/packet_client.cc | 2 +- src/libs/common/packet/packet_result.cc | 2 +- src/libs/common/packet/packet_server.cc | 2 +- src/libs/common/pipequeue.h | 2 +- src/libs/common/pipetask.h | 2 +- src/libs/common/plugin/plugin_agent_mgr.h | 2 +- src/libs/common/plugin/plugin_decoder.cc | 2 +- src/libs/common/plugin/plugin_decoder.h | 2 +- src/libs/common/plugin/plugin_dgram.cc | 2 +- src/libs/common/plugin/plugin_dgram.h | 2 +- src/libs/common/plugin/plugin_global.cc | 2 +- src/libs/common/plugin/plugin_global.h | 2 +- src/libs/common/plugin/plugin_listener_pool.cc | 2 +- src/libs/common/plugin/plugin_listener_pool.h | 2 +- src/libs/common/plugin/plugin_mgr.cc | 2 +- src/libs/common/plugin/plugin_mgr.h | 2 +- src/libs/common/plugin/plugin_proxy_listener_pool.cc | 2 +- src/libs/common/plugin/plugin_proxy_listener_pool.h | 2 +- src/libs/common/plugin/plugin_proxy_mgr.cc | 2 +- src/libs/common/plugin/plugin_request.cc | 2 +- src/libs/common/plugin/plugin_request.h | 2 +- src/libs/common/plugin/plugin_sync.cc | 2 +- src/libs/common/plugin/plugin_sync.h | 2 +- src/libs/common/plugin/plugin_timer.cc | 2 +- src/libs/common/plugin/plugin_timer.h | 2 +- src/libs/common/plugin/plugin_unit.cc | 2 +- src/libs/common/plugin/plugin_unit.h | 2 +- src/libs/common/plugin/plugin_worker.cc | 2 +- src/libs/common/plugin/plugin_worker.h | 2 +- src/libs/common/poll/myepoll.h | 2 +- src/libs/common/poll/poll_thread_group.cc | 2 +- src/libs/common/poll/poll_thread_group.h | 2 +- src/libs/common/poll/poller.cc | 2 +- src/libs/common/poll/poller.h | 2 +- src/libs/common/poll/poller_base.cc | 2 +- src/libs/common/poll/poller_base.h | 2 +- src/libs/common/proc_title.c | 2 +- src/libs/common/proc_title.h | 2 +- src/libs/common/protocol.h | 2 +- src/libs/common/queue/lqueue.h | 2 +- src/libs/common/queue/mtpqueue.h | 2 +- src/libs/common/queue/mtpqueue_nolock.h | 2 +- src/libs/common/queue/wait_queue.h | 2 +- src/libs/common/receiver.h | 2 +- src/libs/common/remote_dtc_ask_answer_chain.cc | 2 +- src/libs/common/remote_dtc_ask_answer_chain.h | 2 +- src/libs/common/request/request_base.h | 2 +- src/libs/common/request/request_base_all.h | 2 +- src/libs/common/request/request_threading.h | 2 +- src/libs/common/result.h | 2 +- src/libs/common/section.cc | 2 +- src/libs/common/section.h | 2 +- src/libs/common/shmem.cc | 2 +- src/libs/common/shmem.h | 2 +- src/libs/common/socket/socket_addr.cc | 2 +- src/libs/common/socket/socket_addr.h | 2 +- src/libs/common/socket/socket_bind.cc | 2 +- src/libs/common/socket/unix_socket.h | 2 +- src/libs/common/stop_watch.h | 2 +- src/libs/common/table/hotbackup_table_def.cc | 2 +- src/libs/common/table/hotbackup_table_def.h | 2 +- src/libs/common/table/table_def.cc | 2 +- src/libs/common/table/table_def.h | 2 +- src/libs/common/table/table_def_manager.cc | 2 +- src/libs/common/table/table_def_manager.h | 2 +- src/libs/common/task/task_api.cc | 2 +- src/libs/common/task/task_base.cc | 2 +- src/libs/common/task/task_base.h | 2 +- src/libs/common/task/task_const.cc | 2 +- src/libs/common/task/task_copy.cc | 2 +- src/libs/common/task/task_multi_unit.cc | 2 +- src/libs/common/task/task_multi_unit.h | 2 +- src/libs/common/task/task_pkey.cc | 2 +- src/libs/common/task/task_pkey.h | 2 +- src/libs/common/task/task_request.cc | 2 +- src/libs/common/task/task_request.h | 2 +- src/libs/common/task/task_server.cc | 2 +- src/libs/common/thread/thread.cc | 2 +- src/libs/common/thread/thread.h | 2 +- src/libs/common/thread/thread_cpu_stat.cc | 2 +- src/libs/common/thread/thread_cpu_stat.h | 2 +- src/libs/common/timer/timer_list.cc | 2 +- src/libs/common/timer/timer_list.h | 2 +- src/libs/common/value.c | 2 +- src/libs/common/value.h | 2 +- src/libs/common/version.cc | 2 +- src/libs/common/version.h | 2 +- src/libs/rocksdb/include/rocksdb/advanced_options.h | 2 +- src/libs/rocksdb/include/rocksdb/c.h | 2 +- src/libs/rocksdb/include/rocksdb/cache.h | 2 +- src/libs/rocksdb/include/rocksdb/cleanable.h | 2 +- src/libs/rocksdb/include/rocksdb/compaction_filter.h | 2 +- src/libs/rocksdb/include/rocksdb/compaction_job_stats.h | 2 +- src/libs/rocksdb/include/rocksdb/comparator.h | 2 +- src/libs/rocksdb/include/rocksdb/concurrent_task_limiter.h | 2 +- src/libs/rocksdb/include/rocksdb/convenience.h | 2 +- src/libs/rocksdb/include/rocksdb/db.h | 2 +- src/libs/rocksdb/include/rocksdb/db_bench_tool.h | 2 +- src/libs/rocksdb/include/rocksdb/db_dump_tool.h | 2 +- src/libs/rocksdb/include/rocksdb/db_stress_tool.h | 2 +- src/libs/rocksdb/include/rocksdb/env.h | 2 +- src/libs/rocksdb/include/rocksdb/env_encryption.h | 2 +- src/libs/rocksdb/include/rocksdb/experimental.h | 2 +- src/libs/rocksdb/include/rocksdb/filter_policy.h | 2 +- src/libs/rocksdb/include/rocksdb/flush_block_policy.h | 2 +- src/libs/rocksdb/include/rocksdb/iostats_context.h | 2 +- src/libs/rocksdb/include/rocksdb/iterator.h | 2 +- src/libs/rocksdb/include/rocksdb/ldb_tool.h | 2 +- src/libs/rocksdb/include/rocksdb/listener.h | 2 +- src/libs/rocksdb/include/rocksdb/memory_allocator.h | 2 +- src/libs/rocksdb/include/rocksdb/memtablerep.h | 2 +- src/libs/rocksdb/include/rocksdb/merge_operator.h | 2 +- src/libs/rocksdb/include/rocksdb/metadata.h | 2 +- src/libs/rocksdb/include/rocksdb/options.h | 2 +- src/libs/rocksdb/include/rocksdb/perf_context.h | 2 +- src/libs/rocksdb/include/rocksdb/perf_level.h | 2 +- src/libs/rocksdb/include/rocksdb/persistent_cache.h | 2 +- src/libs/rocksdb/include/rocksdb/rate_limiter.h | 2 +- src/libs/rocksdb/include/rocksdb/slice.h | 2 +- src/libs/rocksdb/include/rocksdb/slice_transform.h | 2 +- src/libs/rocksdb/include/rocksdb/snapshot.h | 2 +- src/libs/rocksdb/include/rocksdb/sst_dump_tool.h | 2 +- src/libs/rocksdb/include/rocksdb/sst_file_manager.h | 2 +- src/libs/rocksdb/include/rocksdb/sst_file_reader.h | 2 +- src/libs/rocksdb/include/rocksdb/sst_file_writer.h | 2 +- src/libs/rocksdb/include/rocksdb/statistics.h | 2 +- src/libs/rocksdb/include/rocksdb/stats_history.h | 2 +- src/libs/rocksdb/include/rocksdb/status.h | 2 +- src/libs/rocksdb/include/rocksdb/table.h | 2 +- src/libs/rocksdb/include/rocksdb/table_properties.h | 2 +- src/libs/rocksdb/include/rocksdb/thread_status.h | 2 +- src/libs/rocksdb/include/rocksdb/threadpool.h | 2 +- src/libs/rocksdb/include/rocksdb/trace_reader_writer.h | 2 +- src/libs/rocksdb/include/rocksdb/transaction_log.h | 2 +- src/libs/rocksdb/include/rocksdb/types.h | 2 +- src/libs/rocksdb/include/rocksdb/universal_compaction.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/backupable_db.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/checkpoint.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/convenience.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/db_ttl.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/debug.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/env_librados.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/env_mirror.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/info_log_finder.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/ldb_cmd.h | 2 +- .../rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/leveldb_options.h | 2 +- .../include/rocksdb/utilities/lua/rocks_lua_custom_library.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/lua/rocks_lua_util.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/memory_util.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/object_registry.h | 2 +- .../include/rocksdb/utilities/optimistic_transaction_db.h | 2 +- .../rocksdb/include/rocksdb/utilities/option_change_migration.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/options_util.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/sim_cache.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/stackable_db.h | 2 +- .../include/rocksdb/utilities/table_properties_collectors.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/transaction.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/transaction_db.h | 2 +- .../rocksdb/include/rocksdb/utilities/transaction_db_mutex.h | 2 +- src/libs/rocksdb/include/rocksdb/utilities/utility_db.h | 2 +- .../rocksdb/include/rocksdb/utilities/write_batch_with_index.h | 2 +- src/libs/rocksdb/include/rocksdb/version.h | 2 +- src/libs/rocksdb/include/rocksdb/wal_filter.h | 2 +- src/libs/rocksdb/include/rocksdb/write_batch.h | 2 +- src/libs/rocksdb/include/rocksdb/write_batch_base.h | 2 +- src/libs/rocksdb/include/rocksdb/write_buffer_manager.h | 2 +- src/libs/rocksdb/logging/auto_roll_logger.h | 2 +- src/libs/rocksdb/logging/db_options.h | 2 +- src/libs/rocksdb/logging/filename.h | 2 +- src/libs/rocksdb/logging/mutexlock.h | 2 +- src/libs/rocksdb/logging/port.h | 2 +- src/libs/rocksdb/logging/port_posix.h | 2 +- src/libs/stat/stat_alarm_reporter.cc | 2 +- src/libs/stat/stat_alarm_reporter.h | 2 +- src/libs/stat/stat_attn.cc | 2 +- src/libs/stat/stat_attn.h | 2 +- src/libs/stat/stat_client.cc | 2 +- src/libs/stat/stat_client.h | 2 +- src/libs/stat/stat_dtc.cc | 2 +- src/libs/stat/stat_dtc.h | 2 +- src/libs/stat/stat_dtc_def.cc | 2 +- src/libs/stat/stat_dtc_def.h | 2 +- src/libs/stat/stat_info.h | 2 +- src/libs/stat/stat_manager.cc | 2 +- src/libs/stat/stat_manager.h | 2 +- src/libs/stat/stat_manager_container_thread.cc | 2 +- src/libs/stat/stat_manager_container_thread.h | 2 +- src/libs/stat/stat_table_formater.cc | 2 +- src/libs/stat/stat_table_formater.h | 2 +- src/libs/stat/stat_thread.cc | 2 +- src/libs/stat/stat_thread.h | 2 +- src/libs/stat/stat_tool.cc | 2 +- src/rule/log.cc | 2 +- src/rule/log.h | 2 +- src/utils/log.cc | 2 +- src/utils/log.h | 2 +- 533 files changed, 533 insertions(+), 533 deletions(-) diff --git a/src/agent-watchdog/agent_entry.cc b/src/agent-watchdog/agent_entry.cc index 3eeb8f19..f06945a6 100644 --- a/src/agent-watchdog/agent_entry.cc +++ b/src/agent-watchdog/agent_entry.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/agent_entry.h b/src/agent-watchdog/agent_entry.h index eb3ba574..d11a6fc4 100644 --- a/src/agent-watchdog/agent_entry.h +++ b/src/agent-watchdog/agent_entry.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/base.cc b/src/agent-watchdog/base.cc index 4aabfa28..641aa811 100644 --- a/src/agent-watchdog/base.cc +++ b/src/agent-watchdog/base.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/base.h b/src/agent-watchdog/base.h index 854f47ff..8ee7749b 100644 --- a/src/agent-watchdog/base.h +++ b/src/agent-watchdog/base.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/cold_wipe_entry.cc b/src/agent-watchdog/cold_wipe_entry.cc index 6f9563d3..ae23fc09 100644 --- a/src/agent-watchdog/cold_wipe_entry.cc +++ b/src/agent-watchdog/cold_wipe_entry.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/cold_wipe_entry.h b/src/agent-watchdog/cold_wipe_entry.h index 36fe9d12..acc3b263 100644 --- a/src/agent-watchdog/cold_wipe_entry.h +++ b/src/agent-watchdog/cold_wipe_entry.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/core_entry.cc b/src/agent-watchdog/core_entry.cc index 66a255f8..c9d5044b 100644 --- a/src/agent-watchdog/core_entry.cc +++ b/src/agent-watchdog/core_entry.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/core_entry.h b/src/agent-watchdog/core_entry.h index ea975542..1b255c50 100644 --- a/src/agent-watchdog/core_entry.h +++ b/src/agent-watchdog/core_entry.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/daemons.cc b/src/agent-watchdog/daemons.cc index 869b93c9..1f50c4a7 100644 --- a/src/agent-watchdog/daemons.cc +++ b/src/agent-watchdog/daemons.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/daemons.h b/src/agent-watchdog/daemons.h index f54f41f1..cef05ee8 100644 --- a/src/agent-watchdog/daemons.h +++ b/src/agent-watchdog/daemons.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/log.cc b/src/agent-watchdog/log.cc index 3c584b05..64697719 100644 --- a/src/agent-watchdog/log.cc +++ b/src/agent-watchdog/log.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/log.h b/src/agent-watchdog/log.h index 9cc79ef1..2a76ea14 100644 --- a/src/agent-watchdog/log.h +++ b/src/agent-watchdog/log.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/proc_title.c b/src/agent-watchdog/proc_title.c index bf86d44d..0db7f120 100644 --- a/src/agent-watchdog/proc_title.c +++ b/src/agent-watchdog/proc_title.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/proc_title.h b/src/agent-watchdog/proc_title.h index 9d2dc88a..dc411542 100644 --- a/src/agent-watchdog/proc_title.h +++ b/src/agent-watchdog/proc_title.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/sharding_entry.cc b/src/agent-watchdog/sharding_entry.cc index 8f01018c..66b9bac2 100644 --- a/src/agent-watchdog/sharding_entry.cc +++ b/src/agent-watchdog/sharding_entry.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/sharding_entry.h b/src/agent-watchdog/sharding_entry.h index 7ee69b5a..c7e2ef23 100644 --- a/src/agent-watchdog/sharding_entry.h +++ b/src/agent-watchdog/sharding_entry.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/unit.cc b/src/agent-watchdog/unit.cc index e0423c5a..6b584971 100644 --- a/src/agent-watchdog/unit.cc +++ b/src/agent-watchdog/unit.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent-watchdog/unit.h b/src/agent-watchdog/unit.h index 9c884b5c..d2ed00a5 100644 --- a/src/agent-watchdog/unit.h +++ b/src/agent-watchdog/unit.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_array.c b/src/agent/common/da_array.c index 2c4eb95b..40843511 100644 --- a/src/agent/common/da_array.c +++ b/src/agent/common/da_array.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_array.h b/src/agent/common/da_array.h index c2089eff..118fbfa5 100644 --- a/src/agent/common/da_array.h +++ b/src/agent/common/da_array.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_atomic.h b/src/agent/common/da_atomic.h index 82550c92..7e6c8b00 100644 --- a/src/agent/common/da_atomic.h +++ b/src/agent/common/da_atomic.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_atomic_asm.h b/src/agent/common/da_atomic_asm.h index 9b8f6920..36628904 100644 --- a/src/agent/common/da_atomic_asm.h +++ b/src/agent/common/da_atomic_asm.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_atomic_asm8.h b/src/agent/common/da_atomic_asm8.h index 2a39af7d..1fca678d 100644 --- a/src/agent/common/da_atomic_asm8.h +++ b/src/agent/common/da_atomic_asm8.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_atomic_gcc.h b/src/agent/common/da_atomic_gcc.h index a6d95bbb..7153508a 100644 --- a/src/agent/common/da_atomic_gcc.h +++ b/src/agent/common/da_atomic_gcc.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_atomic_gcc8.h b/src/agent/common/da_atomic_gcc8.h index 50a7a2a5..3b2ebee8 100644 --- a/src/agent/common/da_atomic_gcc8.h +++ b/src/agent/common/da_atomic_gcc8.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_queue.h b/src/agent/common/da_queue.h index 6b8a492d..70606457 100644 --- a/src/agent/common/da_queue.h +++ b/src/agent/common/da_queue.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_rbtree.c b/src/agent/common/da_rbtree.c index 67022e4f..9a9b49e4 100644 --- a/src/agent/common/da_rbtree.c +++ b/src/agent/common/da_rbtree.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_rbtree.h b/src/agent/common/da_rbtree.h index b5f0e206..c4a88ebf 100644 --- a/src/agent/common/da_rbtree.h +++ b/src/agent/common/da_rbtree.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_string.c b/src/agent/common/da_string.c index fe2c4a9a..1819c566 100644 --- a/src/agent/common/da_string.c +++ b/src/agent/common/da_string.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/common/da_string.h b/src/agent/common/da_string.h index 9c6a6bae..304e1781 100644 --- a/src/agent/common/da_string.h +++ b/src/agent/common/da_string.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/compiler.h b/src/agent/compiler.h index 629811e4..0d7e8c9b 100644 --- a/src/agent/compiler.h +++ b/src/agent/compiler.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da.c b/src/agent/da.c index fa99b362..4e14b830 100644 --- a/src/agent/da.c +++ b/src/agent/da.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_buf.c b/src/agent/da_buf.c index eb021062..3ebada70 100644 --- a/src/agent/da_buf.c +++ b/src/agent/da_buf.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_buf.h b/src/agent/da_buf.h index 8e22f5fc..f47110d0 100644 --- a/src/agent/da_buf.h +++ b/src/agent/da_buf.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_client.c b/src/agent/da_client.c index 7c0d700d..6c16d813 100644 --- a/src/agent/da_client.c +++ b/src/agent/da_client.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_client.h b/src/agent/da_client.h index 7dea6ee6..147f348d 100644 --- a/src/agent/da_client.h +++ b/src/agent/da_client.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_conf.c b/src/agent/da_conf.c index 5c42d6ed..716d6111 100644 --- a/src/agent/da_conf.c +++ b/src/agent/da_conf.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_conf.h b/src/agent/da_conf.h index af28b975..a8a85baa 100644 --- a/src/agent/da_conf.h +++ b/src/agent/da_conf.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_conn.c b/src/agent/da_conn.c index 5824ab83..007f3c62 100644 --- a/src/agent/da_conn.c +++ b/src/agent/da_conn.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_conn.h b/src/agent/da_conn.h index ad92c06a..c2a222df 100644 --- a/src/agent/da_conn.h +++ b/src/agent/da_conn.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_core.c b/src/agent/da_core.c index 0d8d003e..cb93e642 100644 --- a/src/agent/da_core.c +++ b/src/agent/da_core.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_core.h b/src/agent/da_core.h index efbbd070..d78bbc38 100644 --- a/src/agent/da_core.h +++ b/src/agent/da_core.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_errno.h b/src/agent/da_errno.h index c4bf3a23..5fdbe9db 100644 --- a/src/agent/da_errno.h +++ b/src/agent/da_errno.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_listener.c b/src/agent/da_listener.c index ed6b83d0..ea4e56e0 100644 --- a/src/agent/da_listener.c +++ b/src/agent/da_listener.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_listener.h b/src/agent/da_listener.h index 287a643b..b2e03744 100644 --- a/src/agent/da_listener.h +++ b/src/agent/da_listener.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_log.c b/src/agent/da_log.c index ecab902e..373cde56 100644 --- a/src/agent/da_log.c +++ b/src/agent/da_log.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_log.h b/src/agent/da_log.h index 69a2fcf8..9a60b9dd 100644 --- a/src/agent/da_log.h +++ b/src/agent/da_log.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_mem_pool.c b/src/agent/da_mem_pool.c index 1a5c2130..de489fb2 100644 --- a/src/agent/da_mem_pool.c +++ b/src/agent/da_mem_pool.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_mem_pool.h b/src/agent/da_mem_pool.h index 884d0d6f..f75c1340 100644 --- a/src/agent/da_mem_pool.h +++ b/src/agent/da_mem_pool.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_msg.c b/src/agent/da_msg.c index 3799a31b..48d9b8a5 100644 --- a/src/agent/da_msg.c +++ b/src/agent/da_msg.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_msg.h b/src/agent/da_msg.h index ea0d5994..55063bc0 100644 --- a/src/agent/da_msg.h +++ b/src/agent/da_msg.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_request.c b/src/agent/da_request.c index 8604eadb..3f041e60 100644 --- a/src/agent/da_request.c +++ b/src/agent/da_request.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_request.h b/src/agent/da_request.h index 90aabbc7..08901ef3 100644 --- a/src/agent/da_request.h +++ b/src/agent/da_request.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_response.c b/src/agent/da_response.c index 4f7ddd8c..fda7c797 100644 --- a/src/agent/da_response.c +++ b/src/agent/da_response.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_response.h b/src/agent/da_response.h index e9e75876..27006f5d 100644 --- a/src/agent/da_response.h +++ b/src/agent/da_response.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_server.c b/src/agent/da_server.c index a8dd542a..e387e20f 100644 --- a/src/agent/da_server.c +++ b/src/agent/da_server.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_server.h b/src/agent/da_server.h index 788ce4e1..0aaf76a4 100644 --- a/src/agent/da_server.h +++ b/src/agent/da_server.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_signal.c b/src/agent/da_signal.c index 3e8840e0..192c6fb1 100644 --- a/src/agent/da_signal.c +++ b/src/agent/da_signal.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_signal.h b/src/agent/da_signal.h index d9471217..8f680997 100644 --- a/src/agent/da_signal.h +++ b/src/agent/da_signal.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_stats.c b/src/agent/da_stats.c index 2c54be42..a9fa2387 100644 --- a/src/agent/da_stats.c +++ b/src/agent/da_stats.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_stats.h b/src/agent/da_stats.h index 42f9e702..7aec273b 100644 --- a/src/agent/da_stats.h +++ b/src/agent/da_stats.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_time.c b/src/agent/da_time.c index daa8db37..256a52d5 100644 --- a/src/agent/da_time.c +++ b/src/agent/da_time.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_time.h b/src/agent/da_time.h index 6d208a56..6a6b3abc 100644 --- a/src/agent/da_time.h +++ b/src/agent/da_time.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_top_percentile.c b/src/agent/da_top_percentile.c index cefbd355..1bdddb1e 100644 --- a/src/agent/da_top_percentile.c +++ b/src/agent/da_top_percentile.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_top_percentile.h b/src/agent/da_top_percentile.h index 4969a076..795c6204 100644 --- a/src/agent/da_top_percentile.h +++ b/src/agent/da_top_percentile.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_util.c b/src/agent/da_util.c index a1f38576..b8e41272 100644 --- a/src/agent/da_util.c +++ b/src/agent/da_util.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/da_util.h b/src/agent/da_util.h index e10359eb..9d0bdffa 100644 --- a/src/agent/da_util.h +++ b/src/agent/da_util.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/event/da_epoll.c b/src/agent/event/da_epoll.c index 702b7e0c..963b31fb 100644 --- a/src/agent/event/da_epoll.c +++ b/src/agent/event/da_epoll.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/event/da_event.h b/src/agent/event/da_event.h index 0edf27fb..1009de5a 100644 --- a/src/agent/event/da_event.h +++ b/src/agent/event/da_event.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_chash.c b/src/agent/hashkit/da_chash.c index 1179c2f4..d9e3fd0e 100644 --- a/src/agent/hashkit/da_chash.c +++ b/src/agent/hashkit/da_chash.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_crc16.c b/src/agent/hashkit/da_crc16.c index 3ea12cd1..c77760ba 100644 --- a/src/agent/hashkit/da_crc16.c +++ b/src/agent/hashkit/da_crc16.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_crc32.c b/src/agent/hashkit/da_crc32.c index bfe5ca14..21db219c 100644 --- a/src/agent/hashkit/da_crc32.c +++ b/src/agent/hashkit/da_crc32.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_fnv.c b/src/agent/hashkit/da_fnv.c index de4bead8..167c7fdf 100644 --- a/src/agent/hashkit/da_fnv.c +++ b/src/agent/hashkit/da_fnv.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_hsieh.c b/src/agent/hashkit/da_hsieh.c index 86968c13..6e3ad354 100644 --- a/src/agent/hashkit/da_hsieh.c +++ b/src/agent/hashkit/da_hsieh.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_jenkins.c b/src/agent/hashkit/da_jenkins.c index b9c770e0..4a67e61a 100644 --- a/src/agent/hashkit/da_jenkins.c +++ b/src/agent/hashkit/da_jenkins.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_ketama.c b/src/agent/hashkit/da_ketama.c index 96cf3c6a..d911c0eb 100644 --- a/src/agent/hashkit/da_ketama.c +++ b/src/agent/hashkit/da_ketama.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_md5.c b/src/agent/hashkit/da_md5.c index d75a372d..b17a28a2 100644 --- a/src/agent/hashkit/da_md5.c +++ b/src/agent/hashkit/da_md5.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_murmur.c b/src/agent/hashkit/da_murmur.c index 9c1b2415..9b01dc31 100644 --- a/src/agent/hashkit/da_murmur.c +++ b/src/agent/hashkit/da_murmur.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/hashkit/da_one_at_a_time.c b/src/agent/hashkit/da_one_at_a_time.c index 7ff52ea0..07540ead 100644 --- a/src/agent/hashkit/da_one_at_a_time.c +++ b/src/agent/hashkit/da_one_at_a_time.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/my/my_comm.c b/src/agent/my/my_comm.c index 270ad7e4..5899b1ba 100644 --- a/src/agent/my/my_comm.c +++ b/src/agent/my/my_comm.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/my/my_comm.h b/src/agent/my/my_comm.h index 5cc4ee9f..7c230ff0 100644 --- a/src/agent/my/my_comm.h +++ b/src/agent/my/my_comm.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/my/my_net_send.c b/src/agent/my/my_net_send.c index 5348bfd5..d3722e9d 100644 --- a/src/agent/my/my_net_send.c +++ b/src/agent/my/my_net_send.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/my/my_net_send.h b/src/agent/my/my_net_send.h index 1aedf3fb..603b2f56 100644 --- a/src/agent/my/my_net_send.h +++ b/src/agent/my/my_net_send.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/my/my_net_write.c b/src/agent/my/my_net_write.c index 5aa18360..c410a484 100644 --- a/src/agent/my/my_net_write.c +++ b/src/agent/my/my_net_write.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/my/my_net_write.h b/src/agent/my/my_net_write.h index 61c2c296..075e0bf0 100644 --- a/src/agent/my/my_net_write.h +++ b/src/agent/my/my_net_write.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/my/my_parse.c b/src/agent/my/my_parse.c index 7b4aec8a..940c214b 100644 --- a/src/agent/my/my_parse.c +++ b/src/agent/my/my_parse.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/my/my_parse.h b/src/agent/my/my_parse.h index 30d1bd59..cbdebea6 100644 --- a/src/agent/my/my_parse.h +++ b/src/agent/my/my_parse.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/proto/da_dtcparse.c b/src/agent/proto/da_dtcparse.c index 1acb0eb0..04c14920 100644 --- a/src/agent/proto/da_dtcparse.c +++ b/src/agent/proto/da_dtcparse.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/agent/proto/da_protocal.h b/src/agent/proto/da_protocal.h index 4769e99d..9bd3d23a 100644 --- a/src/agent/proto/da_protocal.h +++ b/src/agent/proto/da_protocal.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/configcenter/ca_api/app_client_set.c b/src/configcenter/ca_api/app_client_set.c index 9a6c6772..7169b578 100644 --- a/src/configcenter/ca_api/app_client_set.c +++ b/src/configcenter/ca_api/app_client_set.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/configcenter/ca_api/app_client_set.h b/src/configcenter/ca_api/app_client_set.h index 7f35ce8d..5bd38a0f 100644 --- a/src/configcenter/ca_api/app_client_set.h +++ b/src/configcenter/ca_api/app_client_set.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/configcenter/ca_api/app_shm_manager.c b/src/configcenter/ca_api/app_shm_manager.c index 61a87dfe..8eb95352 100644 --- a/src/configcenter/ca_api/app_shm_manager.c +++ b/src/configcenter/ca_api/app_shm_manager.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/configcenter/ca_api/app_shm_manager.h b/src/configcenter/ca_api/app_shm_manager.h index fb28dd11..6fcc3883 100644 --- a/src/configcenter/ca_api/app_shm_manager.h +++ b/src/configcenter/ca_api/app_shm_manager.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/configcenter/ca_api/ca_dump_shm.c b/src/configcenter/ca_api/ca_dump_shm.c index e72c7714..d2d5ec36 100644 --- a/src/configcenter/ca_api/ca_dump_shm.c +++ b/src/configcenter/ca_api/ca_dump_shm.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/configcenter/ca_api/ca_quick_find.c b/src/configcenter/ca_api/ca_quick_find.c index 73cf4f5e..a9642e49 100644 --- a/src/configcenter/ca_api/ca_quick_find.c +++ b/src/configcenter/ca_api/ca_quick_find.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/configcenter/ca_api/ca_quick_find.h b/src/configcenter/ca_api/ca_quick_find.h index 0da563e4..7b7dcffc 100644 --- a/src/configcenter/ca_api/ca_quick_find.h +++ b/src/configcenter/ca_api/ca_quick_find.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/configcenter/ca_api/config_center_client.h b/src/configcenter/ca_api/config_center_client.h index 8aa77970..8a3d8fb4 100644 --- a/src/configcenter/ca_api/config_center_client.h +++ b/src/configcenter/ca_api/config_center_client.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/connector/connector.cc b/src/connector/connector.cc index ad141a35..fe54c167 100644 --- a/src/connector/connector.cc +++ b/src/connector/connector.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/connector/database_connection.cc b/src/connector/database_connection.cc index 14f381f0..fa2b6ecb 100644 --- a/src/connector/database_connection.cc +++ b/src/connector/database_connection.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/connector/database_connection.h b/src/connector/database_connection.h index c3503ba4..b261cc02 100644 --- a/src/connector/database_connection.h +++ b/src/connector/database_connection.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/connector/mysql_operation.cc b/src/connector/mysql_operation.cc index 3b34b5f4..de006ce2 100644 --- a/src/connector/mysql_operation.cc +++ b/src/connector/mysql_operation.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/connector/mysql_operation.h b/src/connector/mysql_operation.h index 9226e102..818cb049 100644 --- a/src/connector/mysql_operation.h +++ b/src/connector/mysql_operation.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/algorithm/hash.cc b/src/core/algorithm/hash.cc index b8237c15..980ce549 100644 --- a/src/core/algorithm/hash.cc +++ b/src/core/algorithm/hash.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/algorithm/hash.h b/src/core/algorithm/hash.h index ca1146c0..cc038910 100644 --- a/src/core/algorithm/hash.h +++ b/src/core/algorithm/hash.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/algorithm/lru_bit.cc b/src/core/algorithm/lru_bit.cc index a656b743..b1fc1ebc 100644 --- a/src/core/algorithm/lru_bit.cc +++ b/src/core/algorithm/lru_bit.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/algorithm/lru_bit.h b/src/core/algorithm/lru_bit.h index 0fe2ebca..83f9c9cf 100644 --- a/src/core/algorithm/lru_bit.h +++ b/src/core/algorithm/lru_bit.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/buffer/buffer_def.h b/src/core/buffer/buffer_def.h index 1b90f116..fe1deeb0 100644 --- a/src/core/buffer/buffer_def.h +++ b/src/core/buffer/buffer_def.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/buffer/buffer_flush.cc b/src/core/buffer/buffer_flush.cc index 3e0ef94e..cf740e50 100644 --- a/src/core/buffer/buffer_flush.cc +++ b/src/core/buffer/buffer_flush.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/buffer/buffer_flush.h b/src/core/buffer/buffer_flush.h index d1dd49fb..38646477 100644 --- a/src/core/buffer/buffer_flush.h +++ b/src/core/buffer/buffer_flush.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/buffer/buffer_pond.cc b/src/core/buffer/buffer_pond.cc index 9a949ab4..618faf6d 100644 --- a/src/core/buffer/buffer_pond.cc +++ b/src/core/buffer/buffer_pond.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/buffer/buffer_pond.h b/src/core/buffer/buffer_pond.h index 1b399cd6..56d32d6f 100644 --- a/src/core/buffer/buffer_pond.h +++ b/src/core/buffer/buffer_pond.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/buffer/buffer_remoteLog.h b/src/core/buffer/buffer_remoteLog.h index 23470b8b..55efa98b 100644 --- a/src/core/buffer/buffer_remoteLog.h +++ b/src/core/buffer/buffer_remoteLog.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/barrier_ask_answer_chain.cc b/src/core/chain/barrier_ask_answer_chain.cc index 416e3a19..0a6fab03 100644 --- a/src/core/chain/barrier_ask_answer_chain.cc +++ b/src/core/chain/barrier_ask_answer_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/barrier_ask_answer_chain.h b/src/core/chain/barrier_ask_answer_chain.h index 8d9328a8..d6f14c57 100644 --- a/src/core/chain/barrier_ask_answer_chain.h +++ b/src/core/chain/barrier_ask_answer_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/black_hole_ask_chain.cc b/src/core/chain/black_hole_ask_chain.cc index 3160a6e5..ca58b006 100644 --- a/src/core/chain/black_hole_ask_chain.cc +++ b/src/core/chain/black_hole_ask_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/black_hole_ask_chain.h b/src/core/chain/black_hole_ask_chain.h index 92ae78f6..ebc7ad64 100644 --- a/src/core/chain/black_hole_ask_chain.h +++ b/src/core/chain/black_hole_ask_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/buffer_bypass_answer_chain.cc b/src/core/chain/buffer_bypass_answer_chain.cc index c3e79431..522c78ec 100644 --- a/src/core/chain/buffer_bypass_answer_chain.cc +++ b/src/core/chain/buffer_bypass_answer_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/buffer_bypass_answer_chain.h b/src/core/chain/buffer_bypass_answer_chain.h index 5fbe23b7..4de2a83a 100644 --- a/src/core/chain/buffer_bypass_answer_chain.h +++ b/src/core/chain/buffer_bypass_answer_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/buffer_bypass_ask_chain.cc b/src/core/chain/buffer_bypass_ask_chain.cc index 786ea5cd..de27323c 100644 --- a/src/core/chain/buffer_bypass_ask_chain.cc +++ b/src/core/chain/buffer_bypass_ask_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/buffer_bypass_ask_chain.h b/src/core/chain/buffer_bypass_ask_chain.h index ae4339ff..9e768b41 100644 --- a/src/core/chain/buffer_bypass_ask_chain.h +++ b/src/core/chain/buffer_bypass_ask_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/buffer_process_answer_chain.cc b/src/core/chain/buffer_process_answer_chain.cc index 202838ea..67d394cd 100644 --- a/src/core/chain/buffer_process_answer_chain.cc +++ b/src/core/chain/buffer_process_answer_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/buffer_process_answer_chain.h b/src/core/chain/buffer_process_answer_chain.h index dae53f16..a05012f3 100644 --- a/src/core/chain/buffer_process_answer_chain.h +++ b/src/core/chain/buffer_process_answer_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/buffer_process_ask_chain.cc b/src/core/chain/buffer_process_ask_chain.cc index af793638..3782adc1 100644 --- a/src/core/chain/buffer_process_ask_chain.cc +++ b/src/core/chain/buffer_process_ask_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/buffer_process_ask_chain.h b/src/core/chain/buffer_process_ask_chain.h index b6b5c1ea..1894fb46 100644 --- a/src/core/chain/buffer_process_ask_chain.h +++ b/src/core/chain/buffer_process_ask_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/job_procedure.cc b/src/core/chain/job_procedure.cc index 4459b77a..8bc227ff 100644 --- a/src/core/chain/job_procedure.cc +++ b/src/core/chain/job_procedure.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/system_command_ask_chain.cc b/src/core/chain/system_command_ask_chain.cc index 300408d1..e80e983c 100644 --- a/src/core/chain/system_command_ask_chain.cc +++ b/src/core/chain/system_command_ask_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/chain/system_command_ask_chain.h b/src/core/chain/system_command_ask_chain.h index 2796c98c..f655d561 100644 --- a/src/core/chain/system_command_ask_chain.h +++ b/src/core/chain/system_command_ask_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/data/col_expand.cc b/src/core/data/col_expand.cc index 5d9d7475..86373cfc 100644 --- a/src/core/data/col_expand.cc +++ b/src/core/data/col_expand.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/data/col_expand.h b/src/core/data/col_expand.h index 99b28d06..adc6497d 100644 --- a/src/core/data/col_expand.h +++ b/src/core/data/col_expand.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/data/container_dtcd.cc b/src/core/data/container_dtcd.cc index f55cccb5..1fb6b3a1 100644 --- a/src/core/data/container_dtcd.cc +++ b/src/core/data/container_dtcd.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/data/data_chunk.h b/src/core/data/data_chunk.h index e423993d..83d95d7a 100644 --- a/src/core/data/data_chunk.h +++ b/src/core/data/data_chunk.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/data/data_process.h b/src/core/data/data_process.h index 12b1d83d..4a5ab03f 100644 --- a/src/core/data/data_process.h +++ b/src/core/data/data_process.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/data/defragment.h b/src/core/data/defragment.h index 196e774a..0f8d85b9 100644 --- a/src/core/data/defragment.h +++ b/src/core/data/defragment.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/global.h b/src/core/global.h index 3c1b5431..6ebd1c72 100644 --- a/src/core/global.h +++ b/src/core/global.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/hotbk/hb_feature.cc b/src/core/hotbk/hb_feature.cc index 9ceb9e3c..1a8a534b 100644 --- a/src/core/hotbk/hb_feature.cc +++ b/src/core/hotbk/hb_feature.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/hotbk/hb_feature.h b/src/core/hotbk/hb_feature.h index a6299f60..b9a73327 100644 --- a/src/core/hotbk/hb_feature.h +++ b/src/core/hotbk/hb_feature.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/hotbk/hb_log.cc b/src/core/hotbk/hb_log.cc index fd7b2775..1cf6d036 100644 --- a/src/core/hotbk/hb_log.cc +++ b/src/core/hotbk/hb_log.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/hotbk/hb_log.h b/src/core/hotbk/hb_log.h index f7f42b5c..ed5514ea 100644 --- a/src/core/hotbk/hb_log.h +++ b/src/core/hotbk/hb_log.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/hotbk/hot_backup_ask_chain.cc b/src/core/hotbk/hot_backup_ask_chain.cc index 2a54738e..2976e4c8 100644 --- a/src/core/hotbk/hot_backup_ask_chain.cc +++ b/src/core/hotbk/hot_backup_ask_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/hotbk/hot_backup_ask_chain.h b/src/core/hotbk/hot_backup_ask_chain.h index d6375aa2..340d66cb 100644 --- a/src/core/hotbk/hot_backup_ask_chain.h +++ b/src/core/hotbk/hot_backup_ask_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/log/logger.cc b/src/core/log/logger.cc index b017c6e9..3a0be019 100644 --- a/src/core/log/logger.cc +++ b/src/core/log/logger.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/log/logger.h b/src/core/log/logger.h index cfb10f4c..ddb87997 100644 --- a/src/core/log/logger.h +++ b/src/core/log/logger.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/main.cc b/src/core/main.cc index 7a1df618..e0b23858 100644 --- a/src/core/main.cc +++ b/src/core/main.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/mem/feature.cc b/src/core/mem/feature.cc index 0b43ee21..65ada75d 100644 --- a/src/core/mem/feature.cc +++ b/src/core/mem/feature.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/mem/feature.h b/src/core/mem/feature.h index 7c35f4dd..2d3a06e4 100644 --- a/src/core/mem/feature.h +++ b/src/core/mem/feature.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/mem/fence_queue.h b/src/core/mem/fence_queue.h index faf86361..3f8cd7d8 100644 --- a/src/core/mem/fence_queue.h +++ b/src/core/mem/fence_queue.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/mem/mallocator.h b/src/core/mem/mallocator.h index 4de954f3..9df28e29 100644 --- a/src/core/mem/mallocator.h +++ b/src/core/mem/mallocator.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/mem/pt_malloc.cc b/src/core/mem/pt_malloc.cc index 8563fd98..ba7cf38c 100644 --- a/src/core/mem/pt_malloc.cc +++ b/src/core/mem/pt_malloc.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/mem/pt_malloc.h b/src/core/mem/pt_malloc.h index e743337c..a92cc3b9 100644 --- a/src/core/mem/pt_malloc.h +++ b/src/core/mem/pt_malloc.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/mem/sys_malloc.cc b/src/core/mem/sys_malloc.cc index f5040d54..188c38f9 100644 --- a/src/core/mem/sys_malloc.cc +++ b/src/core/mem/sys_malloc.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/mem/sys_malloc.h b/src/core/mem/sys_malloc.h index 2fde7405..a636c0fa 100644 --- a/src/core/mem/sys_malloc.h +++ b/src/core/mem/sys_malloc.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/misc/dtc_code.h b/src/core/misc/dtc_code.h index 76a72f67..aaf3fbfc 100644 --- a/src/core/misc/dtc_code.h +++ b/src/core/misc/dtc_code.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/misc/main_supply.cc b/src/core/misc/main_supply.cc index 169b4e05..276a425b 100644 --- a/src/core/misc/main_supply.cc +++ b/src/core/misc/main_supply.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/misc/main_supply.h b/src/core/misc/main_supply.h index 27c982d9..cc0845e2 100644 --- a/src/core/misc/main_supply.h +++ b/src/core/misc/main_supply.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/misc/mysql_error.h b/src/core/misc/mysql_error.h index 1e230667..f563aee0 100644 --- a/src/core/misc/mysql_error.h +++ b/src/core/misc/mysql_error.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/misc/purge_processor.h b/src/core/misc/purge_processor.h index d9339e19..6445920b 100644 --- a/src/core/misc/purge_processor.h +++ b/src/core/misc/purge_processor.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/misc/reader_interface.h b/src/core/misc/reader_interface.h index a22bd13a..ca16d194 100644 --- a/src/core/misc/reader_interface.h +++ b/src/core/misc/reader_interface.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/node/empty_filter.cc b/src/core/node/empty_filter.cc index a866db71..cf433ab9 100644 --- a/src/core/node/empty_filter.cc +++ b/src/core/node/empty_filter.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/node/empty_filter.h b/src/core/node/empty_filter.h index 918cd5f6..f57ec6ba 100644 --- a/src/core/node/empty_filter.h +++ b/src/core/node/empty_filter.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/node/node.h b/src/core/node/node.h index 0227009e..479a44bd 100644 --- a/src/core/node/node.h +++ b/src/core/node/node.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/node/node_index.cc b/src/core/node/node_index.cc index 7e60cde4..8a8c5714 100644 --- a/src/core/node/node_index.cc +++ b/src/core/node/node_index.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/node/node_index.h b/src/core/node/node_index.h index ff7a94b6..abbf206d 100644 --- a/src/core/node/node_index.h +++ b/src/core/node/node_index.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/node/node_list.h b/src/core/node/node_list.h index 3adb5e79..0eda85e7 100644 --- a/src/core/node/node_list.h +++ b/src/core/node/node_list.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/node/node_set.cc b/src/core/node/node_set.cc index 4358adce..a192f167 100644 --- a/src/core/node/node_set.cc +++ b/src/core/node/node_set.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/node/node_set.h b/src/core/node/node_set.h index e0baeca1..fce8738b 100644 --- a/src/core/node/node_set.h +++ b/src/core/node/node_set.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/nodegroup/ng_info.cc b/src/core/nodegroup/ng_info.cc index f28bea8a..0fb8a7c9 100644 --- a/src/core/nodegroup/ng_info.cc +++ b/src/core/nodegroup/ng_info.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/nodegroup/ng_info.h b/src/core/nodegroup/ng_info.h index 1b26a023..705a8aaf 100644 --- a/src/core/nodegroup/ng_info.h +++ b/src/core/nodegroup/ng_info.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/nodegroup/ng_list.h b/src/core/nodegroup/ng_list.h index 7fdfffc3..c14de320 100644 --- a/src/core/nodegroup/ng_list.h +++ b/src/core/nodegroup/ng_list.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/raw/raw_data.cc b/src/core/raw/raw_data.cc index c5176cb3..1aaf2d7a 100644 --- a/src/core/raw/raw_data.cc +++ b/src/core/raw/raw_data.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/raw/raw_data.h b/src/core/raw/raw_data.h index ea23990c..a3d72533 100644 --- a/src/core/raw/raw_data.h +++ b/src/core/raw/raw_data.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/raw/raw_data_process.cc b/src/core/raw/raw_data_process.cc index 674502d4..40f6eb52 100644 --- a/src/core/raw/raw_data_process.cc +++ b/src/core/raw/raw_data_process.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/raw/raw_data_process.h b/src/core/raw/raw_data_process.h index 130d00c5..0e241b1b 100644 --- a/src/core/raw/raw_data_process.h +++ b/src/core/raw/raw_data_process.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/task/task_pendlist.cc b/src/core/task/task_pendlist.cc index b31e27bc..417a9290 100644 --- a/src/core/task/task_pendlist.cc +++ b/src/core/task/task_pendlist.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/task/task_pendlist.h b/src/core/task/task_pendlist.h index 12a7254f..6e2fc976 100644 --- a/src/core/task/task_pendlist.h +++ b/src/core/task/task_pendlist.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/time/expire_time.cc b/src/core/time/expire_time.cc index 10c6002c..07d08519 100644 --- a/src/core/time/expire_time.cc +++ b/src/core/time/expire_time.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/time/expire_time.h b/src/core/time/expire_time.h index 8b148b67..2ba4edc4 100644 --- a/src/core/time/expire_time.h +++ b/src/core/time/expire_time.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/tree/t_tree.cc b/src/core/tree/t_tree.cc index 0bfa92b1..92f0a008 100644 --- a/src/core/tree/t_tree.cc +++ b/src/core/tree/t_tree.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/tree/t_tree.h b/src/core/tree/t_tree.h index cce2be04..5c8de87f 100644 --- a/src/core/tree/t_tree.h +++ b/src/core/tree/t_tree.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/tree/tree_data.cc b/src/core/tree/tree_data.cc index bd5a0a81..c24f88e4 100644 --- a/src/core/tree/tree_data.cc +++ b/src/core/tree/tree_data.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/tree/tree_data.h b/src/core/tree/tree_data.h index 1bbb68ad..df0f6d29 100644 --- a/src/core/tree/tree_data.h +++ b/src/core/tree/tree_data.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/tree/tree_data_keycmp.h b/src/core/tree/tree_data_keycmp.h index a01ec48c..ce4a6665 100644 --- a/src/core/tree/tree_data_keycmp.h +++ b/src/core/tree/tree_data_keycmp.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/tree/tree_data_process.cc b/src/core/tree/tree_data_process.cc index 8b031ef4..c0f21372 100644 --- a/src/core/tree/tree_data_process.cc +++ b/src/core/tree/tree_data_process.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/core/tree/tree_data_process.h b/src/core/tree/tree_data_process.h index a550c6fe..29df0ab8 100644 --- a/src/core/tree/tree_data_process.h +++ b/src/core/tree/tree_data_process.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/base.cc b/src/daemons/base.cc index 916ed099..a8d1d702 100644 --- a/src/daemons/base.cc +++ b/src/daemons/base.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/base.h b/src/daemons/base.h index 854f47ff..8ee7749b 100644 --- a/src/daemons/base.h +++ b/src/daemons/base.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/daemon_listener.cc b/src/daemons/daemon_listener.cc index 58b9d1ce..8a20894e 100644 --- a/src/daemons/daemon_listener.cc +++ b/src/daemons/daemon_listener.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/daemon_listener.h b/src/daemons/daemon_listener.h index 5067afcc..d6505929 100644 --- a/src/daemons/daemon_listener.h +++ b/src/daemons/daemon_listener.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/daemons.cc b/src/daemons/daemons.cc index 33d797ac..0f673dc3 100644 --- a/src/daemons/daemons.cc +++ b/src/daemons/daemons.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/daemons.h b/src/daemons/daemons.h index d9d89b23..bafddef6 100644 --- a/src/daemons/daemons.h +++ b/src/daemons/daemons.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/fault.cc b/src/daemons/fault.cc index 921eea3b..ac3da728 100644 --- a/src/daemons/fault.cc +++ b/src/daemons/fault.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/fault.h b/src/daemons/fault.h index e3395fc6..ef04db78 100644 --- a/src/daemons/fault.h +++ b/src/daemons/fault.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/fork.cc b/src/daemons/fork.cc index e8c6ff6c..058a1e97 100644 --- a/src/daemons/fork.cc +++ b/src/daemons/fork.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/gdb.cc b/src/daemons/gdb.cc index 1d24da18..3f1eecb8 100644 --- a/src/daemons/gdb.cc +++ b/src/daemons/gdb.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/gdb.h b/src/daemons/gdb.h index 04ce5d92..69a88075 100644 --- a/src/daemons/gdb.h +++ b/src/daemons/gdb.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/gdb_srv.cc b/src/daemons/gdb_srv.cc index bf416291..645e0b38 100644 --- a/src/daemons/gdb_srv.cc +++ b/src/daemons/gdb_srv.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/helper.cc b/src/daemons/helper.cc index b1e3c042..befd06cf 100644 --- a/src/daemons/helper.cc +++ b/src/daemons/helper.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/helper.h b/src/daemons/helper.h index a6633f4b..11e0d910 100644 --- a/src/daemons/helper.h +++ b/src/daemons/helper.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/logger.cc b/src/daemons/logger.cc index 1939adb2..123ae2ad 100644 --- a/src/daemons/logger.cc +++ b/src/daemons/logger.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/logger.h b/src/daemons/logger.h index 2ded25c8..eb565097 100644 --- a/src/daemons/logger.h +++ b/src/daemons/logger.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/main_entry.cc b/src/daemons/main_entry.cc index 57a18739..2ee09b16 100644 --- a/src/daemons/main_entry.cc +++ b/src/daemons/main_entry.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/main_entry.h b/src/daemons/main_entry.h index 36a443d1..93b82621 100644 --- a/src/daemons/main_entry.h +++ b/src/daemons/main_entry.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/run.cc b/src/daemons/run.cc index aede8bae..cb41b27b 100644 --- a/src/daemons/run.cc +++ b/src/daemons/run.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/stattool.cc b/src/daemons/stattool.cc index 5bf900ab..c63e78ed 100644 --- a/src/daemons/stattool.cc +++ b/src/daemons/stattool.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/stattool.h b/src/daemons/stattool.h index e0f4dbb7..ee17a2e5 100644 --- a/src/daemons/stattool.h +++ b/src/daemons/stattool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/unit.cc b/src/daemons/unit.cc index 196b2560..a795fa06 100644 --- a/src/daemons/unit.cc +++ b/src/daemons/unit.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/daemons/unit.h b/src/daemons/unit.h index 9c884b5c..d2ed00a5 100644 --- a/src/daemons/unit.h +++ b/src/daemons/unit.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/data_lifecycle/log.cc b/src/data_lifecycle/log.cc index 3c584b05..64697719 100644 --- a/src/data_lifecycle/log.cc +++ b/src/data_lifecycle/log.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/data_lifecycle/log.h b/src/data_lifecycle/log.h index 6bc131e7..5a039372 100644 --- a/src/data_lifecycle/log.h +++ b/src/data_lifecycle/log.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/hwcserver/log.cc b/src/hwcserver/log.cc index 3c584b05..64697719 100644 --- a/src/hwcserver/log.cc +++ b/src/hwcserver/log.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/hwcserver/log.h b/src/hwcserver/log.h index 340091a9..ed9ced07 100644 --- a/src/hwcserver/log.h +++ b/src/hwcserver/log.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/Condition.h b/src/libs/common/Condition.h index 6886db65..dc53a42b 100644 --- a/src/libs/common/Condition.h +++ b/src/libs/common/Condition.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_client.cc b/src/libs/common/agent/agent_client.cc index 338be387..bbcddcea 100644 --- a/src/libs/common/agent/agent_client.cc +++ b/src/libs/common/agent/agent_client.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_client.h b/src/libs/common/agent/agent_client.h index 2fe67f6f..a4b35614 100644 --- a/src/libs/common/agent/agent_client.h +++ b/src/libs/common/agent/agent_client.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_listen_pool.cc b/src/libs/common/agent/agent_listen_pool.cc index 73f8375c..024faf49 100644 --- a/src/libs/common/agent/agent_listen_pool.cc +++ b/src/libs/common/agent/agent_listen_pool.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_listen_pool.h b/src/libs/common/agent/agent_listen_pool.h index d51b4c86..9c0e82a1 100644 --- a/src/libs/common/agent/agent_listen_pool.h +++ b/src/libs/common/agent/agent_listen_pool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_listener.cc b/src/libs/common/agent/agent_listener.cc index 7388310f..504e4785 100644 --- a/src/libs/common/agent/agent_listener.cc +++ b/src/libs/common/agent/agent_listener.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_listener.h b/src/libs/common/agent/agent_listener.h index b08ffef8..56190b59 100644 --- a/src/libs/common/agent/agent_listener.h +++ b/src/libs/common/agent/agent_listener.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_multi_request.cc b/src/libs/common/agent/agent_multi_request.cc index 11da7cd8..2a407150 100644 --- a/src/libs/common/agent/agent_multi_request.cc +++ b/src/libs/common/agent/agent_multi_request.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_multi_request.h b/src/libs/common/agent/agent_multi_request.h index 1e01e661..71433882 100644 --- a/src/libs/common/agent/agent_multi_request.h +++ b/src/libs/common/agent/agent_multi_request.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_receiver.cc b/src/libs/common/agent/agent_receiver.cc index 82369075..538af651 100644 --- a/src/libs/common/agent/agent_receiver.cc +++ b/src/libs/common/agent/agent_receiver.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_receiver.h b/src/libs/common/agent/agent_receiver.h index 418c3b9a..e4b7560a 100644 --- a/src/libs/common/agent/agent_receiver.h +++ b/src/libs/common/agent/agent_receiver.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_sender.cc b/src/libs/common/agent/agent_sender.cc index a63d9049..ec922f67 100644 --- a/src/libs/common/agent/agent_sender.cc +++ b/src/libs/common/agent/agent_sender.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_sender.h b/src/libs/common/agent/agent_sender.h index 4dbde48d..8d2ee692 100644 --- a/src/libs/common/agent/agent_sender.h +++ b/src/libs/common/agent/agent_sender.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_unit.cc b/src/libs/common/agent/agent_unit.cc index 21a10b9a..603631c6 100644 --- a/src/libs/common/agent/agent_unit.cc +++ b/src/libs/common/agent/agent_unit.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/agent/agent_unit.h b/src/libs/common/agent/agent_unit.h index b7b05e9d..6eba9e2d 100644 --- a/src/libs/common/agent/agent_unit.h +++ b/src/libs/common/agent/agent_unit.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/bitsop.cc b/src/libs/common/algorithm/bitsop.cc index 9e491b72..8da09b25 100644 --- a/src/libs/common/algorithm/bitsop.cc +++ b/src/libs/common/algorithm/bitsop.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/bitsop.h b/src/libs/common/algorithm/bitsop.h index e2e1b5bf..03c1bf63 100644 --- a/src/libs/common/algorithm/bitsop.h +++ b/src/libs/common/algorithm/bitsop.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/chash.cc b/src/libs/common/algorithm/chash.cc index 7cedadd7..3d0676cc 100644 --- a/src/libs/common/algorithm/chash.cc +++ b/src/libs/common/algorithm/chash.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/chash.h b/src/libs/common/algorithm/chash.h index 8e249c39..d4a3806f 100644 --- a/src/libs/common/algorithm/chash.h +++ b/src/libs/common/algorithm/chash.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/compress.cc b/src/libs/common/algorithm/compress.cc index 13f6929c..418bf3c0 100644 --- a/src/libs/common/algorithm/compress.cc +++ b/src/libs/common/algorithm/compress.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/compress.h b/src/libs/common/algorithm/compress.h index b48496fd..640ee32b 100644 --- a/src/libs/common/algorithm/compress.h +++ b/src/libs/common/algorithm/compress.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/markup_stl.cc b/src/libs/common/algorithm/markup_stl.cc index 4c1a38bd..9a453c28 100644 --- a/src/libs/common/algorithm/markup_stl.cc +++ b/src/libs/common/algorithm/markup_stl.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/markup_stl.h b/src/libs/common/algorithm/markup_stl.h index ba8fb1ec..5f83b177 100644 --- a/src/libs/common/algorithm/markup_stl.h +++ b/src/libs/common/algorithm/markup_stl.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/md5.cc b/src/libs/common/algorithm/md5.cc index 116c6be4..7393fcc2 100644 --- a/src/libs/common/algorithm/md5.cc +++ b/src/libs/common/algorithm/md5.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/md5.h b/src/libs/common/algorithm/md5.h index ee0e0d9c..0cc2bd03 100644 --- a/src/libs/common/algorithm/md5.h +++ b/src/libs/common/algorithm/md5.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/new_hash.cc b/src/libs/common/algorithm/new_hash.cc index 06cc9ed2..089b1df4 100644 --- a/src/libs/common/algorithm/new_hash.cc +++ b/src/libs/common/algorithm/new_hash.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/new_hash.h b/src/libs/common/algorithm/new_hash.h index 17dfb2ce..8fa6b020 100644 --- a/src/libs/common/algorithm/new_hash.h +++ b/src/libs/common/algorithm/new_hash.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/non_copyable.h b/src/libs/common/algorithm/non_copyable.h index e0a97e0b..2aff9b3c 100644 --- a/src/libs/common/algorithm/non_copyable.h +++ b/src/libs/common/algorithm/non_copyable.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/relative_hour_calculator.h b/src/libs/common/algorithm/relative_hour_calculator.h index 656aa036..72c6be41 100644 --- a/src/libs/common/algorithm/relative_hour_calculator.h +++ b/src/libs/common/algorithm/relative_hour_calculator.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/singleton.h b/src/libs/common/algorithm/singleton.h index 4e48e06a..6c28b9b4 100644 --- a/src/libs/common/algorithm/singleton.h +++ b/src/libs/common/algorithm/singleton.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/algorithm/timestamp.h b/src/libs/common/algorithm/timestamp.h index 0ef61583..79105760 100644 --- a/src/libs/common/algorithm/timestamp.h +++ b/src/libs/common/algorithm/timestamp.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/atomic/atomic.h b/src/libs/common/atomic/atomic.h index b5766840..e2bb3f19 100644 --- a/src/libs/common/atomic/atomic.h +++ b/src/libs/common/atomic/atomic.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/atomic/atomic.hpp b/src/libs/common/atomic/atomic.hpp index 3a3d4e86..db51ab84 100644 --- a/src/libs/common/atomic/atomic.hpp +++ b/src/libs/common/atomic/atomic.hpp @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/atomic/atomic_asm.h b/src/libs/common/atomic/atomic_asm.h index 65b5dc41..d2a9c4d6 100644 --- a/src/libs/common/atomic/atomic_asm.h +++ b/src/libs/common/atomic/atomic_asm.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/atomic/atomic_asm8.h b/src/libs/common/atomic/atomic_asm8.h index f105c2f7..d02c2be0 100644 --- a/src/libs/common/atomic/atomic_asm8.h +++ b/src/libs/common/atomic/atomic_asm8.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/atomic/atomic_gcc.h b/src/libs/common/atomic/atomic_gcc.h index 48e5586c..fb9f42f9 100644 --- a/src/libs/common/atomic/atomic_gcc.h +++ b/src/libs/common/atomic/atomic_gcc.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/atomic/atomic_gcc8.h b/src/libs/common/atomic/atomic_gcc8.h index e6a1217f..7fcc2132 100644 --- a/src/libs/common/atomic/atomic_gcc8.h +++ b/src/libs/common/atomic/atomic_gcc8.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/blacklist/blacklist.cc b/src/libs/common/blacklist/blacklist.cc index 477a61a1..6cb2c19c 100644 --- a/src/libs/common/blacklist/blacklist.cc +++ b/src/libs/common/blacklist/blacklist.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/blacklist/blacklist.h b/src/libs/common/blacklist/blacklist.h index eaea6f45..209ca389 100644 --- a/src/libs/common/blacklist/blacklist.h +++ b/src/libs/common/blacklist/blacklist.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/blacklist/blacklist_unit.cc b/src/libs/common/blacklist/blacklist_unit.cc index efd645e2..3354c227 100644 --- a/src/libs/common/blacklist/blacklist_unit.cc +++ b/src/libs/common/blacklist/blacklist_unit.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/blacklist/blacklist_unit.h b/src/libs/common/blacklist/blacklist_unit.h index e5de48fc..92e67a84 100644 --- a/src/libs/common/blacklist/blacklist_unit.h +++ b/src/libs/common/blacklist/blacklist_unit.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/buffer.cc b/src/libs/common/buffer.cc index 2c8f7a0a..cd6fe800 100644 --- a/src/libs/common/buffer.cc +++ b/src/libs/common/buffer.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/buffer.h b/src/libs/common/buffer.h index 7c2e16d9..c330cab7 100644 --- a/src/libs/common/buffer.h +++ b/src/libs/common/buffer.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_async.cc b/src/libs/common/client/client_async.cc index b75ea9bb..c07ea1d6 100644 --- a/src/libs/common/client/client_async.cc +++ b/src/libs/common/client/client_async.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_async.h b/src/libs/common/client/client_async.h index 2f034318..b642b1a7 100644 --- a/src/libs/common/client/client_async.h +++ b/src/libs/common/client/client_async.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_dgram.cc b/src/libs/common/client/client_dgram.cc index e671a41f..f344579e 100644 --- a/src/libs/common/client/client_dgram.cc +++ b/src/libs/common/client/client_dgram.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_dgram.h b/src/libs/common/client/client_dgram.h index a90e14d3..ff2a3347 100644 --- a/src/libs/common/client/client_dgram.h +++ b/src/libs/common/client/client_dgram.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_resource_pool.cc b/src/libs/common/client/client_resource_pool.cc index 79b65812..4d5c7a32 100644 --- a/src/libs/common/client/client_resource_pool.cc +++ b/src/libs/common/client/client_resource_pool.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_resource_pool.h b/src/libs/common/client/client_resource_pool.h index 229a628e..0ceaa13c 100644 --- a/src/libs/common/client/client_resource_pool.h +++ b/src/libs/common/client/client_resource_pool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_sync.cc b/src/libs/common/client/client_sync.cc index efcbf351..1bcda134 100644 --- a/src/libs/common/client/client_sync.cc +++ b/src/libs/common/client/client_sync.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_sync.h b/src/libs/common/client/client_sync.h index 77e742dc..28d232a5 100644 --- a/src/libs/common/client/client_sync.h +++ b/src/libs/common/client/client_sync.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_unit.cc b/src/libs/common/client/client_unit.cc index aa5a11bd..c1644d38 100644 --- a/src/libs/common/client/client_unit.cc +++ b/src/libs/common/client/client_unit.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/client/client_unit.h b/src/libs/common/client/client_unit.h index bedb908b..4958d97e 100644 --- a/src/libs/common/client/client_unit.h +++ b/src/libs/common/client/client_unit.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/compiler.h b/src/libs/common/compiler.h index dfa3342b..4fe01cbb 100644 --- a/src/libs/common/compiler.h +++ b/src/libs/common/compiler.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/config/auto_config.cc b/src/libs/common/config/auto_config.cc index 28ec6eaf..54794be3 100644 --- a/src/libs/common/config/auto_config.cc +++ b/src/libs/common/config/auto_config.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/config/auto_config.h b/src/libs/common/config/auto_config.h index 04a56e47..02e897cb 100644 --- a/src/libs/common/config/auto_config.h +++ b/src/libs/common/config/auto_config.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/config/config.cc b/src/libs/common/config/config.cc index afea279f..8e0a6875 100644 --- a/src/libs/common/config/config.cc +++ b/src/libs/common/config/config.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/config/config.h b/src/libs/common/config/config.h index 728c1cfd..95d73f55 100644 --- a/src/libs/common/config/config.h +++ b/src/libs/common/config/config.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/config/dbconfig.cc b/src/libs/common/config/dbconfig.cc index 19f5f8ad..54e55f4c 100644 --- a/src/libs/common/config/dbconfig.cc +++ b/src/libs/common/config/dbconfig.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/config/dbconfig.h b/src/libs/common/config/dbconfig.h index 3259ac17..9e1ca98c 100644 --- a/src/libs/common/config/dbconfig.h +++ b/src/libs/common/config/dbconfig.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/config/dbconfig_tdef.cc b/src/libs/common/config/dbconfig_tdef.cc index 34e98475..4eaaba20 100644 --- a/src/libs/common/config/dbconfig_tdef.cc +++ b/src/libs/common/config/dbconfig_tdef.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/config/parse_cluster_config.cc b/src/libs/common/config/parse_cluster_config.cc index 1541f48e..488fd1a1 100644 --- a/src/libs/common/config/parse_cluster_config.cc +++ b/src/libs/common/config/parse_cluster_config.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/config/parse_cluster_config.h b/src/libs/common/config/parse_cluster_config.h index 01f757d0..17ad3122 100644 --- a/src/libs/common/config/parse_cluster_config.h +++ b/src/libs/common/config/parse_cluster_config.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/connector/connector_client.cc b/src/libs/common/connector/connector_client.cc index ab1f6f6f..4ff33ebf 100644 --- a/src/libs/common/connector/connector_client.cc +++ b/src/libs/common/connector/connector_client.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/connector/connector_client.h b/src/libs/common/connector/connector_client.h index 343eddc5..b1b0976e 100644 --- a/src/libs/common/connector/connector_client.h +++ b/src/libs/common/connector/connector_client.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/connector/connector_group.cc b/src/libs/common/connector/connector_group.cc index e8e09219..cd5dc26a 100644 --- a/src/libs/common/connector/connector_group.cc +++ b/src/libs/common/connector/connector_group.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/connector/connector_group.h b/src/libs/common/connector/connector_group.h index fb90fcba..9d9f6839 100644 --- a/src/libs/common/connector/connector_group.h +++ b/src/libs/common/connector/connector_group.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/consistent_hash_selector.cc b/src/libs/common/consistent_hash_selector.cc index a5c72a96..217d2f49 100644 --- a/src/libs/common/consistent_hash_selector.cc +++ b/src/libs/common/consistent_hash_selector.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/consistent_hash_selector.h b/src/libs/common/consistent_hash_selector.h index d7674510..c826f930 100644 --- a/src/libs/common/consistent_hash_selector.h +++ b/src/libs/common/consistent_hash_selector.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/container.h b/src/libs/common/container.h index 2a479ca8..1c489379 100644 --- a/src/libs/common/container.h +++ b/src/libs/common/container.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/daemon/daemon.cc b/src/libs/common/daemon/daemon.cc index 8dd4f0ef..a6dc6ff5 100644 --- a/src/libs/common/daemon/daemon.cc +++ b/src/libs/common/daemon/daemon.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/daemon/daemon.h b/src/libs/common/daemon/daemon.h index f6021e0d..8b0f69fb 100644 --- a/src/libs/common/daemon/daemon.h +++ b/src/libs/common/daemon/daemon.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/daemon/daemon_wait.cc b/src/libs/common/daemon/daemon_wait.cc index 1f6c1e2d..9d2f87bf 100644 --- a/src/libs/common/daemon/daemon_wait.cc +++ b/src/libs/common/daemon/daemon_wait.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/data_connector_ask_chain.cc b/src/libs/common/data_connector_ask_chain.cc index e42762ed..080b8049 100644 --- a/src/libs/common/data_connector_ask_chain.cc +++ b/src/libs/common/data_connector_ask_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/data_connector_ask_chain.h b/src/libs/common/data_connector_ask_chain.h index d7866aca..43f432d5 100644 --- a/src/libs/common/data_connector_ask_chain.h +++ b/src/libs/common/data_connector_ask_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/decode/decode.cc b/src/libs/common/decode/decode.cc index 4fccc01e..c911d55a 100644 --- a/src/libs/common/decode/decode.cc +++ b/src/libs/common/decode/decode.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/decode/decode.h b/src/libs/common/decode/decode.h index 02a2dd1b..c034cf66 100644 --- a/src/libs/common/decode/decode.h +++ b/src/libs/common/decode/decode.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/decode/decoder_base.cc b/src/libs/common/decode/decoder_base.cc index 686799f7..65f98d73 100644 --- a/src/libs/common/decode/decoder_base.cc +++ b/src/libs/common/decode/decoder_base.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/decode/decoder_base.h b/src/libs/common/decode/decoder_base.h index d960e8af..aa69f6d4 100644 --- a/src/libs/common/decode/decoder_base.h +++ b/src/libs/common/decode/decoder_base.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/dtc_error_code.h b/src/libs/common/dtc_error_code.h index 9b021724..f4f4476f 100644 --- a/src/libs/common/dtc_error_code.h +++ b/src/libs/common/dtc_error_code.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/dtc_global.cc b/src/libs/common/dtc_global.cc index 3001eb2b..7647783f 100644 --- a/src/libs/common/dtc_global.cc +++ b/src/libs/common/dtc_global.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/dtc_global.h b/src/libs/common/dtc_global.h index 9c78e2ea..5efa240b 100644 --- a/src/libs/common/dtc_global.h +++ b/src/libs/common/dtc_global.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/dtcutils.h b/src/libs/common/dtcutils.h index b0737173..b5f9cbe0 100644 --- a/src/libs/common/dtcutils.h +++ b/src/libs/common/dtcutils.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/encode.cc b/src/libs/common/encode.cc index 623c688e..338c4e68 100644 --- a/src/libs/common/encode.cc +++ b/src/libs/common/encode.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/field/field.cc b/src/libs/common/field/field.cc index a7d82c28..24a1c37d 100644 --- a/src/libs/common/field/field.cc +++ b/src/libs/common/field/field.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/field/field.h b/src/libs/common/field/field.h index 6a4cb96f..63f776bd 100644 --- a/src/libs/common/field/field.h +++ b/src/libs/common/field/field.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/field/field_api.cc b/src/libs/common/field/field_api.cc index 464bb1f4..49793216 100644 --- a/src/libs/common/field/field_api.cc +++ b/src/libs/common/field/field_api.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/field/field_api.h b/src/libs/common/field/field_api.h index 61f50c0a..403ed2e0 100644 --- a/src/libs/common/field/field_api.h +++ b/src/libs/common/field/field_api.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/field/field_export.h b/src/libs/common/field/field_export.h index 9f203316..d528c217 100644 --- a/src/libs/common/field/field_export.h +++ b/src/libs/common/field/field_export.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/file_backed_key_set.cc b/src/libs/common/file_backed_key_set.cc index 2a88edaf..707f4457 100644 --- a/src/libs/common/file_backed_key_set.cc +++ b/src/libs/common/file_backed_key_set.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/file_backed_key_set.h b/src/libs/common/file_backed_key_set.h index 425104ae..97705c7b 100644 --- a/src/libs/common/file_backed_key_set.h +++ b/src/libs/common/file_backed_key_set.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/hotback_task.cc b/src/libs/common/hotback_task.cc index 38df5c93..0bada444 100644 --- a/src/libs/common/hotback_task.cc +++ b/src/libs/common/hotback_task.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/hotback_task.h b/src/libs/common/hotback_task.h index 4fabb392..273de3b8 100644 --- a/src/libs/common/hotback_task.h +++ b/src/libs/common/hotback_task.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/interface.h b/src/libs/common/interface.h index a1e6a258..8140463a 100644 --- a/src/libs/common/interface.h +++ b/src/libs/common/interface.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/job_entrance_ask_chain.cc b/src/libs/common/job_entrance_ask_chain.cc index 9bc3ab69..b6d24059 100644 --- a/src/libs/common/job_entrance_ask_chain.cc +++ b/src/libs/common/job_entrance_ask_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/job_entrance_ask_chain.h b/src/libs/common/job_entrance_ask_chain.h index 3fee03d6..5bf79625 100644 --- a/src/libs/common/job_entrance_ask_chain.h +++ b/src/libs/common/job_entrance_ask_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/journal_id.h b/src/libs/common/journal_id.h index 8299a20f..979b9570 100644 --- a/src/libs/common/journal_id.h +++ b/src/libs/common/journal_id.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/key/key_helper.cc b/src/libs/common/key/key_helper.cc index ecadfab2..46df4703 100644 --- a/src/libs/common/key/key_helper.cc +++ b/src/libs/common/key/key_helper.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/key/key_helper.h b/src/libs/common/key/key_helper.h index 7f8ce2b1..661b0dfa 100644 --- a/src/libs/common/key/key_helper.h +++ b/src/libs/common/key/key_helper.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/key/key_route_ask_chain.cc b/src/libs/common/key/key_route_ask_chain.cc index eddb98d5..612ec705 100644 --- a/src/libs/common/key/key_route_ask_chain.cc +++ b/src/libs/common/key/key_route_ask_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/key/key_route_ask_chain.h b/src/libs/common/key/key_route_ask_chain.h index 7425e9b3..745d4047 100644 --- a/src/libs/common/key/key_route_ask_chain.h +++ b/src/libs/common/key/key_route_ask_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/key/keycodec.h b/src/libs/common/key/keycodec.h index 8a50b04c..b45611ee 100644 --- a/src/libs/common/key/keycodec.h +++ b/src/libs/common/key/keycodec.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/list/hlist.h b/src/libs/common/list/hlist.h index 611d2807..f08a0709 100644 --- a/src/libs/common/list/hlist.h +++ b/src/libs/common/list/hlist.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/list/list.h b/src/libs/common/list/list.h index 5f7890ce..5077f8bb 100644 --- a/src/libs/common/list/list.h +++ b/src/libs/common/list/list.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/listener/listener.cc b/src/libs/common/listener/listener.cc index 2c7c23e3..c6405caf 100644 --- a/src/libs/common/listener/listener.cc +++ b/src/libs/common/listener/listener.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/listener/listener.h b/src/libs/common/listener/listener.h index d6117ec0..536da483 100644 --- a/src/libs/common/listener/listener.h +++ b/src/libs/common/listener/listener.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/listener/listener_bind.cc b/src/libs/common/listener/listener_bind.cc index a6eca8cd..c365950a 100644 --- a/src/libs/common/listener/listener_bind.cc +++ b/src/libs/common/listener/listener_bind.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/listener/listener_pool.cc b/src/libs/common/listener/listener_pool.cc index 2ed19533..678ad8d3 100644 --- a/src/libs/common/listener/listener_pool.cc +++ b/src/libs/common/listener/listener_pool.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/listener/listener_pool.h b/src/libs/common/listener/listener_pool.h index 99c2397d..6f1a9506 100644 --- a/src/libs/common/listener/listener_pool.h +++ b/src/libs/common/listener/listener_pool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/localip.c b/src/libs/common/localip.c index 759bf25d..21f190ad 100644 --- a/src/libs/common/localip.c +++ b/src/libs/common/localip.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/lock/lock.h b/src/libs/common/lock/lock.h index fd51cd61..25bf55f8 100644 --- a/src/libs/common/lock/lock.h +++ b/src/libs/common/lock/lock.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/lock/lock_free_queue.h b/src/libs/common/lock/lock_free_queue.h index c1b80a7f..251cf49f 100644 --- a/src/libs/common/lock/lock_free_queue.h +++ b/src/libs/common/lock/lock_free_queue.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/lock/lock_free_queue_imp.h b/src/libs/common/lock/lock_free_queue_imp.h index ae4cf7d9..dabed048 100644 --- a/src/libs/common/lock/lock_free_queue_imp.h +++ b/src/libs/common/lock/lock_free_queue_imp.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/lock/system_lock.cc b/src/libs/common/lock/system_lock.cc index bc72539a..a9c62275 100644 --- a/src/libs/common/lock/system_lock.cc +++ b/src/libs/common/lock/system_lock.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/lock/system_lock.h b/src/libs/common/lock/system_lock.h index 50f2f0f2..a5733b57 100644 --- a/src/libs/common/lock/system_lock.h +++ b/src/libs/common/lock/system_lock.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/log/log.cc b/src/libs/common/log/log.cc index 3c584b05..64697719 100644 --- a/src/libs/common/log/log.cc +++ b/src/libs/common/log/log.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/log/log.h b/src/libs/common/log/log.h index 51c13ede..49250fd3 100644 --- a/src/libs/common/log/log.h +++ b/src/libs/common/log/log.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/mem_check.cc b/src/libs/common/mem_check.cc index 5470912d..a8c08322 100644 --- a/src/libs/common/mem_check.cc +++ b/src/libs/common/mem_check.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/mem_check.h b/src/libs/common/mem_check.h index 4c8b4e68..8191b92e 100644 --- a/src/libs/common/mem_check.h +++ b/src/libs/common/mem_check.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/multi_request.cc b/src/libs/common/multi_request.cc index eb345a04..9d19557d 100644 --- a/src/libs/common/multi_request.cc +++ b/src/libs/common/multi_request.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/multi_request.h b/src/libs/common/multi_request.h index 3adb732c..c6a4dfb3 100644 --- a/src/libs/common/multi_request.h +++ b/src/libs/common/multi_request.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/my/my_comm.h b/src/libs/common/my/my_comm.h index 8e361ae2..13eec352 100644 --- a/src/libs/common/my/my_comm.h +++ b/src/libs/common/my/my_comm.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/my/my_request.h b/src/libs/common/my/my_request.h index 773dac3c..0d11ad44 100644 --- a/src/libs/common/my/my_request.h +++ b/src/libs/common/my/my_request.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/namespace.h b/src/libs/common/namespace.h index bde3daef..02eb3603 100644 --- a/src/libs/common/namespace.h +++ b/src/libs/common/namespace.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/packet/packet.h b/src/libs/common/packet/packet.h index 1e02657e..f9f61899 100644 --- a/src/libs/common/packet/packet.h +++ b/src/libs/common/packet/packet.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/packet/packet_base.cc b/src/libs/common/packet/packet_base.cc index 14fa1b1a..f948922d 100644 --- a/src/libs/common/packet/packet_base.cc +++ b/src/libs/common/packet/packet_base.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/packet/packet_client.cc b/src/libs/common/packet/packet_client.cc index f0aadecf..aee94b61 100644 --- a/src/libs/common/packet/packet_client.cc +++ b/src/libs/common/packet/packet_client.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/packet/packet_result.cc b/src/libs/common/packet/packet_result.cc index 3f2e9b20..6169f535 100644 --- a/src/libs/common/packet/packet_result.cc +++ b/src/libs/common/packet/packet_result.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/packet/packet_server.cc b/src/libs/common/packet/packet_server.cc index 4becf445..785e83be 100644 --- a/src/libs/common/packet/packet_server.cc +++ b/src/libs/common/packet/packet_server.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/pipequeue.h b/src/libs/common/pipequeue.h index 28b9453f..60835940 100644 --- a/src/libs/common/pipequeue.h +++ b/src/libs/common/pipequeue.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/pipetask.h b/src/libs/common/pipetask.h index 90a72d44..eda4aaca 100644 --- a/src/libs/common/pipetask.h +++ b/src/libs/common/pipetask.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_agent_mgr.h b/src/libs/common/plugin/plugin_agent_mgr.h index 976d4e2b..0f033e7a 100644 --- a/src/libs/common/plugin/plugin_agent_mgr.h +++ b/src/libs/common/plugin/plugin_agent_mgr.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_decoder.cc b/src/libs/common/plugin/plugin_decoder.cc index 2f3278e8..4efc83f3 100644 --- a/src/libs/common/plugin/plugin_decoder.cc +++ b/src/libs/common/plugin/plugin_decoder.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_decoder.h b/src/libs/common/plugin/plugin_decoder.h index 9aa28066..d92eacdf 100644 --- a/src/libs/common/plugin/plugin_decoder.h +++ b/src/libs/common/plugin/plugin_decoder.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_dgram.cc b/src/libs/common/plugin/plugin_dgram.cc index 66793aa5..0ecda849 100644 --- a/src/libs/common/plugin/plugin_dgram.cc +++ b/src/libs/common/plugin/plugin_dgram.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_dgram.h b/src/libs/common/plugin/plugin_dgram.h index dcec315d..552ce304 100644 --- a/src/libs/common/plugin/plugin_dgram.h +++ b/src/libs/common/plugin/plugin_dgram.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_global.cc b/src/libs/common/plugin/plugin_global.cc index 0550054f..6c24773b 100644 --- a/src/libs/common/plugin/plugin_global.cc +++ b/src/libs/common/plugin/plugin_global.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_global.h b/src/libs/common/plugin/plugin_global.h index ff21c856..9ac838ab 100644 --- a/src/libs/common/plugin/plugin_global.h +++ b/src/libs/common/plugin/plugin_global.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_listener_pool.cc b/src/libs/common/plugin/plugin_listener_pool.cc index b1d50220..fefd9639 100644 --- a/src/libs/common/plugin/plugin_listener_pool.cc +++ b/src/libs/common/plugin/plugin_listener_pool.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_listener_pool.h b/src/libs/common/plugin/plugin_listener_pool.h index 7c3c4752..0057312b 100644 --- a/src/libs/common/plugin/plugin_listener_pool.h +++ b/src/libs/common/plugin/plugin_listener_pool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_mgr.cc b/src/libs/common/plugin/plugin_mgr.cc index 166668a1..86fae877 100644 --- a/src/libs/common/plugin/plugin_mgr.cc +++ b/src/libs/common/plugin/plugin_mgr.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_mgr.h b/src/libs/common/plugin/plugin_mgr.h index c3e831af..41fe1e74 100644 --- a/src/libs/common/plugin/plugin_mgr.h +++ b/src/libs/common/plugin/plugin_mgr.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_proxy_listener_pool.cc b/src/libs/common/plugin/plugin_proxy_listener_pool.cc index 80586e2f..3edc12a7 100644 --- a/src/libs/common/plugin/plugin_proxy_listener_pool.cc +++ b/src/libs/common/plugin/plugin_proxy_listener_pool.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_proxy_listener_pool.h b/src/libs/common/plugin/plugin_proxy_listener_pool.h index dd1c7cb1..aad8fcf6 100644 --- a/src/libs/common/plugin/plugin_proxy_listener_pool.h +++ b/src/libs/common/plugin/plugin_proxy_listener_pool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_proxy_mgr.cc b/src/libs/common/plugin/plugin_proxy_mgr.cc index c95cedb8..34a176ec 100644 --- a/src/libs/common/plugin/plugin_proxy_mgr.cc +++ b/src/libs/common/plugin/plugin_proxy_mgr.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_request.cc b/src/libs/common/plugin/plugin_request.cc index 00441f32..24321393 100644 --- a/src/libs/common/plugin/plugin_request.cc +++ b/src/libs/common/plugin/plugin_request.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_request.h b/src/libs/common/plugin/plugin_request.h index a96dd565..b3c5032c 100644 --- a/src/libs/common/plugin/plugin_request.h +++ b/src/libs/common/plugin/plugin_request.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_sync.cc b/src/libs/common/plugin/plugin_sync.cc index 89bcd44c..84024068 100644 --- a/src/libs/common/plugin/plugin_sync.cc +++ b/src/libs/common/plugin/plugin_sync.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_sync.h b/src/libs/common/plugin/plugin_sync.h index 9ff3207f..3f409f00 100644 --- a/src/libs/common/plugin/plugin_sync.h +++ b/src/libs/common/plugin/plugin_sync.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_timer.cc b/src/libs/common/plugin/plugin_timer.cc index 9c809da8..837d59b3 100644 --- a/src/libs/common/plugin/plugin_timer.cc +++ b/src/libs/common/plugin/plugin_timer.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_timer.h b/src/libs/common/plugin/plugin_timer.h index bb7c2678..7f6f3f29 100644 --- a/src/libs/common/plugin/plugin_timer.h +++ b/src/libs/common/plugin/plugin_timer.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_unit.cc b/src/libs/common/plugin/plugin_unit.cc index 74fde129..ab2d8688 100644 --- a/src/libs/common/plugin/plugin_unit.cc +++ b/src/libs/common/plugin/plugin_unit.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_unit.h b/src/libs/common/plugin/plugin_unit.h index 6f540659..11ce528d 100644 --- a/src/libs/common/plugin/plugin_unit.h +++ b/src/libs/common/plugin/plugin_unit.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_worker.cc b/src/libs/common/plugin/plugin_worker.cc index d9d56336..ff22dac8 100644 --- a/src/libs/common/plugin/plugin_worker.cc +++ b/src/libs/common/plugin/plugin_worker.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/plugin/plugin_worker.h b/src/libs/common/plugin/plugin_worker.h index 2be8f5a0..2c31adfc 100644 --- a/src/libs/common/plugin/plugin_worker.h +++ b/src/libs/common/plugin/plugin_worker.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/poll/myepoll.h b/src/libs/common/poll/myepoll.h index d8847e88..39e7ccb1 100644 --- a/src/libs/common/poll/myepoll.h +++ b/src/libs/common/poll/myepoll.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/poll/poll_thread_group.cc b/src/libs/common/poll/poll_thread_group.cc index 68bd4f84..e1b8e4c9 100644 --- a/src/libs/common/poll/poll_thread_group.cc +++ b/src/libs/common/poll/poll_thread_group.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/poll/poll_thread_group.h b/src/libs/common/poll/poll_thread_group.h index de9c094b..e730eae3 100644 --- a/src/libs/common/poll/poll_thread_group.h +++ b/src/libs/common/poll/poll_thread_group.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/poll/poller.cc b/src/libs/common/poll/poller.cc index dbc40997..465c9530 100644 --- a/src/libs/common/poll/poller.cc +++ b/src/libs/common/poll/poller.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/poll/poller.h b/src/libs/common/poll/poller.h index b622aec8..4390cbf7 100644 --- a/src/libs/common/poll/poller.h +++ b/src/libs/common/poll/poller.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/poll/poller_base.cc b/src/libs/common/poll/poller_base.cc index fc97ece5..d236c72f 100644 --- a/src/libs/common/poll/poller_base.cc +++ b/src/libs/common/poll/poller_base.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/poll/poller_base.h b/src/libs/common/poll/poller_base.h index 07dceb70..cc90d6e6 100644 --- a/src/libs/common/poll/poller_base.h +++ b/src/libs/common/poll/poller_base.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/proc_title.c b/src/libs/common/proc_title.c index ebc33a6c..ed40c09e 100644 --- a/src/libs/common/proc_title.c +++ b/src/libs/common/proc_title.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/proc_title.h b/src/libs/common/proc_title.h index 9d2dc88a..dc411542 100644 --- a/src/libs/common/proc_title.h +++ b/src/libs/common/proc_title.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/protocol.h b/src/libs/common/protocol.h index d337c010..4ebc28bb 100644 --- a/src/libs/common/protocol.h +++ b/src/libs/common/protocol.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/queue/lqueue.h b/src/libs/common/queue/lqueue.h index cfb12236..f43cf317 100644 --- a/src/libs/common/queue/lqueue.h +++ b/src/libs/common/queue/lqueue.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/queue/mtpqueue.h b/src/libs/common/queue/mtpqueue.h index 2fb89e92..cd27d1b2 100644 --- a/src/libs/common/queue/mtpqueue.h +++ b/src/libs/common/queue/mtpqueue.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/queue/mtpqueue_nolock.h b/src/libs/common/queue/mtpqueue_nolock.h index db820bc9..cd0aa5f0 100644 --- a/src/libs/common/queue/mtpqueue_nolock.h +++ b/src/libs/common/queue/mtpqueue_nolock.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/queue/wait_queue.h b/src/libs/common/queue/wait_queue.h index deaa62ac..61138d56 100644 --- a/src/libs/common/queue/wait_queue.h +++ b/src/libs/common/queue/wait_queue.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/receiver.h b/src/libs/common/receiver.h index 0061c214..6381a641 100644 --- a/src/libs/common/receiver.h +++ b/src/libs/common/receiver.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/remote_dtc_ask_answer_chain.cc b/src/libs/common/remote_dtc_ask_answer_chain.cc index 13dc8bc5..a8db1773 100644 --- a/src/libs/common/remote_dtc_ask_answer_chain.cc +++ b/src/libs/common/remote_dtc_ask_answer_chain.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/remote_dtc_ask_answer_chain.h b/src/libs/common/remote_dtc_ask_answer_chain.h index 06b11586..9a26e660 100644 --- a/src/libs/common/remote_dtc_ask_answer_chain.h +++ b/src/libs/common/remote_dtc_ask_answer_chain.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/request/request_base.h b/src/libs/common/request/request_base.h index 4e3c2711..2b2163bc 100644 --- a/src/libs/common/request/request_base.h +++ b/src/libs/common/request/request_base.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/request/request_base_all.h b/src/libs/common/request/request_base_all.h index b0f79ef9..642cc500 100644 --- a/src/libs/common/request/request_base_all.h +++ b/src/libs/common/request/request_base_all.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/request/request_threading.h b/src/libs/common/request/request_threading.h index 80d044ec..36d082fb 100644 --- a/src/libs/common/request/request_threading.h +++ b/src/libs/common/request/request_threading.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/result.h b/src/libs/common/result.h index c2b76b8d..f78a74a0 100644 --- a/src/libs/common/result.h +++ b/src/libs/common/result.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/section.cc b/src/libs/common/section.cc index a84a37e4..57e053ff 100644 --- a/src/libs/common/section.cc +++ b/src/libs/common/section.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/section.h b/src/libs/common/section.h index ecd73d56..084e6924 100644 --- a/src/libs/common/section.h +++ b/src/libs/common/section.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/shmem.cc b/src/libs/common/shmem.cc index 3326f78a..2f96d152 100644 --- a/src/libs/common/shmem.cc +++ b/src/libs/common/shmem.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/shmem.h b/src/libs/common/shmem.h index 5881a1d4..b2c59443 100644 --- a/src/libs/common/shmem.h +++ b/src/libs/common/shmem.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/socket/socket_addr.cc b/src/libs/common/socket/socket_addr.cc index d7729d99..183994f0 100644 --- a/src/libs/common/socket/socket_addr.cc +++ b/src/libs/common/socket/socket_addr.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/socket/socket_addr.h b/src/libs/common/socket/socket_addr.h index de35dd06..ed862fb7 100644 --- a/src/libs/common/socket/socket_addr.h +++ b/src/libs/common/socket/socket_addr.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/socket/socket_bind.cc b/src/libs/common/socket/socket_bind.cc index 2f1db79e..0ba3ad6f 100644 --- a/src/libs/common/socket/socket_bind.cc +++ b/src/libs/common/socket/socket_bind.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/socket/unix_socket.h b/src/libs/common/socket/unix_socket.h index de48dd99..609fcc0e 100644 --- a/src/libs/common/socket/unix_socket.h +++ b/src/libs/common/socket/unix_socket.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/stop_watch.h b/src/libs/common/stop_watch.h index ee0c6823..9f6fba1d 100644 --- a/src/libs/common/stop_watch.h +++ b/src/libs/common/stop_watch.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/table/hotbackup_table_def.cc b/src/libs/common/table/hotbackup_table_def.cc index ad392a68..426d6331 100644 --- a/src/libs/common/table/hotbackup_table_def.cc +++ b/src/libs/common/table/hotbackup_table_def.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/table/hotbackup_table_def.h b/src/libs/common/table/hotbackup_table_def.h index e3c6258c..ef343926 100644 --- a/src/libs/common/table/hotbackup_table_def.h +++ b/src/libs/common/table/hotbackup_table_def.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/table/table_def.cc b/src/libs/common/table/table_def.cc index cb991c75..24321a9a 100644 --- a/src/libs/common/table/table_def.cc +++ b/src/libs/common/table/table_def.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/table/table_def.h b/src/libs/common/table/table_def.h index de2d716f..813e7cb4 100644 --- a/src/libs/common/table/table_def.h +++ b/src/libs/common/table/table_def.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/table/table_def_manager.cc b/src/libs/common/table/table_def_manager.cc index 94e86100..b6bd8645 100644 --- a/src/libs/common/table/table_def_manager.cc +++ b/src/libs/common/table/table_def_manager.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/table/table_def_manager.h b/src/libs/common/table/table_def_manager.h index 96d651d1..f401a818 100644 --- a/src/libs/common/table/table_def_manager.h +++ b/src/libs/common/table/table_def_manager.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_api.cc b/src/libs/common/task/task_api.cc index 1a591ff0..1f2bc8c0 100644 --- a/src/libs/common/task/task_api.cc +++ b/src/libs/common/task/task_api.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_base.cc b/src/libs/common/task/task_base.cc index 6d3d75db..947c6b39 100644 --- a/src/libs/common/task/task_base.cc +++ b/src/libs/common/task/task_base.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_base.h b/src/libs/common/task/task_base.h index 344b1aa3..8e29c743 100644 --- a/src/libs/common/task/task_base.h +++ b/src/libs/common/task/task_base.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_const.cc b/src/libs/common/task/task_const.cc index b4d960c1..29ff9a82 100644 --- a/src/libs/common/task/task_const.cc +++ b/src/libs/common/task/task_const.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_copy.cc b/src/libs/common/task/task_copy.cc index 2da42783..522e578a 100644 --- a/src/libs/common/task/task_copy.cc +++ b/src/libs/common/task/task_copy.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_multi_unit.cc b/src/libs/common/task/task_multi_unit.cc index 516d2fd4..d83ba3fd 100644 --- a/src/libs/common/task/task_multi_unit.cc +++ b/src/libs/common/task/task_multi_unit.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_multi_unit.h b/src/libs/common/task/task_multi_unit.h index 8b99a95c..e073e35e 100644 --- a/src/libs/common/task/task_multi_unit.h +++ b/src/libs/common/task/task_multi_unit.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_pkey.cc b/src/libs/common/task/task_pkey.cc index c072467c..acec7c65 100644 --- a/src/libs/common/task/task_pkey.cc +++ b/src/libs/common/task/task_pkey.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_pkey.h b/src/libs/common/task/task_pkey.h index 3f1c65be..25161f1d 100644 --- a/src/libs/common/task/task_pkey.h +++ b/src/libs/common/task/task_pkey.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_request.cc b/src/libs/common/task/task_request.cc index acc62ad8..bd78a8f5 100644 --- a/src/libs/common/task/task_request.cc +++ b/src/libs/common/task/task_request.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_request.h b/src/libs/common/task/task_request.h index 90c331e6..308f2935 100644 --- a/src/libs/common/task/task_request.h +++ b/src/libs/common/task/task_request.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/task/task_server.cc b/src/libs/common/task/task_server.cc index e194d4fd..2907f8ec 100644 --- a/src/libs/common/task/task_server.cc +++ b/src/libs/common/task/task_server.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/thread/thread.cc b/src/libs/common/thread/thread.cc index 1e89160e..8f227290 100644 --- a/src/libs/common/thread/thread.cc +++ b/src/libs/common/thread/thread.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/thread/thread.h b/src/libs/common/thread/thread.h index 17c7e9ea..b4d7ee32 100644 --- a/src/libs/common/thread/thread.h +++ b/src/libs/common/thread/thread.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/thread/thread_cpu_stat.cc b/src/libs/common/thread/thread_cpu_stat.cc index 87119794..f5d93951 100644 --- a/src/libs/common/thread/thread_cpu_stat.cc +++ b/src/libs/common/thread/thread_cpu_stat.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/thread/thread_cpu_stat.h b/src/libs/common/thread/thread_cpu_stat.h index 37faf23d..66a8adff 100644 --- a/src/libs/common/thread/thread_cpu_stat.h +++ b/src/libs/common/thread/thread_cpu_stat.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/timer/timer_list.cc b/src/libs/common/timer/timer_list.cc index c5b69184..9f01ad84 100644 --- a/src/libs/common/timer/timer_list.cc +++ b/src/libs/common/timer/timer_list.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/timer/timer_list.h b/src/libs/common/timer/timer_list.h index bed5af22..43c9f4a5 100644 --- a/src/libs/common/timer/timer_list.h +++ b/src/libs/common/timer/timer_list.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/value.c b/src/libs/common/value.c index d7799578..a349ee8a 100644 --- a/src/libs/common/value.c +++ b/src/libs/common/value.c @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/value.h b/src/libs/common/value.h index 0bbb5edc..275937a9 100644 --- a/src/libs/common/value.h +++ b/src/libs/common/value.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/version.cc b/src/libs/common/version.cc index b9f58d5f..18a616f9 100644 --- a/src/libs/common/version.cc +++ b/src/libs/common/version.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/common/version.h b/src/libs/common/version.h index 4b143bd2..f65df8a2 100644 --- a/src/libs/common/version.h +++ b/src/libs/common/version.h @@ -1,5 +1,5 @@ /* - * Copyright [2021] JD.com, Inc. + * Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/advanced_options.h b/src/libs/rocksdb/include/rocksdb/advanced_options.h index 703334d7..cbb67656 100644 --- a/src/libs/rocksdb/include/rocksdb/advanced_options.h +++ b/src/libs/rocksdb/include/rocksdb/advanced_options.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/c.h b/src/libs/rocksdb/include/rocksdb/c.h index fd096095..efa69424 100644 --- a/src/libs/rocksdb/include/rocksdb/c.h +++ b/src/libs/rocksdb/include/rocksdb/c.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/cache.h b/src/libs/rocksdb/include/rocksdb/cache.h index 112fa95b..ee7e5244 100644 --- a/src/libs/rocksdb/include/rocksdb/cache.h +++ b/src/libs/rocksdb/include/rocksdb/cache.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/cleanable.h b/src/libs/rocksdb/include/rocksdb/cleanable.h index f591cf4f..2185368b 100644 --- a/src/libs/rocksdb/include/rocksdb/cleanable.h +++ b/src/libs/rocksdb/include/rocksdb/cleanable.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/compaction_filter.h b/src/libs/rocksdb/include/rocksdb/compaction_filter.h index 786f4c7b..ee674254 100644 --- a/src/libs/rocksdb/include/rocksdb/compaction_filter.h +++ b/src/libs/rocksdb/include/rocksdb/compaction_filter.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/compaction_job_stats.h b/src/libs/rocksdb/include/rocksdb/compaction_job_stats.h index 7308dc67..5f3a9faf 100644 --- a/src/libs/rocksdb/include/rocksdb/compaction_job_stats.h +++ b/src/libs/rocksdb/include/rocksdb/compaction_job_stats.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/comparator.h b/src/libs/rocksdb/include/rocksdb/comparator.h index 563bbe9b..9747339a 100644 --- a/src/libs/rocksdb/include/rocksdb/comparator.h +++ b/src/libs/rocksdb/include/rocksdb/comparator.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/concurrent_task_limiter.h b/src/libs/rocksdb/include/rocksdb/concurrent_task_limiter.h index a5a5de98..db30a718 100644 --- a/src/libs/rocksdb/include/rocksdb/concurrent_task_limiter.h +++ b/src/libs/rocksdb/include/rocksdb/concurrent_task_limiter.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/convenience.h b/src/libs/rocksdb/include/rocksdb/convenience.h index d5fa4c27..cb4b9936 100644 --- a/src/libs/rocksdb/include/rocksdb/convenience.h +++ b/src/libs/rocksdb/include/rocksdb/convenience.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/db.h b/src/libs/rocksdb/include/rocksdb/db.h index 1acbac08..bd90aaaa 100644 --- a/src/libs/rocksdb/include/rocksdb/db.h +++ b/src/libs/rocksdb/include/rocksdb/db.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/db_bench_tool.h b/src/libs/rocksdb/include/rocksdb/db_bench_tool.h index 16d4a2be..0610b598 100644 --- a/src/libs/rocksdb/include/rocksdb/db_bench_tool.h +++ b/src/libs/rocksdb/include/rocksdb/db_bench_tool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/db_dump_tool.h b/src/libs/rocksdb/include/rocksdb/db_dump_tool.h index 7932f287..4c7c8d67 100644 --- a/src/libs/rocksdb/include/rocksdb/db_dump_tool.h +++ b/src/libs/rocksdb/include/rocksdb/db_dump_tool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/db_stress_tool.h b/src/libs/rocksdb/include/rocksdb/db_stress_tool.h index a9e9e570..d4a3b376 100644 --- a/src/libs/rocksdb/include/rocksdb/db_stress_tool.h +++ b/src/libs/rocksdb/include/rocksdb/db_stress_tool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/env.h b/src/libs/rocksdb/include/rocksdb/env.h index cc465828..9fc337c0 100644 --- a/src/libs/rocksdb/include/rocksdb/env.h +++ b/src/libs/rocksdb/include/rocksdb/env.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/env_encryption.h b/src/libs/rocksdb/include/rocksdb/env_encryption.h index fc9c0399..bab77197 100644 --- a/src/libs/rocksdb/include/rocksdb/env_encryption.h +++ b/src/libs/rocksdb/include/rocksdb/env_encryption.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/experimental.h b/src/libs/rocksdb/include/rocksdb/experimental.h index e516bb76..b92c6b26 100644 --- a/src/libs/rocksdb/include/rocksdb/experimental.h +++ b/src/libs/rocksdb/include/rocksdb/experimental.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/filter_policy.h b/src/libs/rocksdb/include/rocksdb/filter_policy.h index 85d95ff9..b5735ff7 100644 --- a/src/libs/rocksdb/include/rocksdb/filter_policy.h +++ b/src/libs/rocksdb/include/rocksdb/filter_policy.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/flush_block_policy.h b/src/libs/rocksdb/include/rocksdb/flush_block_policy.h index 7ed26cd3..3eca219a 100644 --- a/src/libs/rocksdb/include/rocksdb/flush_block_policy.h +++ b/src/libs/rocksdb/include/rocksdb/flush_block_policy.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/iostats_context.h b/src/libs/rocksdb/include/rocksdb/iostats_context.h index 3b2310f2..f750eb9b 100644 --- a/src/libs/rocksdb/include/rocksdb/iostats_context.h +++ b/src/libs/rocksdb/include/rocksdb/iostats_context.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/iterator.h b/src/libs/rocksdb/include/rocksdb/iterator.h index 6af8876e..2908347c 100644 --- a/src/libs/rocksdb/include/rocksdb/iterator.h +++ b/src/libs/rocksdb/include/rocksdb/iterator.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/ldb_tool.h b/src/libs/rocksdb/include/rocksdb/ldb_tool.h index 2e1b35dd..47d06fb4 100644 --- a/src/libs/rocksdb/include/rocksdb/ldb_tool.h +++ b/src/libs/rocksdb/include/rocksdb/ldb_tool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/listener.h b/src/libs/rocksdb/include/rocksdb/listener.h index b8ea84f0..ee148cd6 100644 --- a/src/libs/rocksdb/include/rocksdb/listener.h +++ b/src/libs/rocksdb/include/rocksdb/listener.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/memory_allocator.h b/src/libs/rocksdb/include/rocksdb/memory_allocator.h index 4a82e6f5..48d10090 100644 --- a/src/libs/rocksdb/include/rocksdb/memory_allocator.h +++ b/src/libs/rocksdb/include/rocksdb/memory_allocator.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/memtablerep.h b/src/libs/rocksdb/include/rocksdb/memtablerep.h index cc543643..98100e23 100644 --- a/src/libs/rocksdb/include/rocksdb/memtablerep.h +++ b/src/libs/rocksdb/include/rocksdb/memtablerep.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/merge_operator.h b/src/libs/rocksdb/include/rocksdb/merge_operator.h index 96b7bfbd..1e9995d2 100644 --- a/src/libs/rocksdb/include/rocksdb/merge_operator.h +++ b/src/libs/rocksdb/include/rocksdb/merge_operator.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/metadata.h b/src/libs/rocksdb/include/rocksdb/metadata.h index 3e963df2..2cadf7c3 100644 --- a/src/libs/rocksdb/include/rocksdb/metadata.h +++ b/src/libs/rocksdb/include/rocksdb/metadata.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/options.h b/src/libs/rocksdb/include/rocksdb/options.h index f3aa7948..1d4a3b02 100644 --- a/src/libs/rocksdb/include/rocksdb/options.h +++ b/src/libs/rocksdb/include/rocksdb/options.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/perf_context.h b/src/libs/rocksdb/include/rocksdb/perf_context.h index 7c8885ec..d5ad8122 100644 --- a/src/libs/rocksdb/include/rocksdb/perf_context.h +++ b/src/libs/rocksdb/include/rocksdb/perf_context.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/perf_level.h b/src/libs/rocksdb/include/rocksdb/perf_level.h index dce10277..2196a29e 100644 --- a/src/libs/rocksdb/include/rocksdb/perf_level.h +++ b/src/libs/rocksdb/include/rocksdb/perf_level.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/persistent_cache.h b/src/libs/rocksdb/include/rocksdb/persistent_cache.h index 6165779f..9816c9ae 100644 --- a/src/libs/rocksdb/include/rocksdb/persistent_cache.h +++ b/src/libs/rocksdb/include/rocksdb/persistent_cache.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/rate_limiter.h b/src/libs/rocksdb/include/rocksdb/rate_limiter.h index 7a3bdf53..3ae25a99 100644 --- a/src/libs/rocksdb/include/rocksdb/rate_limiter.h +++ b/src/libs/rocksdb/include/rocksdb/rate_limiter.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/slice.h b/src/libs/rocksdb/include/rocksdb/slice.h index e9ede31c..b3955956 100644 --- a/src/libs/rocksdb/include/rocksdb/slice.h +++ b/src/libs/rocksdb/include/rocksdb/slice.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/slice_transform.h b/src/libs/rocksdb/include/rocksdb/slice_transform.h index 103832e6..530c1390 100644 --- a/src/libs/rocksdb/include/rocksdb/slice_transform.h +++ b/src/libs/rocksdb/include/rocksdb/slice_transform.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/snapshot.h b/src/libs/rocksdb/include/rocksdb/snapshot.h index eccc9c70..e5164a43 100644 --- a/src/libs/rocksdb/include/rocksdb/snapshot.h +++ b/src/libs/rocksdb/include/rocksdb/snapshot.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/sst_dump_tool.h b/src/libs/rocksdb/include/rocksdb/sst_dump_tool.h index 486fa29a..abc87ae3 100644 --- a/src/libs/rocksdb/include/rocksdb/sst_dump_tool.h +++ b/src/libs/rocksdb/include/rocksdb/sst_dump_tool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/sst_file_manager.h b/src/libs/rocksdb/include/rocksdb/sst_file_manager.h index ec1bb8f8..5cbaeeb9 100644 --- a/src/libs/rocksdb/include/rocksdb/sst_file_manager.h +++ b/src/libs/rocksdb/include/rocksdb/sst_file_manager.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/sst_file_reader.h b/src/libs/rocksdb/include/rocksdb/sst_file_reader.h index 03226984..35b6fca3 100644 --- a/src/libs/rocksdb/include/rocksdb/sst_file_reader.h +++ b/src/libs/rocksdb/include/rocksdb/sst_file_reader.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/sst_file_writer.h b/src/libs/rocksdb/include/rocksdb/sst_file_writer.h index 0ec2af48..60795175 100644 --- a/src/libs/rocksdb/include/rocksdb/sst_file_writer.h +++ b/src/libs/rocksdb/include/rocksdb/sst_file_writer.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/statistics.h b/src/libs/rocksdb/include/rocksdb/statistics.h index 55bb9d4d..cdbcc278 100644 --- a/src/libs/rocksdb/include/rocksdb/statistics.h +++ b/src/libs/rocksdb/include/rocksdb/statistics.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/stats_history.h b/src/libs/rocksdb/include/rocksdb/stats_history.h index 6810c877..1420cca6 100644 --- a/src/libs/rocksdb/include/rocksdb/stats_history.h +++ b/src/libs/rocksdb/include/rocksdb/stats_history.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/status.h b/src/libs/rocksdb/include/rocksdb/status.h index db8848ec..4fed2a5b 100644 --- a/src/libs/rocksdb/include/rocksdb/status.h +++ b/src/libs/rocksdb/include/rocksdb/status.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/table.h b/src/libs/rocksdb/include/rocksdb/table.h index bb438f48..0b4ca9e7 100644 --- a/src/libs/rocksdb/include/rocksdb/table.h +++ b/src/libs/rocksdb/include/rocksdb/table.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/table_properties.h b/src/libs/rocksdb/include/rocksdb/table_properties.h index 4a50a681..1a99e2e8 100644 --- a/src/libs/rocksdb/include/rocksdb/table_properties.h +++ b/src/libs/rocksdb/include/rocksdb/table_properties.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/thread_status.h b/src/libs/rocksdb/include/rocksdb/thread_status.h index 2ca42ec9..073b3af1 100644 --- a/src/libs/rocksdb/include/rocksdb/thread_status.h +++ b/src/libs/rocksdb/include/rocksdb/thread_status.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/threadpool.h b/src/libs/rocksdb/include/rocksdb/threadpool.h index af92dd34..e708552f 100644 --- a/src/libs/rocksdb/include/rocksdb/threadpool.h +++ b/src/libs/rocksdb/include/rocksdb/threadpool.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/trace_reader_writer.h b/src/libs/rocksdb/include/rocksdb/trace_reader_writer.h index e56dae59..50246ce0 100644 --- a/src/libs/rocksdb/include/rocksdb/trace_reader_writer.h +++ b/src/libs/rocksdb/include/rocksdb/trace_reader_writer.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/transaction_log.h b/src/libs/rocksdb/include/rocksdb/transaction_log.h index 1e9dd3f4..5050399e 100644 --- a/src/libs/rocksdb/include/rocksdb/transaction_log.h +++ b/src/libs/rocksdb/include/rocksdb/transaction_log.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/types.h b/src/libs/rocksdb/include/rocksdb/types.h index 4ecfe738..5db80732 100644 --- a/src/libs/rocksdb/include/rocksdb/types.h +++ b/src/libs/rocksdb/include/rocksdb/types.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/universal_compaction.h b/src/libs/rocksdb/include/rocksdb/universal_compaction.h index 4987d80a..0d8c2e13 100644 --- a/src/libs/rocksdb/include/rocksdb/universal_compaction.h +++ b/src/libs/rocksdb/include/rocksdb/universal_compaction.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/backupable_db.h b/src/libs/rocksdb/include/rocksdb/utilities/backupable_db.h index 00a7fe12..6c77d7f1 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/backupable_db.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/backupable_db.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/checkpoint.h b/src/libs/rocksdb/include/rocksdb/utilities/checkpoint.h index 6d69c680..0ce64798 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/checkpoint.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/checkpoint.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/convenience.h b/src/libs/rocksdb/include/rocksdb/utilities/convenience.h index 8d51586b..5bc406de 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/convenience.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/convenience.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/db_ttl.h b/src/libs/rocksdb/include/rocksdb/utilities/db_ttl.h index e774736c..37bdc446 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/db_ttl.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/db_ttl.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/debug.h b/src/libs/rocksdb/include/rocksdb/utilities/debug.h index 8a336725..2c0288ff 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/debug.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/debug.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/env_librados.h b/src/libs/rocksdb/include/rocksdb/utilities/env_librados.h index 17a24852..b564575f 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/env_librados.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/env_librados.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/env_mirror.h b/src/libs/rocksdb/include/rocksdb/utilities/env_mirror.h index e684dd3b..b484e9d0 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/env_mirror.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/env_mirror.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/info_log_finder.h b/src/libs/rocksdb/include/rocksdb/utilities/info_log_finder.h index 91e6d452..596e8630 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/info_log_finder.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/info_log_finder.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/ldb_cmd.h b/src/libs/rocksdb/include/rocksdb/utilities/ldb_cmd.h index fb330178..27537fbc 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/ldb_cmd.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/ldb_cmd.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h b/src/libs/rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h index e90054d5..cbbb17ab 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/leveldb_options.h b/src/libs/rocksdb/include/rocksdb/utilities/leveldb_options.h index 17697609..d73d85ba 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/leveldb_options.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/leveldb_options.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/lua/rocks_lua_custom_library.h b/src/libs/rocksdb/include/rocksdb/utilities/lua/rocks_lua_custom_library.h index 29907cd8..e060e4fe 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/lua/rocks_lua_custom_library.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/lua/rocks_lua_custom_library.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/lua/rocks_lua_util.h b/src/libs/rocksdb/include/rocksdb/utilities/lua/rocks_lua_util.h index eeb8a462..35fba891 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/lua/rocks_lua_util.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/lua/rocks_lua_util.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/memory_util.h b/src/libs/rocksdb/include/rocksdb/utilities/memory_util.h index 4130d8dc..11390df5 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/memory_util.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/memory_util.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/object_registry.h b/src/libs/rocksdb/include/rocksdb/utilities/object_registry.h index ee4cb468..b796621c 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/object_registry.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/object_registry.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/optimistic_transaction_db.h b/src/libs/rocksdb/include/rocksdb/utilities/optimistic_transaction_db.h index 3e72492c..c35d7d33 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/optimistic_transaction_db.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/optimistic_transaction_db.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/option_change_migration.h b/src/libs/rocksdb/include/rocksdb/utilities/option_change_migration.h index 1fe8d705..f71cc143 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/option_change_migration.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/option_change_migration.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/options_util.h b/src/libs/rocksdb/include/rocksdb/utilities/options_util.h index e6d97600..cf310f2f 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/options_util.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/options_util.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/sim_cache.h b/src/libs/rocksdb/include/rocksdb/utilities/sim_cache.h index aff7cc87..50898b95 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/sim_cache.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/sim_cache.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/stackable_db.h b/src/libs/rocksdb/include/rocksdb/utilities/stackable_db.h index 97dfb637..e455df66 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/stackable_db.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/stackable_db.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/table_properties_collectors.h b/src/libs/rocksdb/include/rocksdb/utilities/table_properties_collectors.h index 32d52668..6883bed4 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/table_properties_collectors.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/table_properties_collectors.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/transaction.h b/src/libs/rocksdb/include/rocksdb/utilities/transaction.h index 3fb2c59c..4c58d892 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/transaction.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/transaction.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/transaction_db.h b/src/libs/rocksdb/include/rocksdb/utilities/transaction_db.h index f63cecb4..02cab80e 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/transaction_db.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/transaction_db.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/transaction_db_mutex.h b/src/libs/rocksdb/include/rocksdb/utilities/transaction_db_mutex.h index 21f95954..123e1a85 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/transaction_db_mutex.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/transaction_db_mutex.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/utility_db.h b/src/libs/rocksdb/include/rocksdb/utilities/utility_db.h index 395afaf8..c877bf2a 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/utility_db.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/utility_db.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/utilities/write_batch_with_index.h b/src/libs/rocksdb/include/rocksdb/utilities/write_batch_with_index.h index 15e20ad8..1a046b9a 100644 --- a/src/libs/rocksdb/include/rocksdb/utilities/write_batch_with_index.h +++ b/src/libs/rocksdb/include/rocksdb/utilities/write_batch_with_index.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/version.h b/src/libs/rocksdb/include/rocksdb/version.h index 2a81fb2b..d921a9ab 100644 --- a/src/libs/rocksdb/include/rocksdb/version.h +++ b/src/libs/rocksdb/include/rocksdb/version.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/wal_filter.h b/src/libs/rocksdb/include/rocksdb/wal_filter.h index 0989a6d9..b1ea5e96 100644 --- a/src/libs/rocksdb/include/rocksdb/wal_filter.h +++ b/src/libs/rocksdb/include/rocksdb/wal_filter.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/write_batch.h b/src/libs/rocksdb/include/rocksdb/write_batch.h index 295f4fc7..0c31c21a 100644 --- a/src/libs/rocksdb/include/rocksdb/write_batch.h +++ b/src/libs/rocksdb/include/rocksdb/write_batch.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/write_batch_base.h b/src/libs/rocksdb/include/rocksdb/write_batch_base.h index e97c369f..27edd408 100644 --- a/src/libs/rocksdb/include/rocksdb/write_batch_base.h +++ b/src/libs/rocksdb/include/rocksdb/write_batch_base.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/include/rocksdb/write_buffer_manager.h b/src/libs/rocksdb/include/rocksdb/write_buffer_manager.h index 60fa8f81..3660296f 100644 --- a/src/libs/rocksdb/include/rocksdb/write_buffer_manager.h +++ b/src/libs/rocksdb/include/rocksdb/write_buffer_manager.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/logging/auto_roll_logger.h b/src/libs/rocksdb/logging/auto_roll_logger.h index 86f9bf15..d48d81f0 100644 --- a/src/libs/rocksdb/logging/auto_roll_logger.h +++ b/src/libs/rocksdb/logging/auto_roll_logger.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/logging/db_options.h b/src/libs/rocksdb/logging/db_options.h index 7ec98351..82f9ccbb 100644 --- a/src/libs/rocksdb/logging/db_options.h +++ b/src/libs/rocksdb/logging/db_options.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/logging/filename.h b/src/libs/rocksdb/logging/filename.h index b25f3300..389dacdc 100644 --- a/src/libs/rocksdb/logging/filename.h +++ b/src/libs/rocksdb/logging/filename.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/logging/mutexlock.h b/src/libs/rocksdb/logging/mutexlock.h index 1ff42ae6..42688912 100644 --- a/src/libs/rocksdb/logging/mutexlock.h +++ b/src/libs/rocksdb/logging/mutexlock.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/logging/port.h b/src/libs/rocksdb/logging/port.h index 9589146a..e6c9ce12 100644 --- a/src/libs/rocksdb/logging/port.h +++ b/src/libs/rocksdb/logging/port.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/rocksdb/logging/port_posix.h b/src/libs/rocksdb/logging/port_posix.h index 9f6219b7..6dc8a1ea 100644 --- a/src/libs/rocksdb/logging/port_posix.h +++ b/src/libs/rocksdb/logging/port_posix.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_alarm_reporter.cc b/src/libs/stat/stat_alarm_reporter.cc index 7c0d88be..da42d042 100644 --- a/src/libs/stat/stat_alarm_reporter.cc +++ b/src/libs/stat/stat_alarm_reporter.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_alarm_reporter.h b/src/libs/stat/stat_alarm_reporter.h index f9bd62f9..5eae8592 100644 --- a/src/libs/stat/stat_alarm_reporter.h +++ b/src/libs/stat/stat_alarm_reporter.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_attn.cc b/src/libs/stat/stat_attn.cc index ca030757..ce2bab66 100644 --- a/src/libs/stat/stat_attn.cc +++ b/src/libs/stat/stat_attn.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_attn.h b/src/libs/stat/stat_attn.h index 65bdb482..e9249c86 100644 --- a/src/libs/stat/stat_attn.h +++ b/src/libs/stat/stat_attn.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_client.cc b/src/libs/stat/stat_client.cc index 65c312fe..8c9a69d3 100644 --- a/src/libs/stat/stat_client.cc +++ b/src/libs/stat/stat_client.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_client.h b/src/libs/stat/stat_client.h index 2613580c..b887dec9 100644 --- a/src/libs/stat/stat_client.h +++ b/src/libs/stat/stat_client.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_dtc.cc b/src/libs/stat/stat_dtc.cc index 46923ec5..bbc7cdc8 100644 --- a/src/libs/stat/stat_dtc.cc +++ b/src/libs/stat/stat_dtc.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_dtc.h b/src/libs/stat/stat_dtc.h index 963b2099..b42b8f5c 100644 --- a/src/libs/stat/stat_dtc.h +++ b/src/libs/stat/stat_dtc.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_dtc_def.cc b/src/libs/stat/stat_dtc_def.cc index fcf15a00..ab29de30 100644 --- a/src/libs/stat/stat_dtc_def.cc +++ b/src/libs/stat/stat_dtc_def.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_dtc_def.h b/src/libs/stat/stat_dtc_def.h index 17e1090f..164e43af 100644 --- a/src/libs/stat/stat_dtc_def.h +++ b/src/libs/stat/stat_dtc_def.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_info.h b/src/libs/stat/stat_info.h index f95b0276..a88c9bc4 100644 --- a/src/libs/stat/stat_info.h +++ b/src/libs/stat/stat_info.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_manager.cc b/src/libs/stat/stat_manager.cc index 6668475b..6b654d90 100644 --- a/src/libs/stat/stat_manager.cc +++ b/src/libs/stat/stat_manager.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_manager.h b/src/libs/stat/stat_manager.h index 908bb0c3..de189941 100644 --- a/src/libs/stat/stat_manager.h +++ b/src/libs/stat/stat_manager.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_manager_container_thread.cc b/src/libs/stat/stat_manager_container_thread.cc index 610f8af2..6aac32cd 100644 --- a/src/libs/stat/stat_manager_container_thread.cc +++ b/src/libs/stat/stat_manager_container_thread.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_manager_container_thread.h b/src/libs/stat/stat_manager_container_thread.h index 91ea5c2c..d14dd167 100644 --- a/src/libs/stat/stat_manager_container_thread.h +++ b/src/libs/stat/stat_manager_container_thread.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_table_formater.cc b/src/libs/stat/stat_table_formater.cc index bef9e1f8..d92127cb 100644 --- a/src/libs/stat/stat_table_formater.cc +++ b/src/libs/stat/stat_table_formater.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_table_formater.h b/src/libs/stat/stat_table_formater.h index 4ffb815f..4cfd771f 100644 --- a/src/libs/stat/stat_table_formater.h +++ b/src/libs/stat/stat_table_formater.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_thread.cc b/src/libs/stat/stat_thread.cc index 0348144c..f252d303 100644 --- a/src/libs/stat/stat_thread.cc +++ b/src/libs/stat/stat_thread.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_thread.h b/src/libs/stat/stat_thread.h index b19e060c..630b60f3 100644 --- a/src/libs/stat/stat_thread.h +++ b/src/libs/stat/stat_thread.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/libs/stat/stat_tool.cc b/src/libs/stat/stat_tool.cc index 3ebfe238..de20cd7d 100644 --- a/src/libs/stat/stat_tool.cc +++ b/src/libs/stat/stat_tool.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/rule/log.cc b/src/rule/log.cc index ff4d862f..23b3d732 100644 --- a/src/rule/log.cc +++ b/src/rule/log.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/rule/log.h b/src/rule/log.h index 5fa84214..6cceb859 100644 --- a/src/rule/log.h +++ b/src/rule/log.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/utils/log.cc b/src/utils/log.cc index ff4d862f..23b3d732 100644 --- a/src/utils/log.cc +++ b/src/utils/log.cc @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/utils/log.h b/src/utils/log.h index 9cc79ef1..2a76ea14 100644 --- a/src/utils/log.h +++ b/src/utils/log.h @@ -1,5 +1,5 @@ /* -* Copyright [2021] JD.com, Inc. +* Copyright JD.com, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From df600744ef157c82ad8d5f801335d9eab8015cab Mon Sep 17 00:00:00 2001 From: kfysck Date: Thu, 4 Sep 2025 06:19:01 +0000 Subject: [PATCH 02/10] feat: update English comments. --- src/agent-watchdog/log.h | 12 ++++++------ src/agent/da_server.c | 14 +++++++------- src/core/CMakeLists.txt | 12 ++++++------ src/core/algorithm/hash.h | 24 ++++++++++++------------ src/core/algorithm/lru_bit.cc | 16 ++++++++-------- src/core/algorithm/lru_bit.h | 12 ++++++------ src/core/buffer/buffer_def.h | 10 +++++----- src/core/lib/CMakeLists.txt | 16 ++++++++-------- src/data_lifecycle/log.h | 12 ++++++------ src/hwcserver/hwc_fault_state.cc | 2 +- src/hwcserver/hwc_init_state.cc | 12 ++++++------ src/hwcserver/hwc_register_state.cc | 10 +++++----- src/hwcserver/hwc_state_base.h | 8 ++++---- src/hwcserver/log.h | 12 ++++++------ src/libs/common/log/log.h | 12 ++++++------ src/libs/stat/stat_dtc_def.h | 12 ++++++------ src/libs/stat/stat_manager.cc | 2 +- src/libs/stat/stat_manager.h | 2 +- src/rule/CMakeLists.txt | 12 ++++++------ src/rule/log.h | 12 ++++++------ src/utils/CMakeLists.txt | 12 ++++++------ src/utils/log.h | 12 ++++++------ 22 files changed, 124 insertions(+), 124 deletions(-) diff --git a/src/agent-watchdog/log.h b/src/agent-watchdog/log.h index 2a76ea14..a8073379 100644 --- a/src/agent-watchdog/log.h +++ b/src/agent-watchdog/log.h @@ -69,12 +69,12 @@ static Logger logger = Logger::getRoot(); #define LOG4CPLUS_CONF_FILE "../conf/log4cplus-wd.conf" /********************************************* -**TRACE:调试应用的详细步骤 -**DEBUG:算法关键部分的相关信息 -**INFO: 应用的内部状态信息 -**WARN: 可以避免的内部状态信息 -**ERROR:发生了错误,且应用程序知道如何处理它 -**FATAL:发生了不可逆转的错误,程序无法继续运行 +**TRACE: Detailed steps for debugging applications +**DEBUG: Information about key parts of algorithms +**INFO: Internal status information of applications +**WARN: Avoidable internal status information +**ERROR: An error occurred and the application knows how to handle it +**FATAL: An irreversible error occurred, the program cannot continue running **********************************************/ #define log4cplus_trace(fmt, args...) \ write_log(logger, 1, __FILE__, __FUNCTION__, __LINE__, fmt, ##args) diff --git a/src/agent/da_server.c b/src/agent/da_server.c index e387e20f..ba03d4f6 100644 --- a/src/agent/da_server.c +++ b/src/agent/da_server.c @@ -26,10 +26,10 @@ #include "da_stats.h" #include "da_time.h" -static int keep_alive = 1; // 开启keepalive属性. 缺省值: 0(关闭) -static int keep_idle = 5; // 如果在60秒内没有任何数据交互,则进行探测. 缺省值:7200(s) -static int keep_interval = 5; // 探测时发探测包的时间间隔为5秒. 缺省值:75(s) -static int keep_count = 1; // 探测重试的次数. 全部超时则认定连接失效..缺省值:9(次) +static int keep_alive = 1; // Enable keepalive attribute. Default: 0(disabled) +static int keep_idle = 5; // If there is no data interaction within 60 seconds, probe. Default: 7200(s) +static int keep_interval = 5; // Time interval for sending probe packets during probing is 5 seconds. Default: 75(s) +static int keep_count = 1; // Number of probe retries. Connection is considered failed if all timeout. Default: 9(times) void instance_ref(struct conn *conn, void *owner) { @@ -803,7 +803,7 @@ int server_pool_run(struct server_pool *pool) { } /* - * 对于每个server pool 构建后台的服务器结构,构建hash环 + * For each server pool, build backend server structure and construct hash ring */ static int server_pool_each_run(void *elem, void *data) { return server_pool_run(elem); @@ -812,7 +812,7 @@ static int server_pool_each_run(void *elem, void *data) { /* - * 初始化server pool + * Initialize server pool */ int server_pool_init(struct array *server_pool, struct array *conf_pool, struct context *ctx) { @@ -829,7 +829,7 @@ int server_pool_init(struct array *server_pool, struct array *conf_pool, } /* transform conf pool to server pool */ - // 对于conf_pool中的每个对象调用conf_pool_each_transform函数 + // Call conf_pool_each_transform function for each object in conf_pool status = array_each(conf_pool, conf_pool_each_transform, server_pool); if (status != 0) { server_pool_deinit(server_pool); diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index b08a977c..c1aac674 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -4,7 +4,7 @@ FILE(GLOB_RECURSE SRC_LIST ./*.cc ./*.c) include(../utils.cmake) -#添加头文件搜索路径,相当于gcc -I +#add header file search path, equivalent to gcc -I INCLUDE_DIRECTORIES( . ./algorithm ./buffer ./chain ./data ./hotbk ./log ./mem @@ -20,7 +20,7 @@ INCLUDE_DIRECTORIES( ../libs/hsql/include ../libs/mysql/include/) -#添加.so/.a文件搜索路径,相当于gcc -L +#add .so/.a file search path, equivalent to gcc -L LINK_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/libs/mysql/libs ${PROJECT_SOURCE_DIR}/src/libs/log4cplus/libs @@ -31,7 +31,7 @@ LINK_DIRECTORIES( ${PROJECT_SOURCE_DIR}/build/src/libs/stat ${PROJECT_SOURCE_DIR}/build/src/daemons) -#添加链接库,相当于gcc -l +#add link libraries, equivalent to gcc -l LINK_LIBRARIES(libmysqlclient.a) LINK_LIBRARIES(liblog4cplus.a) LINK_LIBRARIES(libsqlparser.a) @@ -43,13 +43,13 @@ LINK_LIBRARIES(libz64.a) LINK_LIBRARIES(pthread) LINK_LIBRARIES(dl) -#编译参数 +#compilation parameters ADD_DEFINITIONS("-g -rdynamic -fPIC -D_CORE_ -fpermissive -std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=0 -export-dynamic -Wl,--version-script,core.export.lst") ADD_DEFINITIONS(-Wno-builtin-macro-redefined) -#编译为.so/.a +#compile to .so/.a ADD_EXECUTABLE(dtcd ${SRC_LIST}) -#将目标文件与库文件链接 +#link target files with library files TARGET_LINK_LIBRARIES(dtcd libdaemons.a libstat.a libsqlparser.a libcommon.a libyaml-cpp.a liblog4cplus.a libz64.a libmysqlclient.a) redefine_file_macro(dtcd) \ No newline at end of file diff --git a/src/core/algorithm/hash.h b/src/core/algorithm/hash.h index cc038910..a9e773e0 100644 --- a/src/core/algorithm/hash.h +++ b/src/core/algorithm/hash.h @@ -26,10 +26,10 @@ DTC_BEGIN_NAMESPACE struct _hash { - uint32_t hh_size; // hash 大小 - uint32_t hh_free; // 空闲的hash数量 - uint32_t hh_node; // 挂接的node总数量 - uint32_t hh_fixedsize; // key大小:变长key时,hh_fixedsize = 0;其他就是其实际长度 + uint32_t hh_size; // hash size + uint32_t hh_free; // number of free hash slots + uint32_t hh_node; // total number of attached nodes + uint32_t hh_fixedsize; // key size: for variable-length keys, hh_fixedsize = 0; otherwise it's the actual length uint32_t hh_buckets[0]; // hash bucket start }; typedef struct _hash HASH_T; @@ -50,11 +50,11 @@ class DTCHash { inline HASH_ID_T new_hash_slot(const char *key) { - //变长key的前一个字节编码的是key的长度 + //the previous byte of variable-length key encodes the key length uint32_t size = _hash->hh_fixedsize ? _hash->hh_fixedsize : *(unsigned char *)key++; - //目前仅支持1、2、4字节的定长key + //currently only supports 1, 2, 4-byte fixed-length keys switch (size) { case sizeof(unsigned char): return (*(unsigned char *)key) % _hash->hh_size; @@ -70,11 +70,11 @@ class DTCHash { inline HASH_ID_T hash_slot(const char *key) { - //变长key的前一个字节编码的是key的长度 + //the previous byte of variable-length key encodes the key length uint32_t size = _hash->hh_fixedsize ? _hash->hh_fixedsize : *(unsigned char *)key++; - //目前仅支持1、2、4字节的定长key + //currently only supports 1, 2, 4-byte fixed-length keys switch (size) { case sizeof(unsigned char): return (*(unsigned char *)key) % _hash->hh_size; @@ -87,7 +87,7 @@ class DTCHash { unsigned int h = 0, g = 0; const char *arEnd = key + size; - //变长key hash算法, 目前8字节的定长整型key也是作为变长hash的。 + //variable-length key hash algorithm, currently 8-byte fixed-length integer keys are also treated as variable-length hash. while (key < arEnd) { h = (h << 4) + *key++; if ((g = (h & 0xF0000000))) { @@ -109,11 +109,11 @@ class DTCHash { return errmsg_; } - //创建物理内存并格式化 + //create and format physical memory int do_init(const uint32_t hsize, const uint32_t fixedsize); - //绑定到物理内存 + //bind to physical memory int do_attach(MEM_HANDLE_T handle); - //脱离物理内存 + //detach from physical memory int do_detach(void); uint32_t hash_size() const diff --git a/src/core/algorithm/lru_bit.cc b/src/core/algorithm/lru_bit.cc index b1fc1ebc..911f505c 100644 --- a/src/core/algorithm/lru_bit.cc +++ b/src/core/algorithm/lru_bit.cc @@ -114,14 +114,14 @@ int LruBitObj::Scan(void) for (; _scan_idx_off < IDX_SIZE;) { unsigned found = 0; - //扫描idx中的1 byte, 最大会有512个node id + //scan 1 byte in idx, maximum 512 node ids for (int j = 0; j < 8; ++j) { - //读取idx中的第_scan_idx_off个字节的第j位对应的blk中的8 bytes + //read 8 bytes in blk corresponding to the j-th bit of the _scan_idx_off-th byte in idx uint64_t v = p->read(_scan_idx_off, j); if (0 == v) continue; - //扫描blk中的8 bytes + //scan 8 bytes in blk for (int i = 0; i < 64; ++i) { if (v & 0x1) { found += 1; @@ -141,23 +141,23 @@ int LruBitObj::Scan(void) } if (found > 0) { - //批量写入lru变更 + //batch write lru changes _lru_writer->Commit(); - //idx清零1byete, blk清零64bytes + //clear idx 1 byte, clear blk 64 bytes total_1_bits -= p->clear(_scan_idx_off); } _scan_idx_off += 1; found_id += found; - // 如果超过此水位,终止扫描, 等待下一次被调度 + // if exceeds this watermark, terminate scanning and wait for next scheduling if (found_id >= _scan_stop_until) { return 0; } } - //调整为下一个lru_bit(4k) + //adjust to next lru_bit(4k) _scan_idx_off = 0; _scan_lru_bit += 1; if (_scan_lru_bit > _max_lru_bit) { @@ -249,7 +249,7 @@ int LruWriter::Write(unsigned int v) log4cplus_debug("enter LruWriter, lru changes, node id:%u", v); Node node = I_SEARCH(v); - if (!node) //NODE已经不存在,不处理 + if (!node) //NODE no longer exists, do not process return 0; DataChunk *p = M_POINTER(DataChunk, node.vd_handle()); diff --git a/src/core/algorithm/lru_bit.h b/src/core/algorithm/lru_bit.h index 83f9c9cf..3701bc36 100644 --- a/src/core/algorithm/lru_bit.h +++ b/src/core/algorithm/lru_bit.h @@ -40,7 +40,7 @@ #define BLK_BYTE_SHIFT(v) (v & 0x7) /* - * Node ID 位图储存表 + * Node ID bitmap storage table * *==================================================================================== *| 11 b | 12 b | 3 b | 3 b | 3 b | @@ -64,7 +64,7 @@ typedef struct lru_bit { { } - /* 如果set命中返回1,否则返回0 */ + /* returns 1 if set hit, otherwise returns 0 */ int set(unsigned int v, int b) { int hit = 0; @@ -115,9 +115,9 @@ typedef struct lru_bit { /* * - * 扫描频率、速度控制 - * 1. 不能影响正常的update同步 - * 2. 尽量在控制时间内完成一趟扫描 + * Scan frequency and speed control + * 1. Must not affect normal update synchronization + * 2. Try to complete one round of scanning within the controlled time * */ #define LRU_SCAN_STOP_UNTIL 20 //20 @@ -187,7 +187,7 @@ class LruBitUnit { int check_status() { return _is_start; - } // 0:不启动, 1:启动 + } // 0: not started, 1: started int Set(unsigned int v); int Unset(unsigned int v); diff --git a/src/core/buffer/buffer_def.h b/src/core/buffer/buffer_def.h index fe1deeb0..c339b0a8 100644 --- a/src/core/buffer/buffer_def.h +++ b/src/core/buffer/buffer_def.h @@ -19,12 +19,12 @@ #define E_OK 0 //success #define E_FAIL -1 //fail -#define KEY_LEN_LEN sizeof(char) //"key长"字段长度 -#define MAX_KEY_LEN 256 //key最大长度,由"key长"字段长度所能表示的最大数字决定 +#define KEY_LEN_LEN sizeof(char) //"key length" field length +#define MAX_KEY_LEN 256 //maximum key length, determined by the maximum number that can be represented by the "key length" field length #define ERR_MSG_LEN 1024 -#define MAX_PURGE_NUM 1000 //每次purge的节点数上限 -#define CACHE_SVC "dtc" //cache服务名 -//#define VERSION "1.0.3" //版本信息 +#define MAX_PURGE_NUM 1000 //upper limit of nodes to purge each time +#define CACHE_SVC "dtc" //cache service name +//#define VERSION "1.0.3" //version information #define STRNCPY(dest, src, len) \ { \ diff --git a/src/core/lib/CMakeLists.txt b/src/core/lib/CMakeLists.txt index a84d4bca..7fee95f0 100644 --- a/src/core/lib/CMakeLists.txt +++ b/src/core/lib/CMakeLists.txt @@ -1,11 +1,11 @@ -# #设置库文件输出路径 +# # Set library file output path # SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/src/core) -# #设置可执行文件输出路径 +# # Set executable file output path # SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/src/core) FILE(GLOB_RECURSE SRC_LIST ../*.cc ../*.c) -#添加头文件搜索路径,相当于gcc -I +# Add header file search path, equivalent to gcc -I INCLUDE_DIRECTORIES( ../. ../algorithm ../buffer ../chain ../data ../hotbk ../log ../mem @@ -19,7 +19,7 @@ INCLUDE_DIRECTORIES( ../../libs/zlib/include64 ../../libs/yaml-cpp/include) -#添加.so/.a文件搜索路径,相当于gcc -L +# Add .so/.a file search path, equivalent to gcc -L LINK_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/libs/log4cplus/libs ${PROJECT_SOURCE_DIR}/src/libs/yaml-cpp/libs @@ -28,7 +28,7 @@ LINK_DIRECTORIES( ${PROJECT_SOURCE_DIR}/build/src/libs/stat ${PROJECT_SOURCE_DIR}/build/src/daemons) -#添加链接库,相当于gcc -l +# Add link libraries, equivalent to gcc -l LINK_LIBRARIES(liblog4cplus.a) LINK_LIBRARIES(libcommon.a) LINK_LIBRARIES(libyaml-cpp.a) @@ -38,13 +38,13 @@ LINK_LIBRARIES(libz64.a) LINK_LIBRARIES(pthread) LINK_LIBRARIES(dl) -#编译参数 +# Compilation parameters ADD_DEFINITIONS("-g -rdynamic -fPIC -fpermissive -std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=0 -export-dynamic -Wl,--version-script,core.export.lst") -#编译为.so/.a +# Compile to .so/.a ADD_LIBRARY(core_static ${SRC_LIST}) -#将目标文件与库文件链接 +# Link target files with library files TARGET_LINK_LIBRARIES(core_static libdaemons.a libstat.a libcommon.a libyaml-cpp.a liblog4cplus.a libz64.a) SET_TARGET_PROPERTIES(core_static PROPERTIES OUTPUT_NAME "core") SET_TARGET_PROPERTIES (core_static PROPERTIES CLEAN_DIRECT_OUTPUT 1) diff --git a/src/data_lifecycle/log.h b/src/data_lifecycle/log.h index 5a039372..ac6cf6db 100644 --- a/src/data_lifecycle/log.h +++ b/src/data_lifecycle/log.h @@ -69,12 +69,12 @@ static Logger logger = Logger::getRoot(); #define LOG4CPLUS_CONF_FILE "../conf/log4cplus-life.conf" /********************************************* -**TRACE:调试应用的详细步骤 -**DEBUG:算法关键部分的相关信息 -**INFO: 应用的内部状态信息 -**WARN: 可以避免的内部状态信息 -**ERROR:发生了错误,且应用程序知道如何处理它 -**FATAL:发生了不可逆转的错误,程序无法继续运行 +**TRACE: Detailed steps for debugging applications +**DEBUG: Information about key parts of algorithms +**INFO: Internal status information of applications +**WARN: Avoidable internal status information +**ERROR: An error occurred and the application knows how to handle it +**FATAL: An irreversible error occurred, the program cannot continue running **********************************************/ #define log4cplus_trace(fmt, args...) \ write_log(logger, 1, __FILE__, __FUNCTION__, __LINE__, fmt, ##args) diff --git a/src/hwcserver/hwc_fault_state.cc b/src/hwcserver/hwc_fault_state.cc index 72e97355..df22b516 100644 --- a/src/hwcserver/hwc_fault_state.cc +++ b/src/hwcserver/hwc_fault_state.cc @@ -23,7 +23,7 @@ void FaultState::Exit() void FaultState::HandleEvent() { - // 简单处理,程序结束 + // Simple handling, program exit log4cplus_info("GoodBye hwc_service."); exit(0); } \ No newline at end of file diff --git a/src/hwcserver/hwc_init_state.cc b/src/hwcserver/hwc_init_state.cc index 2eb9e41d..4c268d41 100644 --- a/src/hwcserver/hwc_init_state.cc +++ b/src/hwcserver/hwc_init_state.cc @@ -29,7 +29,7 @@ void InitState::Enter() return; } - // 锁住hwc的日志目录 + // Lock HWC log directory if (CComm::uniq_lock()) { log4cplus_error("another process already running, exit"); p_hwc_state_manager_->ChangeState(E_HWC_STATE_FAULT); @@ -44,7 +44,7 @@ void InitState::Exit() void InitState::HandleEvent() { - // 解析yaml配置文件 + // Parse YAML configuration file log4cplus_debug("dtc conf file:%s " , CComm::dtc_conf); DTCConfig* p_dtc_config = new DTCConfig(); if (p_dtc_config->load_yaml_file(CComm::dtc_conf, false) == -1) @@ -56,13 +56,13 @@ void InitState::HandleEvent() DTCTableDefinition* p_dtc_tab_def = p_db_Config->build_table_definition(); TableDefinitionManager::instance()->set_cur_table_def(p_dtc_tab_def , 0); - // 初始化mysql process - // 暂时不按key选择机器,冷数据库对外为一台访问配置 + // Initialize MySQL process + // Temporarily not selecting machines by key, cold database configured as single access point CComm::mysql_process_.do_init(0 , p_db_Config, p_dtc_tab_def, 0); - // 绑定yaml文件解析器至StateManager + // Bind YAML file parser to StateManager p_hwc_state_manager_->BindDBConfigParser(p_db_Config); - // 跳转至下一个状态 + // Jump to next state p_hwc_state_manager_->ChangeState(E_HWC_STATE_REGISTER); } diff --git a/src/hwcserver/hwc_register_state.cc b/src/hwcserver/hwc_register_state.cc index 44bbd47f..8cb8ca4b 100644 --- a/src/hwcserver/hwc_register_state.cc +++ b/src/hwcserver/hwc_register_state.cc @@ -17,19 +17,19 @@ void RegisterState::Enter() { log4cplus_info(LOG_KEY_WORD "enter into register state..."); - // 获取本机dtc监听端口,并探活 + // Get local DTC listening port and probe connectivity DbConfig* pParser = p_hwc_state_manager_->GetDBConfigParser(); if (CComm::ReInitDtcAgency(pParser)) { log4cplus_error("init local dtc error."); p_hwc_state_manager_->ChangeState(E_HWC_STATE_FAULT); return; } - // 根据dtc配置表结构 创建冷库表 + // Create cold storage table based on DTC configuration table structure if (CComm::mysql_process_.create_tab_if_not_exist()) { log4cplus_error("create hwc table error."); } - // double check 冷库表与dtc配置表结构 + // Double check cold storage table structure against DTC configuration table structure if (CComm::mysql_process_.check_table() != 0) { log4cplus_error("mysql field setting is not same as dtc"); p_hwc_state_manager_->ChangeState(E_HWC_STATE_FAULT); @@ -44,7 +44,7 @@ void RegisterState::Exit() void RegisterState::HandleEvent() { - // 提前获取本机dtc Binlog的位置 + // Get local DTC Binlog position in advance int i_ret = CComm::registor.Regist(); if (i_ret != -DTC::EC_INC_SYNC_STAGE && i_ret != -DTC::EC_FULL_SYNC_STAGE) { @@ -52,6 +52,6 @@ void RegisterState::HandleEvent() return; } - // 跳转至下一个状态 + // Jump to next state p_hwc_state_manager_->ChangeState(E_HWC_STATE_BINLOG_SYNC); } \ No newline at end of file diff --git a/src/hwcserver/hwc_state_base.h b/src/hwcserver/hwc_state_base.h index 75d51cbd..3981c484 100644 --- a/src/hwcserver/hwc_state_base.h +++ b/src/hwcserver/hwc_state_base.h @@ -35,17 +35,17 @@ class HwcStateBase public: /// ************************** - /// 进入当前状态时,一些处理,比如: 初始化 + /// Some processing when entering current state, such as: initialization /// ************************** virtual void Enter(void) = 0; /// ************************** - /// 退出当前状态时,一些处理 + /// Some processing when exiting current state /// ************************** virtual void Exit(void) = 0; /// ************************** - /// 当前状态时,所要处理的业务逻辑,包括:状态跳转判断逻辑 + /// Business logic to be processed in current state, including: state transition judgment logic /// ************************** virtual void HandleEvent() = 0; @@ -53,7 +53,7 @@ class HwcStateBase HwcStateManager* p_hwc_state_manager_; }; -// 减少冗余代码编写 +// Reduce redundant code writing #define SYNCSTATE_NAME(stateName) stateName##State #define SyncState(stateName) \ diff --git a/src/hwcserver/log.h b/src/hwcserver/log.h index ed9ced07..f2ad0566 100644 --- a/src/hwcserver/log.h +++ b/src/hwcserver/log.h @@ -69,12 +69,12 @@ static Logger logger = Logger::getRoot(); #define LOG4CPLUS_CONF_FILE "../conf/log4cplus-hwc.conf" /********************************************* -**TRACE:调试应用的详细步骤 -**DEBUG:算法关键部分的相关信息 -**INFO: 应用的内部状态信息 -**WARN: 可以避免的内部状态信息 -**ERROR:发生了错误,且应用程序知道如何处理它 -**FATAL:发生了不可逆转的错误,程序无法继续运行 +**TRACE: Detailed steps for debugging applications +**DEBUG: Information about key parts of algorithms +**INFO: Internal status information of applications +**WARN: Avoidable internal status information +**ERROR: An error occurred and the application knows how to handle it +**FATAL: An irreversible error occurred, the program cannot continue running **********************************************/ #define log4cplus_trace(fmt, args...) \ write_log(logger, 1, __FILE__, __FUNCTION__, __LINE__, fmt, ##args) diff --git a/src/libs/common/log/log.h b/src/libs/common/log/log.h index 49250fd3..c4f4c77f 100644 --- a/src/libs/common/log/log.h +++ b/src/libs/common/log/log.h @@ -69,12 +69,12 @@ static Logger logger = Logger::getRoot(); #define LOG4CPLUS_CONF_FILE "../conf/log4cplus.conf" /********************************************* -**TRACE:调试应用的详细步骤 -**DEBUG:算法关键部分的相关信息 -**INFO: 应用的内部状态信息 -**WARN: 可以避免的内部状态信息 -**ERROR:发生了错误,且应用程序知道如何处理它 -**FATAL:发生了不可逆转的错误,程序无法继续运行 +**TRACE: Detailed steps for debugging applications +**DEBUG: Information about key parts of algorithms +**INFO: Internal status information of applications +**WARN: Avoidable internal status information +**ERROR: An error occurred and the application knows how to handle it +**FATAL: An irreversible error occurred, the program cannot continue running **********************************************/ #define log4cplus_trace(fmt, args...) \ write_log(logger, 1, __FILE__, __FUNCTION__, __LINE__, fmt, ##args) diff --git a/src/libs/stat/stat_dtc_def.h b/src/libs/stat/stat_dtc_def.h index 164e43af..571e5b0c 100644 --- a/src/libs/stat/stat_dtc_def.h +++ b/src/libs/stat/stat_dtc_def.h @@ -20,7 +20,7 @@ #include "stat_info.h" enum { - // 相同的统计项目 + // Same statistical items S_VERSION = 5, C_TIME, @@ -42,9 +42,9 @@ enum { REQ_USEC_HIT, REQ_USEC_REPLACE, - // accept连接次数 + // Number of accept connections ACCEPT_COUNT = 30, - // 当前连接数 + // Current connection count CONN_COUNT, CUR_QUEUE_COUNT, @@ -54,7 +54,7 @@ enum { AGENT_ACCEPT_COUNT, AGENT_CONN_COUNT, - // server是否为只读状态 + // Whether server is in read-only status SERVER_READONLY = 40, SERVER_OPENNING_FD, SUPER_GROUP_ENABLE, @@ -148,7 +148,7 @@ enum { BLACKLIST_CURRENT_SLOT = 3010, BLACKLIST_SIZE, TRY_PURGE_COUNT, - // try_purge_size 每次purge的节点个数 + // try_purge_size Number of nodes purged each time TRY_PURGE_NODES, PLUGIN_REQ_USEC_ALL = 10000, @@ -172,7 +172,7 @@ enum { ROW_SIZE_HISTORY_STAT = 20301, DATA_SURVIVAL_HOUR_STAT = 20302, PURGE_CREATE_UPDATE_STAT = 20303, - // 新增Helper的统计项, 从20400开始编号 + // New Helper statistical items, starting from 20400 HELPER_READ_GROUR_CUR_QUEUE_MAX_SIZE = 20400, HELPER_WRITE_GROUR_CUR_QUEUE_MAX_SIZE = 20401, HELPER_COMMIT_GROUR_CUR_QUEUE_MAX_SIZE = 20402, diff --git a/src/libs/stat/stat_manager.cc b/src/libs/stat/stat_manager.cc index 6b654d90..ec624d9b 100644 --- a/src/libs/stat/stat_manager.cc +++ b/src/libs/stat/stat_manager.cc @@ -146,7 +146,7 @@ int StatManager::init_stat_info(const char *name, const char *indexfile, return -1; } - //成功执行时,mmap()返回被映射区的指针,munmap()返回0。失败时,mmap()返回MAP_FAILED[其值为(void *)-1],munmap返回-1。 + // On successful execution, mmap() returns a pointer to the mapped region, munmap() returns 0. On failure, mmap() returns MAP_FAILED [value is (void *)-1], munmap returns -1. header_ = (DTCStatHeader *)mmap(NULL, index_size_, PROT_READ, MAP_SHARED, fd, 0); close(fd); diff --git a/src/libs/stat/stat_manager.h b/src/libs/stat/stat_manager.h index de189941..fa9bf0b5 100644 --- a/src/libs/stat/stat_manager.h +++ b/src/libs/stat/stat_manager.h @@ -679,7 +679,7 @@ class StatManager : protected StatLock { const unsigned int get_map_size(void) const { return sizeof(map_) / sizeof(*map_); - } //=======================常量=============== + } //=======================Constants=============== int64_t &at(unsigned int cat, unsigned offset, unsigned int n = 0) { return ((int64_t *)(map_[cat] + offset))[n]; diff --git a/src/rule/CMakeLists.txt b/src/rule/CMakeLists.txt index cd07fcbe..9be4c04f 100644 --- a/src/rule/CMakeLists.txt +++ b/src/rule/CMakeLists.txt @@ -2,14 +2,14 @@ FILE(GLOB_RECURSE SRC_LIST ./*.cc ./*.c) include(../utils.cmake) -#添加头文件搜索路径,相当于gcc -I +# Add header file search path, equivalent to gcc -I INCLUDE_DIRECTORIES( . ../libs/yaml-cpp/include/ ../libs/log4cplus/include/ ../libs/hsql/include) -#添加.so/.a文件搜索路径,相当于gcc -L +# Add .so/.a file search path, equivalent to gcc -L LINK_DIRECTORIES( . ${PROJECT_SOURCE_DIR}/src/libs/log4cplus/libs @@ -17,7 +17,7 @@ LINK_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/libs/hsql/libs ${PROJECT_SOURCE_DIR}/src/libs/mxml/libs) -#添加链接库,相当于gcc -l +# Add link libraries, equivalent to gcc -l LINK_LIBRARIES(liblog4cplus.a) LINK_LIBRARIES(libmxml.a) LINK_LIBRARIES(libsqlparser.so) @@ -25,15 +25,15 @@ LINK_LIBRARIES(libyaml-cpp.a) LINK_LIBRARIES(pthread) LINK_LIBRARIES(dl) -#编译参数 +# Compilation parameters ADD_DEFINITIONS("-g -rdynamic -fPIC -D_CORE_ -fpermissive -std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=0 -export-dynamic -Wl,--version-script,core.export.lst") ADD_DEFINITIONS(-Wno-builtin-macro-redefined) -#编译为.so/.a +# Compile to .so/.a ADD_EXECUTABLE(rule.bin ${SRC_LIST}) ADD_LIBRARY(rule SHARED ${SRC_LIST}) -#将目标文件与库文件链接 +# Link target files with library files TARGET_LINK_LIBRARIES(rule libsqlparser.so liblog4cplus.a libyaml-cpp.a libmxml.a) TARGET_LINK_LIBRARIES(rule.bin libsqlparser.so liblog4cplus.a libyaml-cpp.a libmxml.a) redefine_file_macro(rule) diff --git a/src/rule/log.h b/src/rule/log.h index 6cceb859..ec6f6df4 100644 --- a/src/rule/log.h +++ b/src/rule/log.h @@ -69,12 +69,12 @@ static Logger logger = Logger::getRoot(); #define LOG4CPLUS_CONF_FILE "../conf/log4cplus-agent.conf" /********************************************* -**TRACE:调试应用的详细步骤 -**DEBUG:算法关键部分的相关信息 -**INFO: 应用的内部状态信息 -**WARN: 可以避免的内部状态信息 -**ERROR:发生了错误,且应用程序知道如何处理它 -**FATAL:发生了不可逆转的错误,程序无法继续运行 +**TRACE: Detailed steps for debugging applications +**DEBUG: Information about key parts of algorithms +**INFO: Internal status information of applications +**WARN: Avoidable internal status information +**ERROR: An error occurred and the application knows how to handle it +**FATAL: An irreversible error occurred, the program cannot continue running **********************************************/ #define log4cplus_trace(fmt, args...) \ write_log(logger, 1, __FILE__, __FUNCTION__, __LINE__, fmt, ##args) diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index a6237e71..f2907bd4 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -2,33 +2,33 @@ FILE(GLOB_RECURSE SRC_LIST ./*.cc ./*.c) include(../utils.cmake) -#添加头文件搜索路径,相当于gcc -I +# Add header file search path, equivalent to gcc -I INCLUDE_DIRECTORIES( . ../libs/yaml-cpp/include/ ../libs/log4cplus/include/ ../libs/hsql/include) -#添加.so/.a文件搜索路径,相当于gcc -L +# Add .so/.a file search path, equivalent to gcc -L LINK_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/libs/log4cplus/libs ${PROJECT_SOURCE_DIR}/src/libs/yaml-cpp/libs ${PROJECT_SOURCE_DIR}/src/libs/hsql/libs) -#添加链接库,相当于gcc -l +# Add link libraries, equivalent to gcc -l LINK_LIBRARIES(liblog4cplus.a) LINK_LIBRARIES(libsqlparser.so) LINK_LIBRARIES(libyaml-cpp.a) LINK_LIBRARIES(pthread) LINK_LIBRARIES(dl) -#编译参数 +# Compilation parameters ADD_DEFINITIONS("-g -rdynamic -fPIC -D_CORE_ -fpermissive -std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=0 -export-dynamic -Wl,--version-script,core.export.lst") ADD_DEFINITIONS(-Wno-builtin-macro-redefined) -#编译为.so/.a +# Compile to .so/.a ADD_EXECUTABLE(conf-gen-utils ${SRC_LIST}) -#将目标文件与库文件链接 +# Link target files with library files TARGET_LINK_LIBRARIES(conf-gen-utils libsqlparser.so liblog4cplus.a libyaml-cpp.a) redefine_file_macro(conf-gen-utils) \ No newline at end of file diff --git a/src/utils/log.h b/src/utils/log.h index 2a76ea14..a8073379 100644 --- a/src/utils/log.h +++ b/src/utils/log.h @@ -69,12 +69,12 @@ static Logger logger = Logger::getRoot(); #define LOG4CPLUS_CONF_FILE "../conf/log4cplus-wd.conf" /********************************************* -**TRACE:调试应用的详细步骤 -**DEBUG:算法关键部分的相关信息 -**INFO: 应用的内部状态信息 -**WARN: 可以避免的内部状态信息 -**ERROR:发生了错误,且应用程序知道如何处理它 -**FATAL:发生了不可逆转的错误,程序无法继续运行 +**TRACE: Detailed steps for debugging applications +**DEBUG: Information about key parts of algorithms +**INFO: Internal status information of applications +**WARN: Avoidable internal status information +**ERROR: An error occurred and the application knows how to handle it +**FATAL: An irreversible error occurred, the program cannot continue running **********************************************/ #define log4cplus_trace(fmt, args...) \ write_log(logger, 1, __FILE__, __FUNCTION__, __LINE__, fmt, ##args) From 8159d432734596c53e3babfbcec57881afd6c26a Mon Sep 17 00:00:00 2001 From: kfysck Date: Thu, 4 Sep 2025 06:34:58 +0000 Subject: [PATCH 03/10] feat: english translation 2. --- src/agent/da_buf.h | 2 +- src/agent/da_conf.c | 6 +- src/agent/da_conf.h | 8 +- src/agent/da_msg.c | 10 +- src/connector/mysql_operation.h | 2 +- src/core/global.h | 4 +- src/core/mem/feature.h | 6 +- src/core/mem/mallocator.h | 6 +- src/core/mem/pt_malloc.h | 180 ++++++++++++++++---------------- src/core/mem/sys_malloc.h | 66 ++++++------ src/core/node/empty_filter.h | 12 +-- src/core/node/node_index.h | 12 +-- src/core/node/node_list.h | 4 +- src/core/node/node_set.h | 38 +++---- src/core/tree/tree_data.h | 172 +++++++++++++++--------------- src/hwcserver/afile_pos.h | 12 +-- src/hwcserver/async_file.h | 18 ++-- src/libs/common/protocol.h | 2 +- src/libs/common/section.h | 14 +-- src/libs/common/shmem.h | 2 +- src/libs/stat/stat_dtc_def.cc | 4 +- 21 files changed, 290 insertions(+), 290 deletions(-) diff --git a/src/agent/da_buf.h b/src/agent/da_buf.h index f47110d0..acc623bc 100644 --- a/src/agent/da_buf.h +++ b/src/agent/da_buf.h @@ -38,7 +38,7 @@ STAILQ_HEAD(buf_stqh, mbuf); #define MBUF_MAGIC 0xdeadbeef /* - * 最小的长度应该把msg头接收下来 + * The minimum length should receive the msg header */ #define MBUF_MIN_SIZE 256 #define MBUF_MAX_SIZE 16777216 diff --git a/src/agent/da_conf.c b/src/agent/da_conf.c index 716d6111..9199dcf5 100644 --- a/src/agent/da_conf.c +++ b/src/agent/da_conf.c @@ -531,7 +531,7 @@ static int conf_parse_core(struct conf *cf) { return -1; } - //转存一下localip到conf_pool中,后续server_pool需要使用 + //store localip to conf_pool for later use by server_pool struct conf_pool *tmpCP = (struct conf_pool *)void_cp; strncpy(tmpCP->localip, cf->localip, sizeof(tmpCP->localip)); @@ -687,7 +687,7 @@ static int conf_add_ss(struct conf *cf) { return -1; } - //转存一下localip到conf_pool中,后续server_pool需要使用 + //store localip to conf_pool for later use by server_pool struct conf_pool *tmpCP = (struct conf_pool *)void_cp; strncpy(tmpCP->localip, cf->localip, sizeof(tmpCP->localip)); @@ -1165,7 +1165,7 @@ struct conf *conf_create(char *filename) { return NULL; } - //后续需要用到本地IP,所以放在前面获取 + //need to use local IP later, so get it first get_local_ip(cf->localip, sizeof(cf->localip)); status = conf_parse(cf); diff --git a/src/agent/da_conf.h b/src/agent/da_conf.h index a8a85baa..33908113 100644 --- a/src/agent/da_conf.h +++ b/src/agent/da_conf.h @@ -94,11 +94,11 @@ struct conf_pool { int instance_report; int auto_remove_replica; - int top_percentile_enable; /*tp99 性能指标开启状态*/ - struct string top_percentile_domain; /*tp99 性能指标上报服务器地址*/ - int top_percentile_port; /*tp99 性能指标上报服务器端口*/ + int top_percentile_enable; /* tp99 performance metrics enable status */ + struct string top_percentile_domain; /* tp99 performance metrics reporting server address */ + int top_percentile_port; /* tp99 performance metrics reporting server port */ - char localip[16]; /*本地IP,放在此位置*/ + char localip[16]; /* Local IP, placed at this position */ unsigned valid : 1; /* valid? */ }; diff --git a/src/agent/da_msg.c b/src/agent/da_msg.c index 48d9b8a5..3de0c42c 100644 --- a/src/agent/da_msg.c +++ b/src/agent/da_msg.c @@ -124,7 +124,7 @@ int msg_init() { } msg_id = 0; frag_id = 0; - //红黑树,超时设置 + // Red-black tree, timeout settings rbtree_init(&tmo_rbt, &tmo_rbs); return 0; } @@ -244,7 +244,7 @@ struct msg *msg_get(struct conn *conn, bool request) { } /* - *释放msg所对应的资源,回收msg对象 + * Release resources associated with msg, reclaim msg object */ void msg_put(struct msg *m) { @@ -455,8 +455,8 @@ int msg_recv(struct context *ctx, struct conn *conn) { do { /* - * 从msg池中获取一个msg,当由于内存原因获取msg失败时置 - * conn->err标志,由于连接客户端关闭原因返回空的不处理 + * Get a msg from the msg pool. When getting msg fails due to memory reasons, + * set conn->err flag. Don't process empty returns due to client connection closure */ msg = conn->recv_next(ctx, conn, true); @@ -630,7 +630,7 @@ static int msg_send_chain(struct context *ctx, struct conn *conn, msg->sending = 0; conn->send_done(ctx, conn, msg); } - //因为要执行TAILQ_REMOVE(&send_msgq, msg, m_tqe); + // Because we need to execute TAILQ_REMOVE(&send_msgq, msg, m_tqe); continue; } diff --git a/src/connector/mysql_operation.h b/src/connector/mysql_operation.h index 818cb049..ce5c535e 100644 --- a/src/connector/mysql_operation.h +++ b/src/connector/mysql_operation.h @@ -56,7 +56,7 @@ class ConnectorProcess { unsigned int proc_timeout; protected: - /* 将字符串printf在原来字符串的后面,如果buffer不够大会自动重新分配buffer */ + /* Printf string to the end of original string, buffer will be automatically reallocated if not large enough */ void init_table_name(const DTCValue *key, int field_type); void init_sql_buffer(void); diff --git a/src/core/global.h b/src/core/global.h index 6ebd1c72..14ec38fb 100644 --- a/src/core/global.h +++ b/src/core/global.h @@ -24,7 +24,7 @@ DTC_BEGIN_NAMESPACE -/* 共享内存操作定义 */ +/* Shared memory operation definitions */ #define M_HANDLE(ptr) PtMalloc::instance()->get_handle(ptr) #define M_POINTER(type, v) PtMalloc::instance()->Pointer(v) #define M_MALLOC(size) PtMalloc::instance()->Malloc(size) @@ -33,7 +33,7 @@ DTC_BEGIN_NAMESPACE #define M_FREE(v) PtMalloc::instance()->Free(v) #define M_ERROR() PtMalloc::instance()->get_err_msg() -/* Node查找函数 */ +/* Node search functions */ #define I_SEARCH(id) NodeIndex::instance()->do_search(id) #define I_INSERT(node) NodeIndex::instance()->do_insert(node) /*#define I_DELETE(node) NodeIndex::instance()->Delete(node) */ diff --git a/src/core/mem/feature.h b/src/core/mem/feature.h index 2d3a06e4..2dc8eaf4 100644 --- a/src/core/mem/feature.h +++ b/src/core/mem/feature.h @@ -67,11 +67,11 @@ class Feature { const uint32_t attr = 0); FEATURE_INFO_T *get_feature_by_id(const uint32_t id); - //创建物理内存并格式化 + //Create physical memory and format int do_init(const uint32_t num = MIN_FEATURES); - //绑定到物理内存 + //Bind to physical memory int do_attach(MEM_HANDLE_T handle); - //脱离物理内存 + //Detach from physical memory int do_detach(void); public: diff --git a/src/core/mem/mallocator.h b/src/core/mem/mallocator.h index 9df28e29..5656297b 100644 --- a/src/core/mem/mallocator.h +++ b/src/core/mem/mallocator.h @@ -114,10 +114,10 @@ class MallocBase { virtual ALLOC_SIZE_T ask_for_destroy_size(ALLOC_HANDLE_T hHandl) = 0; /************************************************* - Description: 检测handle是否有效 - Input: 内存句柄 + Description: Check if handle is valid + Input: Memory handle Output: - Return: 0: 有效; -1:无效 + Return: 0: valid; -1: invalid *************************************************/ virtual int handle_is_valid(ALLOC_HANDLE_T mem_handle) = 0; }; diff --git a/src/core/mem/pt_malloc.h b/src/core/mem/pt_malloc.h index a92cc3b9..e16763a2 100644 --- a/src/core/mem/pt_malloc.h +++ b/src/core/mem/pt_malloc.h @@ -75,33 +75,33 @@ typedef struct { #define DTC_SIGN_C 0xFFFFFFFFU #define DTC_SIGN_D 0xFFFFFFFFU -#define DTC_VER_MIN 4 // 本代码认识的dtc内存最小版本 +#define DTC_VER_MIN 4 // Minimum DTC memory version recognized by this code #define DTC_RESERVE_SIZE (4 * 1024UL) -#define EC_NO_MEM 2041 // 内存不足错误码 +#define EC_NO_MEM 2041 // Insufficient memory error code #define EC_KEY_EXIST 2042 #define EC_KEY_NOT_EXIST 2043 #define MAXSTATCOUNT 10000 * 3600 * 12 struct _MemHead { - uint32_t m_auiSign[14]; // 内存格式标记 - unsigned short m_ushVer; // 内存格式版本号 - unsigned short m_ushHeadSize; // 头大小 - INTER_SIZE_T m_tSize; // 内存总大小 - INTER_SIZE_T m_tUserAllocSize; // 上层应用分配到可用的内存大小 - INTER_SIZE_T m_tUserAllocChunkCnt; // 上层应用分配的内存块数量 - uint32_t m_uiFlags; // 特性标记 - INTER_HANDLE_T m_hBottom; // 上层应用可用内存底地址 - INTER_HANDLE_T m_hReserveZone; // 为上层应用保留的地址 - INTER_HANDLE_T m_hTop; // 目前分配到的最高地址 - INTER_SIZE_T m_tLastFreeChunkSize; // 最近一次free后,合并得到的chunk大小 - uint16_t m_ushBinCnt; // bin的数量 - uint16_t m_ushFastBinCnt; // fastbin数量 - uint32_t m_auiBinBitMap[(NBINS - 1) / 32 + 1]; // bin的bitmap - uint32_t m_shmIntegrity; //共享内存完整性标记 + uint32_t m_auiSign[14]; // Memory format signature + unsigned short m_ushVer; // Memory format version number + unsigned short m_ushHeadSize; // Header size + INTER_SIZE_T m_tSize; // Total memory size + INTER_SIZE_T m_tUserAllocSize; // Memory size available to upper layer applications + INTER_SIZE_T m_tUserAllocChunkCnt; // Number of memory chunks allocated by upper layer applications + uint32_t m_uiFlags; // Feature flags + INTER_HANDLE_T m_hBottom; // Bottom address of memory available to upper layer applications + INTER_HANDLE_T m_hReserveZone; // Reserved address for upper layer applications + INTER_HANDLE_T m_hTop; // Current highest allocated address + INTER_SIZE_T m_tLastFreeChunkSize; // Merged chunk size after the last free operation + uint16_t m_ushBinCnt; // Number of bins + uint16_t m_ushFastBinCnt; // Number of fast bins + uint32_t m_auiBinBitMap[(NBINS - 1) / 32 + 1]; // Bin bitmap + uint32_t m_shmIntegrity; // Shared memory integrity flag char m_achReserv - [872]; // 保留字段 (使CMemHead的大小为1008Bytes,加上后面的bins后达到4K) + [872]; // Reserved fields (making CMemHead size 1008 bytes, reaching 4K with bins that follow) } __attribute__((__aligned__(4))); typedef struct _MemHead MemHead; @@ -124,8 +124,8 @@ class PtMalloc : public MallocBase { StatItem statDataSize; StatItem statMemoryTop; - uint64_t statTmpDataSizeRecently; //最近分配的内存大小 - uint64_t statTmpDataAllocCountRecently; //最近分配的内存次数 + uint64_t statTmpDataSizeRecently; // Recently allocated memory size + uint64_t statTmpDataAllocCountRecently; // Recent memory allocation count StatItem statAverageDataSizeRecently; inline void add_alloc_size_to_stat(uint64_t size) { @@ -142,7 +142,7 @@ class PtMalloc : public MallocBase { } } - //最小的chrunk size, + // Minimum chunk size unsigned int minChunkSize; inline unsigned int get_min_chunk_size(void) { @@ -189,7 +189,7 @@ class PtMalloc : public MallocBase { return (m_ptBin[uiBinIdx].m_hNextChunk == INVALID_HANDLE); } - // 内部做一下统计 + // Internal statistics ALLOC_HANDLE_T inter_malloc(ALLOC_SIZE_T tSize); ALLOC_HANDLE_T inter_re_alloc(ALLOC_HANDLE_T hHandle, ALLOC_SIZE_T tSize, @@ -223,40 +223,40 @@ class PtMalloc : public MallocBase { } /************************************************* - Description: 格式化内存 - Input: pAddr 内存块地址 - tSize 内存块大小 - Return: 0为成功,非0失败 - *************************************************/ + Description: Format memory + Input: pAddr Memory block address + tSize Memory block size + Return: 0 on success, non-zero on failure + **************************************************/ int do_init(void *pAddr, INTER_SIZE_T tSize); /************************************************* - Description: attach已经格式化好的内存块 - Input: pAddr 内存块地址 - tSize 内存块大小 - Return: 0为成功,非0失败 - *************************************************/ + Description: Attach to already formatted memory block + Input: pAddr Memory block address + tSize Memory block size + Return: 0 on success, non-zero on failure + **************************************************/ int do_attach(void *pAddr, INTER_SIZE_T tSize); /************************************************* - Description: 检测内存块的dtc版本 - Input: pAddr 内存块地址 - tSize 内存块大小 + Description: Detect DTC version of memory block + Input: pAddr Memory block address + tSize Memory block size Output: - Return: 0为成功,非0失败 - *************************************************/ + Return: 0 on success, non-zero on failure + **************************************************/ int detect_version(); - /* 共享内存完整性检测接口 */ + /* Shared memory integrity check interface */ int share_memory_integrity(); void set_share_memory_integrity(const int flag); /************************************************* - Description: 检测内部数据结构bin是否正确 + Description: Check if internal data structure bin is correct Input: Output: - Return: 0为成功,非0失败 - *************************************************/ + Return: 0 on success, non-zero on failure + **************************************************/ int check_bin(); #if BIN_MEM_CHECK int check_mem(); @@ -265,98 +265,98 @@ class PtMalloc : public MallocBase { int dump_mem(); /************************************************* - Description: 分配内存 - Input: tSize 分配的内存大小 + Description: Allocate memory + Input: tSize Size of memory to allocate Output: - Return: 内存块句柄,INVALID_HANDLE为失败 - *************************************************/ + Return: Memory block handle, INVALID_HANDLE on failure + **************************************************/ ALLOC_HANDLE_T Malloc(ALLOC_SIZE_T tSize); /************************************************* - Description: 分配内存,并将内存初始化为0 - Input: tSize 分配的内存大小 + Description: Allocate memory and initialize to 0 + Input: tSize Size of memory to allocate Output: - Return: 内存块句柄,INVALID_HANDLE为失败 - *************************************************/ + Return: Memory block handle, INVALID_HANDLE on failure + **************************************************/ ALLOC_HANDLE_T Calloc(ALLOC_SIZE_T tSize); /************************************************* - Description: 重新分配内存 - Input: hHandle 老内存句柄 - tSize 新分配的内存大小 + Description: Reallocate memory + Input: hHandle Old memory handle + tSize New memory size Output: - Return: 内存块句柄,INVALID_HANDLE为失败(失败时不会释放老内存块) - *************************************************/ + Return: Memory block handle, INVALID_HANDLE on failure (old memory block not freed on failure) + **************************************************/ ALLOC_HANDLE_T ReAlloc(ALLOC_HANDLE_T hHandle, ALLOC_SIZE_T tSize); /************************************************* - Description: 释放内存 - Input: hHandle 内存句柄 + Description: Free memory + Input: hHandle Memory handle Output: - Return: 0为成功,非0失败 - *************************************************/ + Return: 0 on success, non-zero on failure + **************************************************/ int Free(ALLOC_HANDLE_T hHandle); /************************************************* - Description: 获取释放这块内存后可以得到多少free空间 - Input: hHandle 内存句柄 + Description: Get how much free space can be obtained after freeing this memory + Input: hHandle Memory handle Output: - Return: >0为成功,0失败 - *************************************************/ + Return: >0 on success, 0 on failure + **************************************************/ unsigned ask_for_destroy_size(ALLOC_HANDLE_T hHandle); /************************************************* - Description: 获取内存块大小 - Input: hHandle 内存句柄 + Description: Get memory block size + Input: hHandle Memory handle Output: - Return: 内存大小 - *************************************************/ + Return: Memory size + **************************************************/ ALLOC_SIZE_T chunk_size(ALLOC_HANDLE_T hHandle); /************************************************* - Description: 获取用户已经分配的内存总大小 + Description: Get total size of memory already allocated by user Input: Output: - Return: 内存大小 - *************************************************/ + Return: Memory size + **************************************************/ INTER_SIZE_T user_alloc_size() { return m_pstHead->m_tUserAllocSize; } /************************************************* - Description: 获取内存总大小 + Description: Get total memory size Input: Output: - Return: 内存大小 - *************************************************/ + Return: Memory size + **************************************************/ INTER_SIZE_T total_size() { return m_pstHead->m_tSize; } /************************************************* - Description: 最近一次释放内存,合并后的chunk大小 + Description: Size of merged chunk after the last memory free operation Input: Output: - Return: 内存大小 - *************************************************/ + Return: Memory size + **************************************************/ ALLOC_SIZE_T last_free_size(); /************************************************* - Description: 获取为上层应用保留的内存块(大小为DTC_RESERVE_SIZE=4K) + Description: Get reserved memory block for upper layer applications (size = DTC_RESERVE_SIZE = 4K) Input: Output: - Return: 内存句柄 - *************************************************/ + Return: Memory handle + **************************************************/ ALLOC_HANDLE_T get_reserve_zone(); /************************************************* - Description: 将句柄转换成内存地址 - Input: 内存句柄 + Description: Convert handle to memory address + Input: Memory handle Output: - Return: 内存地址,如果句柄无效返回NULL - *************************************************/ + Return: Memory address, NULL if handle is invalid + **************************************************/ inline void *handle_to_ptr(ALLOC_HANDLE_T hHandle) { if (hHandle == INVALID_HANDLE) @@ -365,11 +365,11 @@ class PtMalloc : public MallocBase { } /************************************************* - Description: 将内存地址转换为句柄 - Input: 内存地址 + Description: Convert memory address to handle + Input: Memory address Output: - Return: 内存句柄,如果地址无效返回INVALID_HANDLE - *************************************************/ + Return: Memory handle, INVALID_HANDLE if address is invalid + **************************************************/ inline ALLOC_HANDLE_T ptr_to_handle(void *p) { if ((char *)p < (char *)m_pBaseAddr || @@ -379,11 +379,11 @@ class PtMalloc : public MallocBase { } /************************************************* - Description: 检测handle是否有效 - Input: 内存句柄 + Description: Check if handle is valid + Input: Memory handle Output: - Return: 0: 有效; -1:无效 - *************************************************/ + Return: 0: valid; -1: invalid + **************************************************/ virtual int handle_is_valid(ALLOC_HANDLE_T mem_handle) { return 0; diff --git a/src/core/mem/sys_malloc.h b/src/core/mem/sys_malloc.h index a636c0fa..4611168f 100644 --- a/src/core/mem/sys_malloc.h +++ b/src/core/mem/sys_malloc.h @@ -53,11 +53,11 @@ class SysMalloc : public MallocBase { } /************************************************* - Description: 分配内存 - Input: tSize 分配的内存大小 + Description: Allocate memory + Input: tSize Size of memory to allocate Output: - Return: 内存块句柄,INVALID_HANDLE为失败 - *************************************************/ + Return: Memory block handle, INVALID_HANDLE on failure + **************************************************/ ALLOC_HANDLE_T Malloc(ALLOC_SIZE_T tSize) { void *p = malloc(sizeof(ALLOC_SIZE_T) + tSize); @@ -70,11 +70,11 @@ class SysMalloc : public MallocBase { } /************************************************* - Description: 分配内存,并将内存初始化为0 - Input: tSize 分配的内存大小 + Description: Allocate memory and initialize to 0 + Input: tSize Size of memory to allocate Output: - Return: 内存块句柄,INVALID_HANDLE为失败 - *************************************************/ + Return: Memory block handle, INVALID_HANDLE on failure + **************************************************/ ALLOC_HANDLE_T Calloc(ALLOC_SIZE_T tSize) { void *p = calloc(1, sizeof(ALLOC_SIZE_T) + tSize); @@ -87,12 +87,12 @@ class SysMalloc : public MallocBase { } /************************************************* - Description: 重新分配内存 - Input: hHandle 老内存句柄 - tSize 新分配的内存大小 + Description: Reallocate memory + Input: hHandle Old memory handle + tSize New memory size Output: - Return: 内存块句柄,INVALID_HANDLE为失败(失败时不会释放老内存块) - *************************************************/ + Return: Memory block handle, INVALID_HANDLE on failure (old memory block not freed on failure) + **************************************************/ ALLOC_HANDLE_T ReAlloc(ALLOC_HANDLE_T hHandle, ALLOC_SIZE_T tSize) { char *old; @@ -114,11 +114,11 @@ class SysMalloc : public MallocBase { } /************************************************* - Description: 释放内存 - Input: hHandle 内存句柄 + Description: Free memory + Input: hHandle Memory handle Output: - Return: 0为成功,非0失败 - *************************************************/ + Return: 0 on success, non-zero on failure + **************************************************/ int Free(ALLOC_HANDLE_T hHandle) { if (hHandle == INVALID_HANDLE) @@ -130,11 +130,11 @@ class SysMalloc : public MallocBase { } /************************************************* - Description: 获取内存块大小 - Input: hHandle 内存句柄 + Description: Get memory block size + Input: hHandle Memory handle Output: - Return: 内存大小 - *************************************************/ + Return: Memory size + **************************************************/ ALLOC_SIZE_T chunk_size(ALLOC_HANDLE_T hHandle) { if (hHandle == INVALID_HANDLE) @@ -145,22 +145,22 @@ class SysMalloc : public MallocBase { } /************************************************* - Description: 将句柄转换成内存地址 - Input: 内存句柄 + Description: Convert handle to memory address + Input: Memory handle Output: - Return: 内存地址,如果句柄无效返回NULL - *************************************************/ + Return: Memory address, NULL if handle is invalid + **************************************************/ void *handle_to_ptr(ALLOC_HANDLE_T hHandle) { return (char *)0 + hHandle; } /************************************************* - Description: 将内存地址转换为句柄 - Input: 内存地址 + Description: Convert memory address to handle + Input: Memory address Output: - Return: 内存句柄,如果地址无效返回INVALID_HANDLE - *************************************************/ + Return: Memory handle, INVALID_HANDLE if address is invalid + **************************************************/ ALLOC_HANDLE_T ptr_to_handle(void *p) { return get_handle(p); @@ -173,11 +173,11 @@ class SysMalloc : public MallocBase { } /************************************************* - Description: 检测handle是否有效 - Input: 内存句柄 + Description: Check if handle is valid + Input: Memory handle Output: - Return: 0: 有效; -1:无效 - *************************************************/ + Return: 0: valid; -1: invalid + **************************************************/ virtual int handle_is_valid(ALLOC_HANDLE_T mem_handle) { return 0; diff --git a/src/core/node/empty_filter.h b/src/core/node/empty_filter.h index f57ec6ba..7faa51bb 100644 --- a/src/core/node/empty_filter.h +++ b/src/core/node/empty_filter.h @@ -34,11 +34,11 @@ struct _enf_table { typedef struct _enf_table ENF_TABLE_T; struct _empty_node_filter { - uint32_t enf_total; // 占用的总内存 - uint32_t enf_step; // 表增长步长 - uint32_t enf_mod; // 分表算子 + uint32_t enf_total; // Total memory occupied + uint32_t enf_step; // Table growth step size + uint32_t enf_mod; // Table partitioning modulus - ENF_TABLE_T enf_tables[0]; // 位图表 + ENF_TABLE_T enf_tables[0]; // Bitmap tables }; typedef struct _empty_node_filter ENF_T; @@ -75,12 +75,12 @@ class EmptyNodeFilter { } private: - /* 计算表id */ + /* Calculate table ID */ uint32_t get_index(uint32_t key) { return key % _enf->enf_mod; } - /* 计算表中的位图偏移 */ + /* Calculate bitmap offset in table */ uint32_t get_offset(uint32_t key) { return key / _enf->enf_mod; diff --git a/src/core/node/node_index.h b/src/core/node/node_index.h index abbf206d..90e6a067 100644 --- a/src/core/node/node_index.h +++ b/src/core/node/node_index.h @@ -29,13 +29,13 @@ DTC_BEGIN_NAMESPACE (((1UL << 16) * sizeof(MEM_HANDLE_T)) + \ sizeof(SECOND_INDEX_T)) // second-index size -#define OFFSET1(id) ((id) >> 24) //高8位,一级index -#define OFFSET2(id) (((id)&0xFFFF00) >> 8) //中间16位,二级index -#define OFFSET3(id) ((id)&0xFF) //低8位 +#define OFFSET1(id) ((id) >> 24) // High 8 bits, first-level index +#define OFFSET2(id) (((id)&0xFFFF00) >> 8) // Middle 16 bits, second-level index +#define OFFSET3(id) ((id)&0xFF) // Low 8 bits struct first_index { - uint32_t fi_used; //一级index使用个数 - MEM_HANDLE_T fi_h[0]; //存放二级index的handle + uint32_t fi_used; // Number of first-level index entries used + MEM_HANDLE_T fi_h[0]; // Handles for storing second-level index }; typedef struct first_index FIRST_INDEX_T; @@ -67,7 +67,7 @@ class NodeIndex { { return errmsg_; } - ///* 内存区块操作函数 */ + ///* Memory block operation functions */ int do_init(size_t mem_size); int do_attach(MEM_HANDLE_T handle); int do_detach(void); diff --git a/src/core/node/node_list.h b/src/core/node/node_list.h index 0eda85e7..236a03cf 100644 --- a/src/core/node/node_list.h +++ b/src/core/node/node_list.h @@ -77,11 +77,11 @@ inline int NODE_LIST_EMPTY(Node head) return head.lru_next() == head.node_id(); } -/*正向遍历*/ +/* Forward traversal */ #define NODE_LIST_FOR_EACH(pos, head) \ for (pos = head.Next(); pos != head; pos = pos.Next()) -/*反向遍历*/ +/* Reverse traversal */ #define NODE_LIST_FOR_EACH_RVS(pos, head) \ for (pos = head.Prev(); pos != head; pos = pos.Prev()) diff --git a/src/core/node/node_set.h b/src/core/node/node_set.h index fce8738b..891d9d94 100644 --- a/src/core/node/node_set.h +++ b/src/core/node/node_set.h @@ -32,14 +32,14 @@ enum attr_type { }; typedef enum attr_type ATTR_TYPE_T; -//nodeset释放掉的node链表 +// Node list freed by nodeset struct ng_delete { uint16_t top; uint16_t count; }; typedef struct ng_delete NG_DELE_T; -//nodeset属性 +// Nodeset attributes struct ng_attr { uint32_t count; uint32_t offset[0]; @@ -52,43 +52,43 @@ struct node_set { NG_LIST_T ng_list; NG_DELE_T ng_dele; uint16_t ng_free; - uint8_t ng_rsv[2]; //保留空间 + uint8_t ng_rsv[2]; // Reserved space NODE_ID_T ng_nid; NG_ATTR_T ng_attr; private: - Node allocate_node(void); // 分配一个Node - int release_node(Node); // 释放一个Node - bool is_full(void); // NodeGroup是否已经分配完 - int do_init(NODE_ID_T id); // NodeGroup初始化 - int system_reserved_init(); // 系统保留的NG初始化 + Node allocate_node(void); // Allocate a Node + int release_node(Node); // Release a Node + bool is_full(void); // Whether NodeGroup is fully allocated + int do_init(NODE_ID_T id); // NodeGroup initialization + int system_reserved_init(); // System reserved NG initialization // this routine return: // 0, passed, empty lru present // 1, passed, empty lru created // <0, integrity error - int system_reserved_check(); // 系统保留的NG一致性检查 - static uint32_t Size(void); // 返回nodegroup的总大小 + int system_reserved_check(); // System reserved NG consistency check + static uint32_t Size(void); // Return total size of nodegroup private: - //属性操作接口,供CNode访问 + // Attribute operation interface for CNode access NODE_ID_T node_id(int idx) const; - NODE_ID_T &next_node_id(int idx); // attr1] -> 下一个Node的NodeID - NODE_ID_T *node_lru(int idx); // attr[2] -> LRU链表 - MEM_HANDLE_T &vd_handle(int idx); // attr[3] -> 数据handle - bool is_dirty(int idx); // attr[4] -> 脏位图 + NODE_ID_T &next_node_id(int idx); // attr1] -> NodeID of next Node + NODE_ID_T *node_lru(int idx); // attr[2] -> LRU list + MEM_HANDLE_T &vd_handle(int idx); // attr[3] -> Data handle + bool is_dirty(int idx); // attr[4] -> Dirty bitmap void set_dirty(int idx); void clr_dirty(int idx); - //返回每种属性块的起始地址 + // Return start address of each attribute block template T *__CAST__(ATTR_TYPE_T t) { return (T *)((char *)this + ng_attr.offset[t]); } private: - static uint32_t attr_count(void); // 支持的属性个数 - static uint32_t attr_size(void); // 所有属性的内存大小 - static uint32_t base_header_size(void); // 除开属性外,Nodegroup的大小 + static uint32_t attr_count(void); // Number of supported attributes + static uint32_t attr_size(void); // Memory size of all attributes + static uint32_t base_header_size(void); // Size of Nodegroup excluding attributes static const uint32_t NG_ATTR_SIZE[]; friend class Node; diff --git a/src/core/tree/tree_data.h b/src/core/tree/tree_data.h index df0f6d29..f44c45d4 100644 --- a/src/core/tree/tree_data.h +++ b/src/core/tree/tree_data.h @@ -27,10 +27,10 @@ #include "table/table_def.h" typedef enum _TreeCheckResult { - CHK_CONTINUE, // 继续访问这棵子树 - CHK_SKIP, // 忽略这棵子树,继续访问其他节点 - CHK_STOP, // 终止访问循环 - CHK_DESTROY // 销毁这棵子树 + CHK_CONTINUE, // Continue visiting this subtree + CHK_SKIP, // Skip this subtree, continue visiting other nodes + CHK_STOP, // Terminate visit loop + CHK_DESTROY // Destroy this subtree } TreeCheckResult; #define TTREE_INDEX_POS 1 @@ -52,15 +52,15 @@ typedef int (TreeData::*SubRowProcess)(DTCJobOperation &job_op, class DTCFlushRequest; /************************************************************ - Description: t-tree根节点的数据结构 + Description: Data structure of t-tree root node Version: DTC 3.0 ***********************************************************/ struct _RootData { unsigned char data_type_; uint32_t tree_size_; - uint32_t total_raw_size_; //所有RawData总和,不包含Header - uint32_t node_count_; //索引T树中Node总计个数 - uint32_t row_count_; //索引T树中总计行数 + uint32_t total_raw_size_; // Sum of all RawData, excluding Header + uint32_t node_count_; // Total number of Nodes in index T-tree + uint32_t row_count_; // Total number of rows in index T-tree uint8_t get_request_count_; uint16_t latest_request_time_; uint16_t latest_update_time_; @@ -84,9 +84,9 @@ typedef struct _CmpCookie { typedef struct _pCookie { MEM_HANDLE_T *p_handle; - uint32_t has_got_node_count; //已经遍历到的节点个数 - uint32_t need_find_node_count; //需要遍历的节点个数,0代表不限 - uint32_t has_got_row_count; //已经遍历到的数据行数 + uint32_t has_got_node_count; // Number of nodes traversed + uint32_t need_find_node_count; // Number of nodes to traverse, 0 means unlimited + uint32_t has_got_row_count; // Number of data rows traversed _pCookie() : p_handle(NULL), has_got_node_count(0), need_find_node_count(0), has_got_row_count(0) @@ -95,17 +95,17 @@ typedef struct _pCookie { } pResCookie; typedef enum _CondType { - COND_VAL_SET, // 查询特定的值列表 - COND_RANGE, // 查询value[0] ~ Key-value[0]<=value[1].s64 - COND_GE, // 查询大于等于value[0]的key - COND_LE, // 查询小于等于value[0]的key - COND_ALL // 遍历所有key + COND_VAL_SET, // Query specific value list + COND_RANGE, // Query value[0] ~ Key-value[0]<=value[1].s64 + COND_GE, // Query keys greater than or equal to value[0] + COND_LE, // Query keys less than or equal to value[0] + COND_ALL // Traverse all keys } CondType; typedef enum _Order { - ORDER_ASC, // 升序 - ORDER_DEC, // 降序 - ORDER_POS, // 后序访问 + ORDER_ASC, // Ascending order + ORDER_DEC, // Descending order + ORDER_POS, // Post-order access } Order; typedef struct { @@ -117,14 +117,14 @@ typedef struct { class TreeData { private: - RootData *p_tree_root_; // 注意:地址可能会因为realloc而改变 + RootData *p_tree_root_; // Note: address may change due to realloc Ttree t_tree_; DTCTableDefinition *p_table_; uint8_t index_depth_; int table_index_; char err_message_[4096]; - ALLOC_SIZE_T need_new_bufer_size; // 最近一次分配内存失败需要的大小 + ALLOC_SIZE_T need_new_bufer_size; // Size needed for the most recent memory allocation failure uint64_t affected_rows_; MEM_HANDLE_T handle_; @@ -151,7 +151,7 @@ class TreeData { MEM_HANDLE_T p_record_; /************************************************************ - Description: 递归查找数据的cookie参数 + Description: Cookie parameters for recursive data search Version: DTC 3.0 ***********************************************************/ typedef struct { @@ -253,12 +253,12 @@ class TreeData { } /************************************************* - Description: 新分配一块内存,并初始化 - Input: iKeySize key的格式,0为变长,非0为定长长度 - pchKey 为格式化后的key,变长key的第0字节为长度 + Description: Allocate new memory block and initialize + Input: iKeySize Key format, 0 for variable length, non-zero for fixed length + pchKey Formatted key, byte 0 of variable length key is the length Output: - Return: 0为成功,非0失败 - *************************************************/ + Return: 0 on success, non-zero on failure + **************************************************/ int do_init(int iKeySize, const char *pchKey); int do_init(uint8_t uchKeyIdx, int iKeySize, const char *pchKey, int laId = -1, int expireId = -1, int nodeIdx = -1); @@ -287,103 +287,103 @@ class TreeData { } /************************************************* - Description: 最近一次分配内存失败所需要的内存大小 + Description: Memory size needed for the most recent memory allocation failure Input: Output: - Return: 返回所需要的内存大小 - *************************************************/ + Return: Returns the required memory size + **************************************************/ ALLOC_SIZE_T need_size() { return need_new_bufer_size; } /************************************************* - Description: 销毁uchLevel以及以下级别的子树 - Input: uchLevel 销毁uchLevel以及以下级别的子树,显然uchLevel应该在1到uchIndexDepth之间 + Description: Destroy subtrees at uchLevel and below + Input: uchLevel Destroy subtrees at uchLevel and below, obviously uchLevel should be between 1 and uchIndexDepth Output: - Return: 0为成功,非0失败 - *************************************************/ + Return: 0 on success, non-zero on failure + **************************************************/ // int destory(uint8_t uchLevel=1); int destory(); /************************************************* - Description: 插入一行数据 - Input: stRow 包含index字段以及后面字段的值 - pfComp 用户自定义的key比较函数 - uchFlag 行标记 + Description: Insert a row of data + Input: stRow Values of index fields and subsequent fields + pfComp User-defined key comparison function + uchFlag Row flag Output: - Return: 0为成功,非0失败 - *************************************************/ + Return: 0 on success, non-zero on failure + **************************************************/ int insert_row_flag(const RowValue &stRow, KeyComparator pfComp, unsigned char uchFlag); /************************************************* - Description: 插入一行数据 - Input: stRow 包含index字段以及后面字段的值 - pfComp 用户自定义的key比较函数 - isDirty 是否脏数据 + Description: Insert a row of data + Input: stRow Values of index fields and subsequent fields + pfComp User-defined key comparison function + isDirty Whether it's dirty data Output: - Return: 0为成功,非0失败 - *************************************************/ + Return: 0 on success, non-zero on failure + **************************************************/ int insert_row(const RowValue &stRow, KeyComparator pfComp, bool isDirty); /************************************************* - Description: 查找一行数据 - Input: stCondition 包含各级index字段的值 - pfComp 用户自定义的key比较函数 + Description: Find a row of data + Input: stCondition Values of index fields at all levels + pfComp User-defined key comparison function - Output: hRecord 查找到的一个指向CRawData的句柄 - Return: 0为找不到,1为找到数据 - *************************************************/ + Output: hRecord Handle pointing to found CRawData + Return: 0 if not found, 1 if data is found + **************************************************/ int do_find(const RowValue &stCondition, KeyComparator pfComp, ALLOC_HANDLE_T &hRecord); /************************************************* - Description: 按索引条件查找 - Input: pstCond 一个数组,而且大小刚好是uchIndexDepth - pfComp 用户自定义的key比较函数 - pfVisit 当查找到记录时,用户自定义的访问数据函数 - pCookie 访问数据函数使用的cookie参数 + Description: Search by index condition + Input: pstCond An array with size exactly equal to uchIndexDepth + pfComp User-defined key comparison function + pfVisit User-defined data access function when record is found + pCookie Cookie parameter used by the data access function Output: - Return: 0为成功,其他值为错误 - *************************************************/ + Return: 0 on success, other values indicate error + **************************************************/ int do_search(const TtreeCondition *pstCond, KeyComparator pfComp, VisitRawData pfVisit, CheckTreeFunc pfCheck, void *pCookie); /************************************************* - Description: 从小到大遍历所有数据 - Input: pfComp 用户自定义的key比较函数 - pfVisit 当查找到记录时,用户自定义的访问数据函数 - pCookie 访问数据函数使用的cookie参数 + Description: Traverse all data from small to large + Input: pfComp User-defined key comparison function + pfVisit User-defined data access function when record is found + pCookie Cookie parameter used by the data access function Output: - Return: 0为成功,其他值为错误 - *************************************************/ + Return: 0 on success, other values indicate error + **************************************************/ int traverse_forward(KeyComparator pfComp, VisitRawData pfVisit, void *pCookie); /************************************************* - Description: 根据指定的index值,删除符合条件的所有行(包括子树) - Input: uchCondIdxCnt 条件index的数量 - stCondition 包含各级index字段的值 - pfComp 用户自定义的key比较函数 + Description: Delete all rows matching conditions based on specified index values (including subtrees) + Input: uchCondIdxCnt Number of condition indexes + stCondition Values of index fields at all levels + pfComp User-defined key comparison function Output: - Return: 0为成功,其他值为错误 - *************************************************/ + Return: 0 on success, other values indicate error + **************************************************/ int delete_sub_row(uint8_t uchCondIdxCnt, const RowValue &stCondition, KeyComparator pfComp); /************************************************* - Description: 将某个级别的index值修改为另外一个值 - Input: uchCondIdxCnt 条件index的数量 - stCondition 包含各级index字段的值 - pfComp 用户自定义的key比较函数 - pstNewValue 对应最后一个条件字段的新index值 + Description: Modify index value at a certain level to another value + Input: uchCondIdxCnt Number of condition indexes + stCondition Values of index fields at all levels + pfComp User-defined key comparison function + pstNewValue New index value for the last condition field Output: - Return: 0为成功,其他值为错误 - *************************************************/ + Return: 0 on success, other values indicate error + **************************************************/ int update_index(uint8_t uchCondIdxCnt, const RowValue &stCondition, KeyComparator pfComp, const DTCValue *pstNewValue); unsigned ask_for_destroy_size(void); @@ -457,27 +457,27 @@ class TreeData { int delete_tree_data(DTCJobOperation &job_op); /************************************************* - Description: 获得T树中的Raw类型的每一行的数据 + Description: Get data from each row of Raw type in T-tree Output: - *************************************************/ + **************************************************/ int get_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord); /************************************************* - Description: 删除T树中的Raw类型的行的数据 + Description: Delete data from Raw type rows in T-tree Output: - *************************************************/ + **************************************************/ int delete_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord); /************************************************* - Description: 修改T树中的Raw类型的行的数据 + Description: Modify data from Raw type rows in T-tree Output: - *************************************************/ + **************************************************/ int update_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord); /************************************************* - Description: 替换T树中的Raw类型的行的数据,如没有此行则创建 + Description: Replace data from Raw type rows in T-tree, create if row doesn't exist Output: - *************************************************/ + **************************************************/ int replace_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord); /************************************************* diff --git a/src/hwcserver/afile_pos.h b/src/hwcserver/afile_pos.h index dc934c7a..d5ba0fa4 100644 --- a/src/hwcserver/afile_pos.h +++ b/src/hwcserver/afile_pos.h @@ -32,7 +32,7 @@ #endif /* - * 模拟异步文件 + * Simulate asynchronous file */ struct CAsyncFilePos { public: @@ -55,7 +55,7 @@ struct CAsyncFilePos { } /* - * 向前移动v bytes + * Move forward v bytes */ inline void Front(int v) { MEMORY_BARRIER(); @@ -64,13 +64,13 @@ struct CAsyncFilePos { MEMORY_BARRIER(); } /* - * 递增一个文件编号 + * Increment a file number */ inline void Shift(void) { MEMORY_BARRIER(); offset = 0; /* - * 有可能在这个点出现暂态,读者会认为自己GT写者,从而出错 + * Transient state may occur at this point where reader thinks it's GT writer, causing errors */ serial += 1; MEMORY_BARRIER(); @@ -90,9 +90,9 @@ struct CAsyncFilePos { } /* - * 切换文件时,有可能出现暂态出错,见Shift中的解释 + * When switching files, transient errors may occur, see explanation in Shift * - * 因为是无锁判定,所以在读者判定时,我们先调用IsTransient来检测是否暂态,如果是则sespend读者 + * Since it's lock-free determination, when reader determines, we first call IsTransient to detect if transient, if so suspend reader */ inline int IsTransient(const CAsyncFilePos &v) { return (serial == v.serial) && (offset > 0) && (v.offset == 0); diff --git a/src/hwcserver/async_file.h b/src/hwcserver/async_file.h index 06e16f09..4b370547 100644 --- a/src/hwcserver/async_file.h +++ b/src/hwcserver/async_file.h @@ -90,12 +90,12 @@ enum ESyncStatus * Async Controller file struct */ -/* FIXME: 必须8 bytes对齐 */ +/* FIXME: Must be 8 bytes aligned */ struct CControl { JournalID jid; CReaderPos rpos; CWriterPos wpos; - uint64_t flag; /* dirty flag: 全量同步是否完成 */ + uint64_t flag; /* dirty flag: whether full sync is completed */ }; /* @@ -152,7 +152,7 @@ class CAsyncFileController : public CMapBase { private: /* - * 当前仅用来表示full-sync是否完成 + * Currently only used to indicate whether full-sync is completed */ inline uint64_t & DirtyFlag() { CControl *p = (CControl *) _map; @@ -192,7 +192,7 @@ class CAsyncFileImpl:public CMapBase { inline int IsWriterEnd(int len) { /* - * 四字节长度 + 四字节的结束标志 + * 4-byte length + 4-byte end flag */ if (_pos.offset + len + 4 + 4 >= (unsigned)Size()) return 1; @@ -218,7 +218,7 @@ class CAsyncFileImpl:public CMapBase { }; /* - * 写者 + * Writer */ class CAsyncFileWriter { public: @@ -251,7 +251,7 @@ class CAsyncFileWriter { private: inline void AddToList(CAsyncFileImpl * p) { - //控制map文件在一定数量,否则可能会导致磁盘flush + // Control map files to a certain number, otherwise may cause disk flush if (_asyncfiles.size() >= (unsigned)_max) DropLastOne(); @@ -259,7 +259,7 @@ class CAsyncFileWriter { } /* - * unmap writer持有的最老的一个文件 + * Unmap the oldest file held by writer */ inline void DropLastOne() { CAsyncFileImpl *p = _asyncfiles.back(); @@ -276,7 +276,7 @@ class CAsyncFileWriter { }; /* - * 读者 + * Reader */ class CAsyncFileReader { public: @@ -300,7 +300,7 @@ class CAsyncFileReader { }; /* - * 检查日志合法性 + * Check log validity */ class CAsyncFileChecker { public: diff --git a/src/libs/common/protocol.h b/src/libs/common/protocol.h index 4ebc28bb..9f901d35 100644 --- a/src/libs/common/protocol.h +++ b/src/libs/common/protocol.h @@ -57,7 +57,7 @@ class DRequest { // OBSOLETED Invalidate = 14, Monitor = 15, - // work helper 重新载入配置文件 + // work helper reload configuration file ReloadConfig = 16, // master-slave backup Replicate = 17, diff --git a/src/libs/common/section.h b/src/libs/common/section.h index 084e6924..12fa9081 100644 --- a/src/libs/common/section.h +++ b/src/libs/common/section.h @@ -177,7 +177,7 @@ class SimpleSection { } void set_tag(uint8_t id, uint32_t val) { - //fix Unsigned to Signed + // Fix Unsigned to Signed if (tag_type(id) == DField::Signed) set_tag(id, DTCValue::Make((int64_t)val)); else if (tag_type(id) == DField::Unsigned) @@ -271,7 +271,7 @@ class DTCVersionInfo : public SimpleSection { { int major = 3; //, minor=0, micro=0; - /* 3.x系列的批量拆包之后没有version信息 */ + /* 3.x series batch unpacking has no version information */ if (NULL == CTLibVer().ptr) { log4cplus_debug("multi job have no version info"); return major; @@ -381,12 +381,12 @@ class DTCRequestInfo : public SimpleSection { uint64_t get_expire_time(int version) const { - /* server内部全部按照ms单位来处理超时 */ + /* Server processes all timeouts in ms units internally */ if (version >= 3) - /* 3.x 系列客户端发送的超时时间单位:us */ + /* 3.x series client sends timeout in us units */ return tagValue[1].u64 >> 10; else - /* 2.x 系列客户端发送的超时时间单位: ms */ + /* 2.x series client sends timeout in ms units */ return tagValue[1].u64; } void set_timeout(uint32_t n) @@ -585,8 +585,8 @@ class DTCResultInfo : public SimpleSection { return tagValue[9].s64; }; - /*一个请求有多个key的时候,要统计这个请求不同key对应的业务命中率和计数命中率*/ - /*命中率字段中,前16位放业务命中率,后16位放技术命中率*/ + /* When a request has multiple keys, statistics are needed for business hit rate and counting hit rate for different keys in this request */ + /* In the hit rate field, the first 16 bits store business hit rate, the last 16 bits store technical hit rate */ uint32_t get_tech_hit_num() { uint32_t uHitFlag = (uint32_t)hit_flag(); diff --git a/src/libs/common/shmem.h b/src/libs/common/shmem.h index b2c59443..2f9213d1 100644 --- a/src/libs/common/shmem.h +++ b/src/libs/common/shmem.h @@ -42,6 +42,6 @@ class SharedMemory { int mem_lock(void); void mem_unlock(void); - /* 删除共享内存 */ + /* Delete shared memory */ int mem_delete(void); }; diff --git a/src/libs/stat/stat_dtc_def.cc b/src/libs/stat/stat_dtc_def.cc index ab29de30..c9cbfe4d 100644 --- a/src/libs/stat/stat_dtc_def.cc +++ b/src/libs/stat/stat_dtc_def.cc @@ -20,7 +20,7 @@ #include "stat_dtc_def.h" DTCStatDefinition g_stat_definition[] = { - // 相同的统计项目 + // same statistical items { S_VERSION, "server version", SA_CONST, SU_VERSION }, { C_TIME, "compile time", SA_CONST, SU_DATETIME }, @@ -219,7 +219,7 @@ DTCStatDefinition g_stat_definition[] = { { 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144 } }, - /* try_purge_size 每次purge的节点个数 */ + /* try_purge_size number of nodes to purge each time */ { TRY_PURGE_COUNT, "try purge - count distribution", SA_SAMPLE, From dfbf66ad8b2b12a6de1668b550a6f2640ac6a94b Mon Sep 17 00:00:00 2001 From: kfysck Date: Thu, 4 Sep 2025 08:33:12 +0000 Subject: [PATCH 04/10] feat: english translation 3 --- src/connector/mysql_operation.cc | 46 +++---- src/core/buffer/buffer_pond.cc | 46 +++---- src/core/buffer/buffer_pond.h | 50 ++++---- src/core/mem/feature.cc | 16 +-- src/core/mem/mallocator.h | 44 +++---- src/core/mem/pt_malloc.cc | 74 +++++------ src/core/tree/t_tree.h | 206 +++++++++++++++---------------- src/core/tree/tree_data.h | 28 ++--- 8 files changed, 255 insertions(+), 255 deletions(-) diff --git a/src/connector/mysql_operation.cc b/src/connector/mysql_operation.cc index de006ce2..39ff8ebe 100644 --- a/src/connector/mysql_operation.cc +++ b/src/connector/mysql_operation.cc @@ -349,7 +349,7 @@ int ConnectorProcess::check_table() return (-2); } - // 获取返回结果的各列位置 + // get the column positions of the return results int i_name_idx = 0, i_type_idx = 0; int i_null_idx = 0, i_key_idx = 0; int i_default_idx = 0, i_extra_idx = 0; @@ -488,7 +488,7 @@ int ConnectorProcess::check_table() } for (int i = 0; i <= table_def->num_fields(); i++) { - //bug fix volatile不在db中 + //bug fix volatile not in db if (table_def->is_volatile(i)) continue; @@ -520,7 +520,7 @@ int ConnectorProcess::machine_init(int GroupID, int r) { const char *p; - // 初始化db配置信息 + // initialize db configuration information if (dbConfig->machineCnt <= GroupID) { log4cplus_error( "parse config error, machineCnt[%d] <= GroupID[%d]", @@ -603,7 +603,7 @@ void ConnectorProcess::sql_append_string(const char *str, int len) } } -/* 将字符串printf在原来字符串的后面,如果buffer不够大会自动重新分配buffer */ +/* append string to the original string using printf, buffer will be automatically reallocated if not large enough */ void ConnectorProcess::sql_printf(const char *Format, ...) { va_list Arg; @@ -794,7 +794,7 @@ std::string ConnectorProcess::value_to_str(const DTCValue *v, int fieldType) return "NULL"; } db_conn.escape_string(esc.c_str(), v->str.ptr, - v->str.len); // 先对字符串进行escape + v->str.len); // escape the string first ret = '\''; ret += v->str.ptr; ret += "\'"; @@ -843,7 +843,7 @@ inline int ConnectorProcess::format_sql_value(const DTCValue *Value, } db_conn.escape_string( esc.c_str(), Value->str.ptr, - Value->str.len); // 先对字符串进行escape + Value->str.len); // escape the string first if (sql.append(Value->str.ptr) < 0) error_no = -1; } @@ -945,7 +945,7 @@ inline int ConnectorProcess::str_to_value(char *Str, int fieldid, case DField::String: Value.str.len = _lengths[fieldid]; Value.str.ptr = - Str; // 不重新new,要等这个value使用完后释放内存(如果Str是动态分配的) + Str; // don't re-new, wait until this value is used up before releasing memory (if Str is dynamically allocated) break; case DField::Binary: @@ -970,8 +970,8 @@ int ConnectorProcess::save_row(RowValue *Row, DtcJob *Task) return (-1); for (i = 1; i <= table_def->num_fields(); i++) { - //db_conn.Row[0]是key的值,table_def->Field[0]也是key, - //因此从1开始。结果Row也是从1开始的(不包括key) + //db_conn.Row[0] is the key value, table_def->Field[0] is also the key, + //so start from 1. Result Row also starts from 1 (excluding key) Ret = str_to_value(db_conn.Row[i], i, table_def->field_type(i), (*Row)[i]); @@ -997,11 +997,11 @@ int ConnectorProcess::process_statement_query( const DTCValue* key, std::string& s_sql) { - // hash 计算key落在哪库哪表 + // hash calculation to determine which database and table the key belongs to init_table_name(key, table_def->field_type(0)); log4cplus_debug("db: %s, sql: %s", DBName, s_sql.c_str()); - // 分表时,需更更换表名 + // when sharding tables, need to change table name if (dbConfig->depoly&2) { const char* p_table_name = table_def->table_name(); if (NULL == p_table_name) { @@ -1015,7 +1015,7 @@ int ConnectorProcess::process_statement_query( } } - // 重新选库,并查询 + // reselect database and query int i_ret = db_conn.do_query(DBName, s_sql.c_str()); if (i_ret != 0) { int i_err = db_conn.get_err_no(); @@ -1064,7 +1064,7 @@ int ConnectorProcess::process_select(DtcJob *Task) sql_append_const("SELECT SQL_CALC_FOUND_ROWS "); else sql_append_const("SELECT "); - select_field_concate(Task->request_fields()); // 总是SELECT所有字段 + select_field_concate(Task->request_fields()); // always SELECT all fields sql_append_const(" FROM "); sql_append_table(); log4cplus_info("line:%d" ,__LINE__); @@ -1093,7 +1093,7 @@ int ConnectorProcess::process_select(DtcJob *Task) } log4cplus_info("line:%d" ,__LINE__); if (error_no != - 0) { // 主要检查PrintfAppend是否发生过错误,这里统一检查一次 + 0) { // Mainly check if PrintfAppend has encountered any errors, unified check here Task->set_error(-EC_ERROR_BASE, __FUNCTION__, "printf error"); log4cplus_error("error occur: %d", error_no); return (-1); @@ -1168,7 +1168,7 @@ int ConnectorProcess::process_select(DtcJob *Task) return (-6); } - // 将结果转换,并保存到task的result里 + // Convert results and save to task's result if (Task->count_only()) { nRows = atoi(db_conn.Row[0]); //bug fixed return count * @@ -1191,8 +1191,8 @@ int ConnectorProcess::process_select(DtcJob *Task) delete Row; db_conn.free_result(); - //bug fixed确认客户端带Limit限制 - if (haslimit) { // 获取总行数 + //bug fixed - confirm client has Limit restriction + if (haslimit) { // Get total row count init_sql_buffer(); sql_append_const("SELECT FOUND_ROWS() "); @@ -1356,7 +1356,7 @@ int ConnectorProcess::process_insert(DtcJob *Task) if (sql.at(-1) == ',') sql.trunc(-1); - if (error_no != 0) { // 主要检查PrintfAppend是否发生过错误 + if (error_no != 0) { // Mainly check if PrintfAppend has encountered any errors Task->set_error(-EC_ERROR_BASE, __FUNCTION__, "printf error"); log4cplus_error("error occur: %d", error_no); return (-1); @@ -1435,7 +1435,7 @@ int ConnectorProcess::process_update(DtcJob *Task) sql_printf(" LIMIT %u", Task->requestInfo.limit_count()); } - if (error_no != 0) { // 主要检查PrintfAppend是否发生过错误 + if (error_no != 0) { // Mainly check if PrintfAppend has encountered any errors Task->set_error(-EC_ERROR_BASE, __FUNCTION__, "printf error"); log4cplus_error("error occur: %d", error_no); return (-1); @@ -1492,7 +1492,7 @@ int ConnectorProcess::process_delete(DtcJob *Task) } if (error_no != - 0) { // 主要检查PrintfAppend是否发生过错误,这里统一检查一次 + 0) { // Mainly check if PrintfAppend has encountered any errors, unified check here Task->set_error(-EC_ERROR_BASE, __FUNCTION__, "printf error"); log4cplus_error("error occur: %d", error_no); return (-1); @@ -1573,19 +1573,19 @@ int ConnectorProcess::process_replace(DtcJob *Task) format_sql_value(Task->request_key(), table_def->field_type(0)); sql_append_const(","); - /* 补全缺失的默认值 */ + /* Complete missing default values */ if (Task->request_operation()) update_field_concate(Task->request_operation()); else if (sql.at(-1) == ',') { sql.trunc(-1); } - if (error_no != 0) { // 主要检查PrintfAppend是否发生过错误 + if (error_no != 0) { // Mainly check if PrintfAppend has encountered any errors Task->set_error(-EC_ERROR_BASE, __FUNCTION__, "printf error"); log4cplus_error("error occur: %d", error_no); return (-1); } - if (error_no != 0) { // 主要检查PrintfAppend是否发生过错误 + if (error_no != 0) { // Mainly check if PrintfAppend has encountered any errors Task->set_error(-EC_ERROR_BASE, __FUNCTION__, "printf error"); log4cplus_error("error occur: %d", error_no); return (-1); diff --git a/src/core/buffer/buffer_pond.cc b/src/core/buffer/buffer_pond.cc index 618faf6d..7848b19d 100644 --- a/src/core/buffer/buffer_pond.cc +++ b/src/core/buffer/buffer_pond.cc @@ -64,14 +64,14 @@ BufferPond::~BufferPond() _feature->destroy(); _node_index->destroy(); - /* 运行到这里,说明程序是正常stop的,设置共享内存完整性标记 */ + /* If we reach here, the program stopped normally, set shared memory integrity flag */ if (_need_set_integrity) { log4cplus_info("Share Memory Integrity... ok"); PtMalloc::instance()->set_share_memory_integrity(1); } } -/* 检查lru链表是否cross-link了,一旦发生这种情况,没法处理了 :( */ +/* Check if LRU list is cross-linked, once this happens, there's no way to handle it :( */ static inline int check_cross_linked_lru(Node node) { Node v = node.Prev(); @@ -83,7 +83,7 @@ static inline int check_cross_linked_lru(Node node) return 0; } -/* 验证cacheInfo合法性, 避免出现意外 */ +/* Verify cache info validity to avoid unexpected issues */ int BufferPond::verify_cache_info(BlockProperties *info) { if (INVALID_HANDLE != 0UL) { @@ -105,9 +105,9 @@ int BufferPond::verify_cache_info(BlockProperties *info) return -1; } - /* 系统可工作的最小内存 */ + /* Minimum memory required for system operation */ /* 1. empty_filter = 0 Min=64M */ - /* 2. empty_filter = 1 Min=256M, 初步按照1.5G用户来计算 */ + /* 2. empty_filter = 1 Min=256M, initially calculated based on 1.5G users */ if (info->empty_filter) { if (info->ipc_mem_size < (256UL << 20)) { @@ -211,7 +211,7 @@ int BufferPond::cache_open(BlockProperties *info) _cache_info.ipc_mem_key = info->ipc_mem_key; } - //初始化统计对象 + //Initialize statistics objects stat_cache_size = g_stat_mgr.get_stat_int_counter(DTC_CACHE_SIZE); stat_cache_key = g_stat_mgr.get_stat_int_counter(DTC_CACHE_KEY); stat_cache_version = g_stat_mgr.get_stat_iterm(DTC_CACHE_VERSION); @@ -229,9 +229,9 @@ int BufferPond::cache_open(BlockProperties *info) g_stat_mgr.get_stat_int_counter(LAST_PURGE_NODE_MOD_TIME); stat_data_exist_time = g_stat_mgr.get_stat_int_counter(DATA_EXIST_TIME); - //打开共享内存 + //Open shared memory if (_shm.mem_open(_cache_info.ipc_mem_key) > 0) { - //共享内存已存在 + //Shared memory already exists if (_cache_info.create_only) { snprintf(_err_msg, sizeof(_err_msg), @@ -251,7 +251,7 @@ int BufferPond::cache_open(BlockProperties *info) return -1; } - //底层分配器 + //Underlying allocator if (PtMalloc::instance()->do_attach(_shm.mem_ptr(), _shm.mem_size()) != 0) { snprintf(_err_msg, sizeof(_err_msg), @@ -259,7 +259,7 @@ int BufferPond::cache_open(BlockProperties *info) return -1; } - //内存版本检测, 目前因为底层分配器的缘故,只支持version >= 4的版本 + //Memory version detection, currently due to the underlying allocator, only supports version >= 4 _cache_info.version = PtMalloc::instance()->detect_version(); if (_cache_info.version != 4) { snprintf(_err_msg, sizeof(_err_msg), @@ -267,13 +267,13 @@ int BufferPond::cache_open(BlockProperties *info) return -1; } - /* 检查共享内存完整性,通过*/ + /* Check shared memory integrity, passed */ if (PtMalloc::instance()->share_memory_integrity()) { log4cplus_info("Share Memory Integrity Check.... ok"); /* - * 设置共享内存不完整标记 + * Set shared memory incomplete flag * - * 这样可以在程序coredump引起内存混乱时,再次重启后dtc能发现内存已经写乱了。 + * This allows DTC to detect corrupted memory when restarted after a program coredump. */ if (_cache_info.read_only == 0) { _need_set_integrity = 1; @@ -281,7 +281,7 @@ int BufferPond::cache_open(BlockProperties *info) 0); } } - /* 不通过 */ + /* Failed */ else { log4cplus_warning( "Share Memory Integrity Check... failed"); @@ -293,7 +293,7 @@ int BufferPond::cache_open(BlockProperties *info) return -1; } - /* 删除共享内存,重新启动cache初始化流程 */ + /* Delete shared memory, restart cache initialization process */ if (_shm.mem_delete() < 0) { log4cplus_error( "Auto Delete Share Memory failed: %m"); @@ -307,22 +307,22 @@ int BufferPond::cache_open(BlockProperties *info) PtMalloc::destroy(); - /* 重新初始化 */ + /* Reinitialize */ goto TRY_CACHE_INIT_AGAIN; } } } - //共享内存不存在,需要创建 + //Shared memory does not exist, need to create else { - //只读,失败 + //Read-only, failed if (_cache_info.read_only) { snprintf(_err_msg, sizeof(_err_msg), "readonly m_shm non-exists"); return -1; } - //创建 + //Create if (_shm.mem_create(_cache_info.ipc_mem_key, _cache_info.ipc_mem_size) <= 0) { if (errno == EACCES || errno == EEXIST) @@ -346,7 +346,7 @@ int BufferPond::cache_open(BlockProperties *info) return -1; } - //底层分配器初始化 + //Initialize underlying allocator if (PtMalloc::instance()->do_init(_shm.mem_ptr(), _shm.mem_size()) != 0) { snprintf(_err_msg, sizeof(_err_msg), @@ -355,7 +355,7 @@ int BufferPond::cache_open(BlockProperties *info) } /* - * 设置共享内存不完整标记 + * Set shared memory incomplete flag */ _need_set_integrity = 1; PtMalloc::instance()->set_share_memory_integrity(0); @@ -1218,7 +1218,7 @@ uint32_t BufferPond::get_cmodtime(Node *node) } unsigned int uiTotalRows = _raw_data->total_rows(); - for (unsigned int i = 0; i < uiTotalRows; i++) //查找 + for (unsigned int i = 0; i < uiTotalRows; i++) //Search { if ((iRet = _raw_data->get_lastcmod(lastcmod_thisrow)) != 0) { log4cplus_error("raw-data decode row error: %d,%s", @@ -1385,7 +1385,7 @@ void BufferPond::delay_purge_notify(const unsigned count) _need_purge_node_count -= real_purge_count; - /* 如果没有请求,重新调度delay purge任务 */ + /* If there are no requests, reschedule delay purge task */ if (_need_purge_node_count > 0) attach_timer(_delay_purge_timerlist); diff --git a/src/core/buffer/buffer_pond.h b/src/core/buffer/buffer_pond.h index 56d32d6f..06195358 100644 --- a/src/core/buffer/buffer_pond.h +++ b/src/core/buffer/buffer_pond.h @@ -41,27 +41,27 @@ DTC_BEGIN_NAMESPACE //time-marker node in dirty lru list #define TIME_MARKER_NEXT_NODE_ID (INVALID_NODE_ID - 1) -//cache基本信息 +//cache basic information typedef struct _BlockProperties { - // 共享内存key + // shared memory key int ipc_mem_key; - // 共享内存大小 + // shared memory size uint64_t ipc_mem_size; - // key大小 + // key size unsigned short key_size; - // 内存版本号 + // memory version number unsigned char version; - // 同异步模式 + // synchronous/asynchronous mode unsigned char sync_update : 1; - // 只读模式打开 + // open in read-only mode unsigned char read_only : 1; - // 供mem_tool使用 + // for mem_tool usage unsigned char create_only : 1; - // 是否启用空节点过滤功能 + // whether to enable empty node filtering function unsigned char empty_filter : 1; - // 是否需要在检出到内存不完整时自动删除并重建共享内存 + // whether to automatically delete and rebuild shared memory when incomplete memory is detected unsigned char auto_delete_dirty_shm : 1; - // 是否需要强制使用table.conf更新共享内存中的配置 + // whether to force update shared memory configuration using table.conf unsigned char force_update_table_conf : 1; inline void init(int key_format, unsigned long cache_size, @@ -78,24 +78,24 @@ typedef struct _BlockProperties { class BufferPond : private TimerObject { protected: PurgeNodeProcessor *_purge_processor; - //共享内存管理器 + //shared memory manager SharedMemory _shm; - //cache基本信息 + //cache basic information BlockProperties _cache_info; - //hash桶 + //hash bucket DTCHash *_hash; - //node管理 + //node management NGInfo *_ng_info; - //特性抽象 + //feature abstraction Feature *_feature; - //NodeID转换 + //NodeID conversion NodeIndex *_node_index; - //列扩展 + //column expansion DTCColExpand *_col_expand; char _err_msg[512]; int _need_set_integrity; - //待淘汰节点数目 + //number of nodes to be eliminated unsigned _need_purge_node_count; TimerList *_delay_purge_timerlist; @@ -104,11 +104,11 @@ class BufferPond : private TimerObject { int empty_limit; //for purge alert int _disable_try_purge; - //如果自动淘汰的数据最后更新时间比当前时间减DataExpireAlertTime小则报警 + //alert if the last update time of automatically eliminated data is less than current time minus DataExpireAlertTime int date_expire_alert_time; protected: - //统计 + //statistics StatCounter stat_cache_size; StatCounter stat_cache_key; StatCounter stat_cache_version; @@ -120,9 +120,9 @@ class BufferPond : private TimerObject { StatCounter stat_dirty_age; StatSample stat_try_purge_count; StatCounter stat_try_purge_nodes; - //最后被淘汰的节点的lastcmod的最大值(如果多行) + //maximum value of lastcmod of the last eliminated node (if multiple rows) StatCounter stat_last_purge_node_mod_time; - //当前时间减去statLastPurgeNodeModTime + //current time minus statLastPurgeNodeModTime StatCounter stat_data_exist_time; StatSample survival_hour; StatSample stat_purge_for_create_update_count; @@ -207,7 +207,7 @@ class BufferPond : private TimerObject { return _ng_info->total_used_row(); } - //定期调度delay purge任务 + //schedule delay purge task periodically virtual void job_timer_procedure(void); public: @@ -247,7 +247,7 @@ class BufferPond : private TimerObject { date_expire_alert_time = time < 0 ? 0 : time; }; - //淘汰固定个节点 + //eliminate a fixed number of nodes void delay_purge_notify(const unsigned count = 50); int pre_purge_nodes(int purge_cnt, Node reserve); int purge_by_time(unsigned int oldest_time); diff --git a/src/core/mem/feature.cc b/src/core/mem/feature.cc index 65ada75d..4747ac70 100644 --- a/src/core/mem/feature.cc +++ b/src/core/mem/feature.cc @@ -40,7 +40,7 @@ Feature::Feature() : _baseInfo(NULL) Feature::~Feature() { } -/* feature id -> feature. 拷贝输入feature 到 找到feature +/* feature id -> feature. Copy input feature to found feature */ int Feature::modify_feature(FEATURE_INFO_T *fi) { @@ -57,7 +57,7 @@ int Feature::modify_feature(FEATURE_INFO_T *fi) *p = *fi; return 0; } -/* feature id -> feature. 清空这个feature +/* feature id -> feature. Clear this feature */ int Feature::delete_feature(FEATURE_INFO_T *fi) { @@ -78,7 +78,7 @@ int Feature::delete_feature(FEATURE_INFO_T *fi) return 0; } -/* 找一个空闲feature, 赋值 +/* Find a free feature, assign value */ int Feature::add_feature(const uint32_t id, const MEM_HANDLE_T v, const uint32_t attr) @@ -103,8 +103,8 @@ int Feature::add_feature(const uint32_t id, const MEM_HANDLE_T v, return 0; } /* feature id -> feature. - * 1. feature id == 0: 则表示找一个空闲feature. - * 2. 否则根据feature id 找对应的feature + * 1. feature id == 0: means find a free feature. + * 2. Otherwise find corresponding feature based on feature id */ FEATURE_INFO_T *Feature::get_feature_by_id(const uint32_t fd) { @@ -121,8 +121,8 @@ FEATURE_INFO_T *Feature::get_feature_by_id(const uint32_t fd) EXIT: return (FEATURE_INFO_T *)(0); } -/* 1. 创建num个空feature - * 2. 初始化头信息(baseInfo) +/* 1. Create num empty features + * 2. Initialize header information (baseInfo) */ int Feature::do_init(const uint32_t num) { @@ -142,7 +142,7 @@ int Feature::do_init(const uint32_t num) return 0; } -/* feature已经存在,第一个feature的内存句柄。直接初始化头信息指向 +/* Feature already exists, memory handle of first feature. Directly initialize header information pointer */ int Feature::do_attach(MEM_HANDLE_T handle) { diff --git a/src/core/mem/mallocator.h b/src/core/mem/mallocator.h index 5656297b..13a0b92a 100644 --- a/src/core/mem/mallocator.h +++ b/src/core/mem/mallocator.h @@ -54,60 +54,60 @@ class MallocBase { virtual const char *get_err_msg() = 0; /************************************************* - Description: 分配内存 - Input: tSize 分配的内存大小 + Description: Allocate memory + Input: tSize Size of memory to allocate Output: - Return: 内存块句柄,INVALID_HANDLE为失败 + Return: Memory block handle, INVALID_HANDLE on failure *************************************************/ virtual ALLOC_HANDLE_T Malloc(ALLOC_SIZE_T tSize) = 0; /************************************************* - Description: 分配内存,并将内存初始化为0 - Input: tSize 分配的内存大小 + Description: Allocate memory and initialize it to zero + Input: tSize Size of memory to allocate Output: - Return: 内存块句柄,INVALID_HANDLE为失败 + Return: Memory block handle, INVALID_HANDLE on failure *************************************************/ virtual ALLOC_HANDLE_T Calloc(ALLOC_SIZE_T tSize) = 0; /************************************************* - Description: 重新分配内存 - Input: hHandle 老内存句柄 - tSize 新分配的内存大小 + Description: Reallocate memory + Input: hHandle Old memory handle + tSize New memory size to allocate Output: - Return: 内存块句柄,INVALID_HANDLE为失败(失败时不会释放老内存块) + Return: Memory block handle, INVALID_HANDLE on failure (old memory block will not be freed on failure) *************************************************/ virtual ALLOC_HANDLE_T ReAlloc(ALLOC_HANDLE_T hHandle, ALLOC_SIZE_T tSize) = 0; /************************************************* - Description: 释放内存 - Input: hHandle 内存句柄 + Description: Free memory + Input: hHandle Memory handle Output: - Return: 0为成功,非0失败 + Return: 0 on success, non-zero on failure *************************************************/ virtual int Free(ALLOC_HANDLE_T hHandle) = 0; /************************************************* - Description: 获取内存块大小 - Input: hHandle 内存句柄 + Description: Get memory block size + Input: hHandle Memory handle Output: - Return: 内存大小 + Return: Memory size *************************************************/ virtual ALLOC_SIZE_T chunk_size(ALLOC_HANDLE_T hHandle) = 0; /************************************************* - Description: 将句柄转换成内存地址 - Input: 内存句柄 + Description: Convert handle to memory address + Input: Memory handle Output: - Return: 内存地址,如果句柄无效返回NULL + Return: Memory address, returns NULL if handle is invalid *************************************************/ virtual void *handle_to_ptr(ALLOC_HANDLE_T hHandle) = 0; /************************************************* - Description: 将内存地址转换为句柄 - Input: 内存地址 + Description: Convert memory address to handle + Input: Memory address Output: - Return: 内存句柄,如果地址无效返回INVALID_HANDLE + Return: Memory handle, returns INVALID_HANDLE if address is invalid *************************************************/ virtual ALLOC_HANDLE_T ptr_to_handle(void *p) = 0; diff --git a/src/core/mem/pt_malloc.cc b/src/core/mem/pt_malloc.cc index ba7cf38c..e1e2beb9 100644 --- a/src/core/mem/pt_malloc.cc +++ b/src/core/mem/pt_malloc.cc @@ -174,7 +174,7 @@ void PtMalloc::destroy() { Singleton::destory(); } -/*初始化header中的signature域*/ +/*Initialize signature field in header*/ void PtMalloc::init_sign() { static const unsigned int V4Sign[14] = { @@ -191,8 +191,8 @@ void PtMalloc::init_sign() #else #define UINT64FMT_T "%llu" #endif -/*初始化cache头信息*/ -/*传入参数,cache的起始地址,cache的总大小*/ +/*Initialize cache header information*/ +/*Input parameters: cache start address, total cache size*/ int PtMalloc::do_init(void *pAddr, INTER_SIZE_T tSize) { int i; @@ -258,7 +258,7 @@ int PtMalloc::do_init(void *pAddr, INTER_SIZE_T tSize) return (0); } -/*校验cache的版本是否正确*/ +/*Verify if cache version is correct*/ int PtMalloc::detect_version() { if (m_pstHead->m_auiSign[0] != DTC_SIGN_0 || @@ -275,7 +275,7 @@ int PtMalloc::detect_version() "unknown version signature %u", m_pstHead->m_ushVer); return (0); } -/*查看cache是否一致:在启动dtc,加载cache的时候,只要是需要写cache,就会设置不一致,防止dtc在运行时crash,重启后不经检查使用乱掉的内存*/ +/*Check if cache is consistent: when starting DTC and loading cache, if cache needs to be written, it will be set as inconsistent to prevent DTC from using corrupted memory after crash and restart without verification*/ int PtMalloc::share_memory_integrity() { return (int)m_pstHead->m_shmIntegrity; @@ -288,7 +288,7 @@ void PtMalloc::set_share_memory_integrity(const int flags) else m_pstHead->m_shmIntegrity = 0; } -/*对于已经存在的IPC shared memory,dtc在启动后会将这个块内存作为cache,在这里检查这块cache的头信息,是否正确*/ +/*For existing IPC shared memory, DTC will use this memory block as cache after startup, here check if the header information of this cache block is correct*/ int PtMalloc::do_attach(void *pAddr, INTER_SIZE_T tSize) { if (tSize < sizeof(MemHead) + sizeof(CBin) * (NBINS + NFASTBINS + 1) + @@ -332,8 +332,8 @@ ALLOC_HANDLE_T PtMalloc::get_reserve_zone() { return m_pstHead->m_hReserveZone; } -/*输入参数是chunk的用户handle*/ -/*返回这块chunk的用户使用空间的大小*/ +/*Input parameter is user handle of chunk*/ +/*Return the size of user space for this chunk*/ ALLOC_SIZE_T PtMalloc::chunk_size(ALLOC_HANDLE_T hHandle) { MallocChunk *pstChunk; @@ -354,7 +354,7 @@ ALLOC_SIZE_T PtMalloc::chunk_size(ALLOC_HANDLE_T hHandle) return chunksize2memsize(CHUNK_SIZE(pstChunk)); } -/*设置输入bin上的头chunk为使用状态,并将这个chunk从bin上拖链*/ +/*Set the head chunk on input bin to used state and unlink this chunk from bin*/ void *PtMalloc::bin_malloc(CBin &ptBin) { MallocChunk *pstChunk; @@ -370,8 +370,8 @@ void *PtMalloc::bin_malloc(CBin &ptBin) return p; } -/*对所有的bin检查:small&large bins, fast bins, unsorted bins*/ -/*校验方法:每个bin组成一个双向的循环链表*/ +/*Check all bins: small&large bins, fast bins, unsorted bins*/ +/*Verification method: each bin forms a bidirectional circular linked list*/ int PtMalloc::check_bin() { int i; @@ -435,8 +435,8 @@ int PtMalloc::check_bin() return (0); } -/*校验存放在bin中的chunk的一致性*/ -/*检验方法:从分配的top线开始向bottom方向,一个chunk一个chunk的检查,检查这个chunk的大小是不是和它的后一个chunk的presize一致*/ +/*Verify consistency of chunks stored in bins*/ +/*Verification method: starting from allocated top line towards bottom direction, check chunk by chunk to verify if this chunk's size matches the presize of its next chunk*/ #if BIN_MEM_CHECK int PtMalloc::check_mem() { @@ -475,13 +475,13 @@ int PtMalloc::check_mem() return (0); } #endif -/*从fastbins的一个bin下取一个空闲chunk,满足tsize大小。*/ -/*bin的索引查找方法是:按照在smallbins中查找bin的方法进行*/ +/*Take a free chunk from a bin in fastbins, satisfying tsize.*/ +/*Bin index lookup method: proceed according to the method for finding bins in smallbins*/ void *PtMalloc::fast_malloc(ALLOC_SIZE_T tSize) { return bin_malloc(m_ptFastBin[smallbin_index(tSize)]); } -/*从smallbins的一个bin下取一个空闲chunk满足tsize大小*/ +/*Take a free chunk from a bin in smallbins satisfying tsize*/ void *PtMalloc::small_bin_malloc(ALLOC_SIZE_T tSize) { void *p; @@ -494,8 +494,8 @@ void *PtMalloc::small_bin_malloc(ALLOC_SIZE_T tSize) return (p); } -/*释放fastbins的每个bin下的空闲chunk*/ -/*对于每个chunk试探是否可以和内存里的前后chunk合并,合并如果可以,并设置新chunk为使用状态,并从bin上拖链,最后将拖链的chunk存放在unsortedbin下*/ +/*Release free chunks in each bin of fastbins*/ +/*For each chunk, test if it can be merged with preceding and following chunks in memory, if merging is possible, set new chunk to used state, unlink from bin, and finally store the unlinked chunk in unsortedbin*/ int PtMalloc::free_fast() { if (!(m_pstHead->m_uiFlags & MALLOC_FLAG_FAST)) // no fast chunk @@ -591,7 +591,7 @@ int PtMalloc::free_fast() return (0); } -/*从top线上面分配一个chunk满足tsize*/ +/*Allocate a chunk from top line satisfying tsize*/ void *PtMalloc::top_alloc(ALLOC_SIZE_T tSize) { if (m_pstHead->m_hTop + tSize + MINSIZE >= m_pstHead->m_tSize) { @@ -614,7 +614,7 @@ void *PtMalloc::top_alloc(ALLOC_SIZE_T tSize) return chunk2mem(p); } -/*从输入的bin上将handle指定的chunk拖链*/ +/*Unlink the chunk specified by handle from the input bin*/ int PtMalloc::unlink_bin(CBin &stBin, INTER_HANDLE_T hHandle) { MallocChunk *pstChunk; @@ -647,7 +647,7 @@ int PtMalloc::unlink_bin(CBin &stBin, INTER_HANDLE_T hHandle) return (0); } -/*将handle指定的chunk插入到bin上*/ +/*Insert the chunk specified by handle into the bin*/ int PtMalloc::link_bin(CBin &stBin, INTER_HANDLE_T hHandle) { MallocChunk *pstChunk; @@ -679,8 +679,8 @@ int PtMalloc::link_bin(CBin &stBin, INTER_HANDLE_T hHandle) return (0); } -/*在bin中查找一个合适的位置,将hanlde指定的chunk插入进去*/ -/*寻找位置的方法:从bin的尾部开始,找到第一个位置,它的大小介于前后chunk的大小之间*/ +/*Find a suitable position in the bin to insert the chunk specified by handle*/ +/*Method to find position: starting from the tail of the bin, find the first position where its size is between the sizes of the previous and next chunks*/ int PtMalloc::link_sorted_bin(CBin &stBin, INTER_HANDLE_T hHandle, ALLOC_SIZE_T tSize) { @@ -738,7 +738,7 @@ int PtMalloc::link_sorted_bin(CBin &stBin, INTER_HANDLE_T hHandle, return (0); } -/*分配chunk满足tsize的主体逻辑*/ +/*Main logic for allocating chunk satisfying tsize*/ ALLOC_HANDLE_T PtMalloc::inter_malloc(ALLOC_SIZE_T tSize) { void *p; @@ -768,7 +768,7 @@ ALLOC_HANDLE_T PtMalloc::inter_malloc(ALLOC_SIZE_T tSize) INTER_HANDLE_T v = m_ptBin[uiBinIdx].m_hNextChunk; unsigned int try_search_count = 0; - /* 每个bin最多只搜索100次,如果失败则跳至下一个bin */ + /* Each bin searches at most 100 times, if failed then jump to next bin */ while (v != INVALID_HANDLE && ++try_search_count < 100) { pstChunk = (MallocChunk *)handle_to_ptr(v); @@ -883,7 +883,7 @@ ALLOC_HANDLE_T PtMalloc::inter_malloc(ALLOC_SIZE_T tSize) MALLOC_BOTTOM: return ptr_to_handle(top_alloc(tSize)); } -/*对intermalloc的包装,对返回结果进行了简单检查*/ +/*Wrapper for intermalloc, performs simple check on return result*/ ALLOC_HANDLE_T PtMalloc::Malloc(ALLOC_SIZE_T tSize) { MallocChunk *pstChunk; @@ -901,7 +901,7 @@ ALLOC_HANDLE_T PtMalloc::Malloc(ALLOC_SIZE_T tSize) } return (hHandle); } -/*对intermalloc的包装,对返回结果进行了简单检查,并将返回的chunk的用户部分清空*/ +/*Wrapper for intermalloc, performs simple check on return result and clears the user portion of returned chunk*/ ALLOC_HANDLE_T PtMalloc::Calloc(ALLOC_SIZE_T tSize) { ALLOC_HANDLE_T hHandle = Malloc(tSize); @@ -913,7 +913,7 @@ ALLOC_HANDLE_T PtMalloc::Calloc(ALLOC_SIZE_T tSize) return hHandle; } -/*当输入的chunk在使用中时候返回0*/ +/*Return 0 when input chunk is in use*/ int PtMalloc::check_inuse_chunk(MallocChunk *pstChunk) { if (!inuse_bit_at_offset(pstChunk, CHUNK_SIZE(pstChunk))) { @@ -945,7 +945,7 @@ int PtMalloc::check_inuse_chunk(MallocChunk *pstChunk) return (0); } -/*realloc的主体逻辑*/ +/*Main logic for realloc*/ ALLOC_HANDLE_T PtMalloc::inter_re_alloc(ALLOC_HANDLE_T hHandle, ALLOC_SIZE_T tSize, ALLOC_SIZE_T &tOldMemSize) @@ -1165,7 +1165,7 @@ ALLOC_HANDLE_T PtMalloc::inter_re_alloc(ALLOC_HANDLE_T hHandle, return ptr_to_handle(chunk2mem(pstNewChunk)); } -/*对intserrealloc的包装,对返回结果进行了简单的检查*/ +/*Wrapper for intserrealloc, performs simple check on return result*/ ALLOC_HANDLE_T PtMalloc::ReAlloc(ALLOC_HANDLE_T hHandle, ALLOC_SIZE_T tSize) { ALLOC_HANDLE_T hNewHandle; @@ -1193,7 +1193,7 @@ ALLOC_HANDLE_T PtMalloc::ReAlloc(ALLOC_HANDLE_T hHandle, ALLOC_SIZE_T tSize) return (hNewHandle); } -/*free接口的主体逻辑*/ +/*Main logic for free interface*/ int PtMalloc::inter_free(ALLOC_HANDLE_T hHandle, ALLOC_SIZE_T &tMemSize) { tMemSize = 0; @@ -1339,7 +1339,7 @@ int PtMalloc::inter_free(ALLOC_HANDLE_T hHandle, ALLOC_SIZE_T &tMemSize) return (0); } -/*对interfree的包装,对返回结果进行了简单检查*/ +/*Wrapper for interfree, performs simple check on return result*/ int PtMalloc::Free(ALLOC_HANDLE_T hHandle) { int iRet; @@ -1356,8 +1356,8 @@ int PtMalloc::Free(ALLOC_HANDLE_T hHandle) return (iRet); } -/*返回如果free掉handle指定chunk能够给cache共享多少空闲内存*/ -/*前后合并chunk可能导致释放比指定handle的大小更大的空间*/ +/*Return how much free memory can be shared to cache if handle specified chunk is freed*/ +/*Forward and backward chunk merging may lead to releasing more space than the specified handle size*/ unsigned PtMalloc::ask_for_destroy_size(ALLOC_HANDLE_T hHandle) { // ALLOC_SIZE_T logic_size = 0; @@ -1418,7 +1418,7 @@ unsigned PtMalloc::ask_for_destroy_size(ALLOC_HANDLE_T hHandle) } } - /* 释放到top边界,合并成一大块内存 */ + /* Release to top boundary, merge into one large memory block */ if (physic_handle + physic_size == m_pstHead->m_hTop) { ALLOC_SIZE_T physic_free = m_pstHead->m_tSize - m_pstHead->m_hTop - MINSIZE + @@ -1447,8 +1447,8 @@ ALLOC_SIZE_T PtMalloc::last_free_size() * dump all bins and chunks *************************************************************************/ -/*对所有的bin检查:small&large bins, fast bins, unsorted bins*/ -/*校验方法:每个bin组成一个双向的循环链表*/ +/*Check all bins: small&large bins, fast bins, unsorted bins*/ +/*Verification method: each bin forms a bidirectional circular linked list*/ int PtMalloc::dump_bins() { int i; diff --git a/src/core/tree/t_tree.h b/src/core/tree/t_tree.h index 5c8de87f..cb6ce4c9 100644 --- a/src/core/tree/t_tree.h +++ b/src/core/tree/t_tree.h @@ -51,7 +51,7 @@ class Ttree { ALLOC_HANDLE_T first_node(); /************************************************* - Description: attach一块已经格式化好的内存 + Description: attach a block of pre-formatted memory Input: Output: Return: @@ -62,25 +62,25 @@ class Ttree { } /************************************************* - Description: 将key insert到树里,hRecord为key对应的数据(包含key) - Input: pchKey 插入的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - hRecord 保存着要插入的key以及其他数据的句柄 + Description: Insert key into the tree, hRecord is the data corresponding to the key (including key) + Input: pchKey Key to insert + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + hRecord Handle storing the key to insert and other data Output: - Return: 0为成功,EC_NO_MEM为内存不足,EC_KEY_EXIST为key已经存在,其他值为错误 + Return: 0 for success, EC_NO_MEM for insufficient memory, EC_KEY_EXIST for key already exists, other values for error *************************************************/ int do_insert(const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ALLOC_HANDLE_T hRecord, bool &isAllocNode); /************************************************* - Description: 删除key以及对应的数据(但不会自动释放key对应的内存) - Input: pchKey 插入的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 + Description: Delete key and corresponding data (but will not automatically release memory for the key) + Input: pchKey Key to delete + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int Delete(const char *pchKey, void *pCmpCookie, KeyComparator pfComp, bool &isFreeNode); @@ -88,180 +88,180 @@ class Ttree { int find_handle(ALLOC_HANDLE_T hRecord); /************************************************* - Description: 查找key对应的数据 - Input: pchKey 插入的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - Output: hRecord 保存查找到的key以及其他数据的句柄 - Return: 0为查找不到,1为找到数据 + Description: Find data corresponding to the key + Input: pchKey Key to search for + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + Output: hRecord Handle storing the found key and other data + Return: 0 if not found, 1 if data found *************************************************/ int do_find(const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ALLOC_HANDLE_T &hRecord); /************************************************* - Description: 查找key对应的数据 - Input: pchKey 插入的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - Output: phRecord 指向树节点的item指针 - Return: 0为查找不到,1为找到数据 + Description: Find data corresponding to the key + Input: pchKey Key to search for + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + Output: phRecord Pointer to tree node item + Return: 0 if not found, 1 if data found *************************************************/ int do_find(const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ALLOC_HANDLE_T *&phRecord); /************************************************* - Description: 销毁整棵树,并释放相应的内存 + Description: Destroy the entire tree and release corresponding memory Input: Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int destory(); /************************************************* - Description: 查询销毁整棵树可以释放多少空闲内存 + Description: Query how much free memory can be released by destroying the entire tree Input: Output: - Return: >0 成功, 0 失败 + Return: >0 success, 0 failure *************************************************/ unsigned ask_for_destroy_size(void); /************************************************* - Description: 从小到大遍历整棵树 - Input: pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Traverse the entire tree from small to large + Input: pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int traverse_forward(ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 从大到小遍历整棵树 - Input: pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Traverse the entire tree from large to small + Input: pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int traverse_backward(ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 后序遍历整棵树 - Input: pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Post-order traverse the entire tree + Input: pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int post_order_traverse(ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 从指定的key开始,从小到大遍历树,遍历的范围为[key, key+iInclusion] - Input: pchKey 开始的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - iInclusion key的范围 - pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Traverse tree from small to large starting from specified key, range [key, key+iInclusion] + Input: pchKey Starting key + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + iInclusion Key range + pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int traverse_forward(const char *pchKey, void *pCmpCookie, KeyComparator pfComp, int64_t iInclusion, ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 从指定的key开始,从小到大遍历树, 遍历的范围为[key, key1] - Input: pchKey 开始的key - pchKey1 结束的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Traverse tree from small to large starting from specified key, range [key, key1] + Input: pchKey Starting key + pchKey1 Ending key + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int traverse_forward(const char *pchKey, const char *pchKey1, void *pCmpCookie, KeyComparator pfComp, ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 从指定的key开始,从小到大遍历树(遍历大于等于key的所有记录) - Input: pchKey 开始的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Traverse tree from small to large starting from specified key (traverse all records >= key) + Input: pchKey Starting key + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int traverse_forward(const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 从指定的key开始,从大到小遍历树(遍历小于等于key的所有记录) - Input: pchKey 开始的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Traverse tree from large to small starting from specified key (traverse all records <= key) + Input: pchKey Starting key + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int traverse_backward(const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 从指定的key开始,从大到小遍历树,遍历的范围为[key, key1] - Input: pchKey 开始的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Traverse tree from large to small starting from specified key, range [key, key1] + Input: pchKey Starting key + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int traverse_backward(const char *pchKey, const char *pchKey1, void *pCmpCookie, KeyComparator pfComp, ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 从指定的key开始,先左右树,后根结点, 遍历的范围为[key, key1] - Input: pchKey 开始的key - pchKey1 结束的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Starting from specified key, left and right subtree first, then root node, range [key, key1] + Input: pchKey Starting key + pchKey1 Ending key + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int post_order_traverse(const char *pchKey, const char *pchKey1, void *pCmpCookie, KeyComparator pfComp, ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 从指定的key开始,后序遍历树(遍历大于等于key的所有记录) - Input: pchKey 开始的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Post-order traverse tree starting from specified key (traverse all records >= key) + Input: pchKey Starting key + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int post_order_traverse_ge(const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ItemVisit pfVisit, void *pCookie); /************************************************* - Description: 从指定的key开始,后序遍历树(遍历小于等于key的所有记录) - Input: pchKey 开始的key - pCmpCookie 调用用户自定义的pfComp函数跟树里的节点比较时作为输入参数 - pfComp 用户自定义的key比较函数 - pfVisit 访问数据记录的用户自定义函数 - pCookie 自定义函数的cookie参数 + Description: Post-order traverse tree starting from specified key (traverse all records <= key) + Input: pchKey Starting key + pCmpCookie Input parameter when calling user-defined pfComp function to compare with tree nodes + pfComp User-defined key comparison function + pfVisit User-defined function to visit data records + pCookie Cookie parameter for custom function Output: - Return: 0为成功,其他值为错误 + Return: 0 for success, other values for error *************************************************/ int post_order_traverse_le(const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ItemVisit pfVisit, @@ -269,11 +269,11 @@ class Ttree { }; /************************************************************ - Description: 封装了T-tree node的各种操作,仅供t-tree内部使用 + Description: Encapsulates various operations of T-tree node, for internal use by t-tree only Version: DTC 3.0 ***********************************************************/ struct _TtreeNode { - enum { PAGE_SIZE = 20, // 每个节点保存多少条记录 + enum { PAGE_SIZE = 20, // How many records each node stores MIN_ITEMS = PAGE_SIZE - 2 // minimal number of items in internal node }; @@ -302,13 +302,13 @@ struct _TtreeNode { static unsigned ask_for_destroy_size(MallocBase &, ALLOC_HANDLE_T hNode); - // 查找指定的key。找到返回1,否则返回0 + // Find specified key. Return 1 if found, otherwise return 0 int do_find(MallocBase &stMalloc, const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ALLOC_HANDLE_T &hRecord); int do_find(MallocBase &stMalloc, const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ALLOC_HANDLE_T *&phRecord); int find_handle(MallocBase &stMalloc, ALLOC_HANDLE_T hRecord); - // 假设node包含key-k1~kn,查找这样的node节点:k1<= key <=kn + // Assume node contains keys k1~kn, find such node: k1 <= key <= kn int find_node(MallocBase &stMalloc, const char *pchKey, void *pCmpCookie, KeyComparator pfComp, ALLOC_HANDLE_T &hNode); diff --git a/src/core/tree/tree_data.h b/src/core/tree/tree_data.h index f44c45d4..530af4c3 100644 --- a/src/core/tree/tree_data.h +++ b/src/core/tree/tree_data.h @@ -481,14 +481,14 @@ class TreeData { int replace_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord); /************************************************* - Description: 处理T树中平板类型业务 + Description: Process flat type operations in T-tree Output: *************************************************/ int get_sub_raw(DTCJobOperation &job_op, unsigned int nodeCnt, bool isAsc, SubRowProcess subRowProc); /************************************************* - Description: 匹配索引 + Description: Match index condition Output: *************************************************/ int match_index_condition(DTCJobOperation &job_op, unsigned int rowCnt, @@ -522,27 +522,27 @@ class TreeData { int get_expire_time(DTCTableDefinition *t, uint32_t &expire); /************************************************* - Description: 替换当前行 - Input: stRow 仅使用row的字段类型等信息,不需要实际数据 + Description: Replace current row + Input: stRow Only uses row field type info, no actual data needed Output: - Return: 0为成功,非0失败 + Return: 0 on success, non-zero on failure *************************************************/ int replace_cur_row(const RowValue &stRow, bool isDirty, MEM_HANDLE_T *hRecord); /************************************************* - Description: 删除当前行 - Input: stRow 仅使用row的字段类型等信息,不需要实际数据 + Description: Delete current row + Input: stRow Only uses row field type info, no actual data needed Output: - Return: 0为成功,非0失败 + Return: 0 on success, non-zero on failure *************************************************/ int delete_cur_row(const RowValue &stRow); /************************************************* - Description: 调到下一行 - Input: stRow 仅使用row的字段类型等信息,不需要实际数据 - Output: m_uiOffset会指向下一行数据的偏移 - Return: 0为成功,非0失败 + Description: Skip to next row + Input: stRow Only uses row field type info, no actual data needed + Output: m_uiOffset will point to next row data offset + Return: 0 on success, non-zero on failure *************************************************/ int skip_row(const RowValue &stRow); @@ -556,10 +556,10 @@ class TreeData { } /************************************************* - Description: 查询本次操作增加的行数(可以为负数) + Description: Query number of rows added by this operation (can be negative) Input: Output: - Return: 行数 + Return: Number of rows *************************************************/ int64_t get_increase_row_count() { From 123db9acfc1cd6c1c3f37d280b168cba499d36a2 Mon Sep 17 00:00:00 2001 From: kfysck Date: Thu, 4 Sep 2025 08:43:53 +0000 Subject: [PATCH 05/10] feat: English translation 4 --- docs/buiding.md | 12 +++--- docs/configure.md | 78 +++++++++++++++++++-------------------- docs/quickstart.md | 92 +++++++++++++++++++++++----------------------- 3 files changed, 91 insertions(+), 91 deletions(-) diff --git a/docs/buiding.md b/docs/buiding.md index 4f05aa96..07e1d4c4 100644 --- a/docs/buiding.md +++ b/docs/buiding.md @@ -1,7 +1,7 @@ * gcc/g++ 4.9 * cmake -* 安装gflags:
- gflags是google开源的一套命令行参数解析工具,支持从环境变量和配置文件读取参数: +* Install gflags:
+ gflags is an open-source command-line flag parsing tool from Google that supports reading parameters from environment variables and configuration files: ```shell git clone https://github.com/gflags/gflags.git cd gflags @@ -12,18 +12,18 @@ sudo ln -s /usr/local/lib/libgflags.so.2.2 /lib64 ``` ### CentOS - - 执行以下命令安装依赖: + - Execute the following command to install dependencies: ```shell sudo yum install -y make snappy snappy-devel zlib zlib-devel bzip2 bzip2-devel lz4-devel libasan openssl-devel cmake3 mysql-devel mxml-devel ``` ### Ubuntu - - 执行以下命令安装依赖: + - Execute the following command to install dependencies: ```shell - sudo apt-get install make snappy libsnappy-dev zlib1g zlib1g-dev bzip2 liblz4-dev libasan0 openssl libmxml-dev + sudo apt-get install make snappy libsnappy-dev zlib1g zlib1g-dev bzip2 liblz4-dev libasan0 openssl libmxml-dev ``` * `mkdir build` * `cmake ../` - * 默认编译配置不包含测试用例,如需要编译test文件夹下的测试用例,需要再cmake时添加参数 -DCMAKE_TEST_OPTION=ON + * The default compilation configuration does not include test cases. If you need to compile test cases in the test folder, you need to add the parameter -DCMAKE_TEST_OPTION=ON when running cmake ```shell cmake -DCMAKE_TEST_OPTION=ON ../ ``` diff --git a/docs/configure.md b/docs/configure.md index 7d0d54f6..b8339a01 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -1,52 +1,52 @@ -## 配置文件 -配置文件目录:conf/
-- AGENT服务的配置文件是: - * agent.xml 指定后端dtc server的主、备服务的地址信息和权重; -- DTC服务的配置文件是: - * dtc.yaml dtc模块的配置文件,包括基础配置和表结构信息。 +## Configuration Files +Configuration file directory: conf/
+- AGENT service configuration file: + * agent.xml Specifies the address information and weight of primary and backup services of backend DTC servers; +- DTC service configuration file: + * dtc.yaml Configuration file for the DTC module, including basic configuration and table structure information. -下面就各配置文件具体配置选项做介绍: +The following sections introduce specific configuration options for each configuration file: ### agent.xml -agent配置文件位置为当前项目的conf/agent.xml,主要配置以下字段: -- ALL.BUSINESS_MODULE.MODULE.ListenOn 监听IP和端口号 -- ALL.BUSINESS_MODULE.MODULE.Preconnect 预连接状态 - * True 开启预连接状态,当Agent启动时会自动建立对后端所有DTC Server结点的连接通道。 - * False 关闭预连接状态,Agent启动时并不会针对后端Server建立连接,待第一个请求过来时才会创建连接。 -- ALL.BUSINESS_MODULE.MODULE.Timeout 单位:毫秒。Agent响应超时时间,超过此时间则直接返回。 -- ALL.BUSINESS_MODULE.CACHESHARDING 此节点为Agent的分片配置信息。根据分片服务器的数量,可配置多个CACHESHARDING节点。 -- ALL.BUSINESS_MODULE.CACHESHARDING.INSTANCE 分片节点下的具体服务器实例信息: - * Role 实例角色配置: - * master 主服务器角色设置,至少要配置一个。 - * replica [可选] 备服务器角色设置,可不配置或配置多个备机。 - * Enable 角色开关:True为开启,False为关闭。 - * Addr 服务器监听地址和权重。例如 0.0.0.0:20015:1, 分别代表了监听的IP、监听的端口和权重值。权重值在INSTANCE实例下的所有服务器的请求权重,Agent会根据此值设置的大小,来分发不同的流量到后端DTC Server上。默认值为1。 +The agent configuration file is located at conf/agent.xml in the current project. The main fields to configure are: +- ALL.BUSINESS_MODULE.MODULE.ListenOn Listen IP address and port number +- ALL.BUSINESS_MODULE.MODULE.Preconnect Pre-connection status + * True Enable pre-connection status. When Agent starts, it will automatically establish connection channels to all backend DTC Server nodes. + * False Disable pre-connection status. Agent will not establish connections to backend servers when starting, and will only create connections when the first request arrives. +- ALL.BUSINESS_MODULE.MODULE.Timeout Unit: milliseconds. Agent response timeout. If this time is exceeded, it will return directly. +- ALL.BUSINESS_MODULE.CACHESHARDING This node contains Agent's sharding configuration information. Multiple CACHESHARDING nodes can be configured based on the number of sharding servers. +- ALL.BUSINESS_MODULE.CACHESHARDING.INSTANCE Specific server instance information under the sharding node: + * Role Instance role configuration: + * master Primary server role setting, at least one must be configured. + * replica [Optional] Backup server role setting, can be not configured or multiple backup servers can be configured. + * Enable Role switch: True to enable, False to disable. + * Addr Server listen address and weight. For example, 0.0.0.0:20015:1 represents the listen IP, listen port, and weight value respectively. The weight value is the request weight among all servers under the INSTANCE. Agent will distribute different traffic to backend DTC Servers based on the size of this value. Default value is 1. ### dtc.yaml -#### primary 主库,提供dtc核心功能 -* table dtc的表名 -* layered.rule 分层存储的命中规则,匹配到此规则就进入到cache层。 +#### primary Primary database, provides DTC core functionality +* table DTC table name +* layered.rule Hit rules for layered storage. Requests matching this rule will enter the cache layer. * cache/hot/full - dtc根据不同的功能需要配置不同的模块,共分为三层:
- cache层:提供缓存功能,只设置cache,不设置hot则表示CACHE ONLY模式,只缓存数据不存储数据到数据库。
- hot层:在cache的基础上提供数据存储功能,在datasource模式下需要配置此层来设置具体的数据源信息。在分层存储时,设置此模块能够配置热点数据的数据源
- full层:在分层存储的功能时,需要配置此层,全量数据将存储在此数据源中。 -* logic/real: -该字段分别设置逻辑库表和真实库表。逻辑库表用于在dtc中显示和使用库、表。真实库表信息是真实的数据源信息。 + DTC needs to configure different modules based on different functional requirements, divided into three layers:
+ cache layer: Provides caching functionality. If only cache is set without hot, it represents CACHE ONLY mode, which only caches data without storing data to the database.
+ hot layer: Provides data storage functionality on top of cache. In datasource mode, this layer needs to be configured to set specific data source information. In layered storage, setting this module allows configuration of data sources for hot data
+ full layer: When using layered storage functionality, this layer needs to be configured. Full data will be stored in this data source. +* logic/real: +These fields set logical database tables and real database tables respectively. Logical database tables are used for display and usage of databases and tables in DTC. Real database table information is the actual data source information. * sharding: -该字段用户设置分库分表的信息,key字段用于设置依照此字段进行分片。table字段用于设置分表的信息,例如分表名为opensource_0/opensource_1.....opensouce_9,则只需要设置为{prefix: [*table, _], start: 0, last: 9} +This field is used to set database and table sharding information. The key field is used to set which field to use for sharding. The table field is used to set table sharding information. For example, if table names are opensource_0/opensource_1.....opensource_9, you only need to set it as {prefix: [*table, _], start: 0, last: 9} #### table -cache配置文件位置为当前项目的conf/table.yaml,主要配置以下字段: +Cache configuration file is located at conf/table.yaml in the current project. The main fields to configure are: * TABLE_CONF.table_name * TABLE_CONF.field_count -* TABLE_CONF.key_count 指定 -* FIELD*ID* *ID*为当前字段的编号,从1开始使用,可以根据场景需要配置个数。 - * FIELD*ID*.field_name 字段名 - * FIELD*ID*.field_type 字段类型:1.整数型 2.无符号整数形 3.浮点型 4.字符串(大小写不明感) 5.字符串(大小写敏感) - * FIELD*ID*.field_size 字段长度。定义了该字段的大小。例如int型可配置为4字节,long型可配置为8字节,字符串类型可根据具体使用场景配置长度,但最大长度不得超过64KB。 - * FIELD*ID*.unique [可选]默认值0,可配置0或1。当为0时表示该字段的值不唯一,1时表示该字段值唯一。 +* TABLE_CONF.key_count Specify +* FIELD*ID* *ID* is the field number, starting from 1. The number can be configured based on scenario requirements. + * FIELD*ID*.field_name Field name + * FIELD*ID*.field_type Field type: 1.Integer 2.Unsigned integer 3.Float 4.String (case insensitive) 5.String (case sensitive) + * FIELD*ID*.field_size Field length. Defines the size of the field. For example, int type can be configured as 4 bytes, long type can be configured as 8 bytes. String type can be configured with length based on specific usage scenarios, but maximum length cannot exceed 64KB. + * FIELD*ID*.unique [Optional] Default value 0, can be configured as 0 or 1. When 0, it means the field value is not unique; when 1, it means the field value is unique. -#### extension 扩展库,提供多租户功能 -在dtc的基础缓存和数据代理功能之外,还提供了扩展库,通过配置此模块能够在数据库中进行复杂查询和分库分表功能。 \ No newline at end of file +#### extension Extension library, provides multi-tenant functionality +In addition to DTC's basic caching and data proxy functionality, an extension library is also provided. By configuring this module, complex queries and database and table sharding functionality can be performed in the database. \ No newline at end of file diff --git a/docs/quickstart.md b/docs/quickstart.md index a21dc0db..e6740873 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -1,78 +1,78 @@ -## 目录结构 -Bin文件目录:/usr/local/dtc
-配置文件目录:/usr/local/dtc/conf/
-日志目录:/usr/local/dtc/log/
-统计数据目录:/usr/local/dtc/stat/
-binlog数据目录:/usr/local/dtc/log/
+## Directory Structure +Binary file directory: /usr/local/dtc
+Configuration file directory: /usr/local/dtc/conf/
+Log directory: /usr/local/dtc/log/
+Statistics data directory: /usr/local/dtc/stat/
+Binlog data directory: /usr/local/dtc/log/
-## DTC模式 +## DTC Modes -DTC分为两种数据模式:CACHE ONLY模式和Datasource模式。 -- CACHE ONLY模式的DTC当做缓存使用,不连接数据库。 -- Datasource模式需要连接数据库,目前支持连接Mysql。此模式下DTC作为数据库的缓存代理,提供分库分表,将热点数据缓存在DTC中。 +DTC has two data modes: CACHE ONLY mode and Datasource mode. +- CACHE ONLY mode uses DTC as a cache without connecting to a database. +- Datasource mode requires a database connection and currently supports MySQL. In this mode, DTC acts as a database cache proxy, providing database and table sharding, and caching hot data in DTC. -Demo使用的是CACHE ONLY模式演示。 +The demo uses CACHE ONLY mode for demonstration. -## 表结构 -表结构文件在conf/dtc.yaml中。
-demo中定义的表名为dtc_opensource,
-结构为: -| 字段名 | 类型 | 长度 | -| ------ | ---------------------- | ------- | -| uid | 整型 | 4 Byte | -| name | 字符串(大小写不敏感 | 50 Byte | -| city | 字符串(大小写不敏感) | 50 Byte | -| sex | 整型 | 4 Byte | -| age | 整型 | 4 Byte | +## Table Structure +The table structure file is in conf/dtc.yaml.
+The table name defined in the demo is dtc_opensource,
+Structure: +| Field Name | Type | Length | +| ---------- | ------------------------ | ------- | +| uid | Integer | 4 Byte | +| name | String (case insensitive)| 50 Byte | +| city | String (case insensitive)| 50 Byte | +| sex | Integer | 4 Byte | +| age | Integer | 4 Byte | -## 启动DTC Server端 -为了省去配置环境的麻烦,Demo中提供docker镜像,直接运行即可启动服务端:
+## Starting DTC Server +To save the trouble of environment configuration, the demo provides a docker image that can be run directly to start the server:
```shell docker pull dtc8/dtc:latest docker run --rm --name dtc -p :12001 -v :/usr/local/dtc/conf/ -e DTC_BIN=dtc -e DTC_ARGV=-ayc dtc8/dtc ``` -## 运行Client测试示例 -当前已经支持mysql 5.X和8.X的客户端访问dtc进行SQL操作。当运行上面docker之后,可以运行以下SQL语句: -* 登录: +## Running Client Test Examples +Currently supports MySQL 5.X and 8.X client access to DTC for SQL operations. After running the above docker, you can run the following SQL statements: +* Login: ``` mysql -h127.0.0.1 -P12001 -uroot -proot ``` -* 查看数据库列表 +* View database list ``` show databases; ``` -* 切换数据库 +* Switch database ``` use layer2; ``` -* 查看表列表 +* View table list ``` show tables; ``` -* 插入 +* Insert ``` insert into opensource(uid, name) values(1, 'Jack') where uid = 1; ``` -* 更新 +* Update ``` update opensource set name = 'Lee' where uid = 1; ``` -* 查询 +* Query ``` select uid, name from opensource where uid = 1; ``` -* 删除 +* Delete ``` delete from opensource where uid = 1; ``` -你也可以根据需要尝试修改示例中的代码或配置,进行更多的体验。配置文件请参考[Configure](./configure.md)。 +You can also try modifying the code or configuration in the examples as needed for more experimentation. For configuration files, please refer to [Configure](./configure.md). -源码编译请参照[buiding](./building.md)。 +For source code compilation, please refer to [Building](./building.md). -## 直接部署 -* 创建文件夹 +## Direct Deployment +* Create directories ``` mkdir -p basepath mkdir -p /usr/local/dtc/data @@ -80,13 +80,13 @@ mkdir -p /usr/local/dtc/stat mkdir -p /usr/local/dtc/log mkdir -p /usr/local/dtc/conf ``` -* 将bin文件拷贝到/usr/local/dtc文件夹,并赋执行权限 +* Copy binary files to /usr/local/dtc directory and grant execution permissions ``` cp * /usr/local/dtc/ chmod +x * ``` -* 运行dtc -执行./dtc -h获取详细信息,可以依据需要分别运行不同的组件。注:需要在root权限下运行core模块。 +* Run dtc +Execute ./dtc -h to get detailed information. You can run different components separately as needed. Note: The core module needs to run with root privileges. ``` -h, --help : this help -v, --version : show version and exit @@ -96,20 +96,20 @@ chmod +x * -s, --sharding : load sharding module -r, --recovery mode : auto restart when crashed ``` -例如: -1.只运行core,不使用agent代理: +Examples: +1. Run only core, without using agent proxy: ``` ./dtc -c ``` -2.运行agent代理的dtc模式: +2. Run DTC mode with agent proxy: ``` ./dtc -ac ``` -3.运行分层存储 +3. Run tiered storage ``` ./dtc -ayc ``` -4.运行带有分库分表的分层存储 +4. Run tiered storage with database and table sharding ``` ./dtc -aycs ``` \ No newline at end of file From 581647134ff464eac97b47b745b51793d2918d2b Mon Sep 17 00:00:00 2001 From: kfysck Date: Thu, 4 Sep 2025 09:36:48 +0000 Subject: [PATCH 06/10] feat: English translation 5 --- check_cn.sh | 12 ++ src/agent-watchdog/daemons.cc | 2 +- src/agent/da.c | 6 +- src/core/buffer/buffer_remoteLog.h | 2 +- src/core/log/logger.h | 50 ++++----- src/core/raw/raw_data.h | 6 +- src/core/raw/raw_data_process.h | 2 +- src/core/task/task_pendlist.cc | 8 +- src/core/task/task_pendlist.h | 12 +- src/core/tree/tree_data.cc | 116 ++++++++++---------- src/core/tree/tree_data_process.cc | 10 +- src/daemons/daemon_listener.cc | 2 +- src/daemons/daemons.cc | 2 +- src/daemons/logger.cc | 4 +- src/daemons/run.cc | 2 +- src/data_lifecycle/data_conf.cc | 2 +- src/data_lifecycle/data_manager.cc | 18 +-- src/libs/common/daemon/daemon.cc | 20 ++-- src/libs/common/packet/packet_server.cc | 30 ++--- src/libs/common/plugin/plugin_global.h | 18 +-- src/libs/common/plugin/plugin_request.h | 8 +- src/libs/common/plugin/plugin_sync.cc | 4 +- src/libs/common/plugin/plugin_unit.cc | 2 +- src/libs/common/proc_title.c | 6 +- src/libs/common/request/request_threading.h | 2 +- src/libs/common/socket/socket_bind.cc | 2 +- src/libs/common/table/table_def.cc | 12 +- src/libs/common/table/table_def.h | 10 +- src/libs/common/task/task_base.cc | 2 +- src/libs/common/task/task_const.cc | 2 +- src/libs/common/task/task_copy.cc | 6 +- src/libs/common/task/task_request.cc | 2 +- src/libs/common/task/task_request.h | 2 +- src/libs/common/task/task_server.cc | 2 +- src/libs/common/thread/thread_cpu_stat.cc | 16 +-- src/libs/common/timer/timer_list.cc | 6 +- src/libs/common/timer/timer_list.h | 6 +- src/libs/dep/dtcint.h | 42 +++---- src/libs/dep/key_list.cc | 2 +- src/libs/stat/stat_alarm_reporter.cc | 26 ++--- src/libs/stat/stat_alarm_reporter.h | 22 ++-- src/libs/stat/stat_dtc.cc | 2 +- 42 files changed, 260 insertions(+), 248 deletions(-) create mode 100755 check_cn.sh diff --git a/check_cn.sh b/check_cn.sh new file mode 100755 index 00000000..edf2764a --- /dev/null +++ b/check_cn.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +DIR="./" + +find "$DIR" -type f \( -name "*.h" -o -name "*.cc" -o -name "*.c" \) | while read -r file; do + if grep -qP '[\x{4e00}-\x{9fff}]' "$file" 2>/dev/null; then + echo "==== $file ====" + grep -nP '[\x{4e00}-\x{9fff}]' "$file" 2>/dev/null + echo + fi +done + diff --git a/src/agent-watchdog/daemons.cc b/src/agent-watchdog/daemons.cc index 1f50c4a7..6a3998b6 100644 --- a/src/agent-watchdog/daemons.cc +++ b/src/agent-watchdog/daemons.cc @@ -68,7 +68,7 @@ static void sighdlr(int signo) WatchDog::WatchDog() { - /* 立马注册进程退出处理函数,解决启动时创建太多进程导致部分进程退出没有收到信号linjinming 2014-06-14*/ + /* immediately register process exit handler to solve the issue of some processes not receiving signals when too many processes are created during startup linjinming 2014-06-14*/ notifier = new WatchDogPipe; //signal(SIGCHLD, sighdlr); diff --git a/src/agent/da.c b/src/agent/da.c index 4e14b830..477e86e7 100644 --- a/src/agent/da.c +++ b/src/agent/da.c @@ -565,9 +565,9 @@ static void da_run(struct instance *dai) { _set_log_switch_(dai->ctx->cf->stCL.log_switch); /* - own_addr 取本地IP - own_port, bid 只取server_pool的第一个 - _set_remote_log_config_放在此处初始化会导致在此之前的log不会被远程发送 + own_addr gets local IP + own_port, bid only gets the first server_pool + _set_remote_log_config_ initialized here will cause logs before this point not to be sent remotely */ if(array_n(&(dai->ctx->pool)) > 0) { diff --git a/src/core/buffer/buffer_remoteLog.h b/src/core/buffer/buffer_remoteLog.h index 55efa98b..4514d47d 100644 --- a/src/core/buffer/buffer_remoteLog.h +++ b/src/core/buffer/buffer_remoteLog.h @@ -369,7 +369,7 @@ class CacheRemoteLog { DTCTableDefinition *m_TableDef; EUpdateMode m_UpdateMode; EUpdateMode m_InsertMode; - int m_RemotePort; /*如果端口没有设置正确,写日志函数就啥都不用做了*/ + int m_RemotePort; /*if the port is not set correctly, the log writing function doesn't need to do anything*/ bool m_OpLog; }; diff --git a/src/core/log/logger.h b/src/core/log/logger.h index ddb87997..603c3f60 100644 --- a/src/core/log/logger.h +++ b/src/core/log/logger.h @@ -50,8 +50,8 @@ class LogBase { int _fd; private: - char _path[MAX_PATH_NAME_LEN]; //日志集所在目录 - char _prefix[MAX_PATH_NAME_LEN]; //日志集的文件前缀 + char _path[MAX_PATH_NAME_LEN]; //Directory where log set is located + char _prefix[MAX_PATH_NAME_LEN]; //File prefix of log set }; class LogWriter : public LogBase { @@ -69,11 +69,11 @@ class LogWriter : public LogBase { int shift_file(); private: - off_t _cur_size; //当前日志文件的大小 - off_t _max_size; //单个日志文件允许的最大大小 - uint64_t _total_size; //日志集允许的最大大小 - uint32_t _cur_max_serial; //当前日志文件最大编号 - uint32_t _cur_min_serial; //当前日志文件最大编号 + off_t _cur_size; //Current log file size + off_t _max_size; //Maximum size allowed for single log file + uint64_t _total_size; //Maximum size allowed for log set + uint32_t _cur_max_serial; //Current log file maximum serial number + uint32_t _cur_min_serial; //Current log file minimum serial number }; class LogReader : public LogBase { @@ -92,10 +92,10 @@ class LogReader : public LogBase { void refresh(); private: - uint32_t _min_serial; //日志集的最小文件编号 - uint32_t _max_serial; //日志集的最大文件编号 - uint32_t _cur_serial; //当前日志文件编号 - off_t _cur_offset; //当前日志文件偏移量 + uint32_t _min_serial; //Minimum file serial number of log set + uint32_t _max_serial; //Maximum file serial number of log set + uint32_t _cur_serial; //Current log file serial number + off_t _cur_offset; //Current log file offset }; ///////////////////////////////////////////////////////////////////// @@ -103,13 +103,13 @@ class LogReader : public LogBase { * generic binlog header */ typedef struct binlog_header { - uint32_t length; //长度 - uint8_t version; //版本 - uint8_t type; //类型: bitmap, dtc, other - uint8_t operater; //操作: insert,select,upate ... - uint8_t reserve[5]; //保留 - uint32_t timestamp; //时间戳 - uint32_t recordcount; //子记录个数 + uint32_t length; //Length + uint8_t version; //Version + uint8_t type; //Type: bitmap, dtc, other + uint8_t operater; //Operation: insert, select, update ... + uint8_t reserve[5]; //Reserved + uint32_t timestamp; //Timestamp + uint32_t recordcount; //Number of sub-records uint8_t endof[0]; } __attribute__((__aligned__(1))) binlog_header_t; @@ -128,8 +128,8 @@ typedef enum binlog_type { /* * binlog class */ -#define BINLOG_MAX_SIZE (100 * (1U << 20)) //100M, 默认单个日志文件大小 -#define BINLOG_MAX_TOTAL_SIZE (3ULL << 30) //3G, 默认最大日志文件编号 +#define BINLOG_MAX_SIZE (100 * (1U << 20)) //100M, default single log file size +#define BINLOG_MAX_TOTAL_SIZE (3ULL << 30) //3G, default maximum log file serial number #define BINLOG_DEFAULT_VERSION 0x02 class BinlogWriter { @@ -152,15 +152,15 @@ class BinlogWriter { BinlogWriter(const BinlogWriter &); private: - LogWriter _log_writer; //写者 - buffer _codec_buffer; //编码缓冲区 + LogWriter _log_writer; //Writer + buffer _codec_buffer; //Encoding buffer }; class BinlogReader { public: int init(const char *path, const char *prefix); - int Read(); //顺序读,每次读出一条binlog记录 + int Read(); //Sequential read, read one binlog record each time int Seek(const JournalID &); JournalID query_id(); @@ -179,8 +179,8 @@ class BinlogReader { BinlogReader(const BinlogReader &); private: - LogReader _log_reader; //读者 - buffer _codec_buffer; //编码缓冲区 + LogReader _log_reader; //Reader + buffer _codec_buffer; //Encoding buffer }; #endif diff --git a/src/core/raw/raw_data.h b/src/core/raw/raw_data.h index a3d72533..2ec04d5f 100644 --- a/src/core/raw/raw_data.h +++ b/src/core/raw/raw_data.h @@ -27,9 +27,9 @@ #define PRE_DECODE_ROW 1 typedef enum _EnumDataType { - DATA_TYPE_RAW, // 平板数据结构 - DATA_TYPE_TREE_ROOT, // 树的根节点 - DATA_TYPE_TREE_NODE // 树的节点 + DATA_TYPE_RAW, // flat data structure + DATA_TYPE_TREE_ROOT, // tree root node + DATA_TYPE_TREE_NODE // tree node } EnumDataType; typedef enum _enum_oper_type_ { diff --git a/src/core/raw/raw_data_process.h b/src/core/raw/raw_data_process.h index 0e241b1b..adeba50a 100644 --- a/src/core/raw/raw_data_process.h +++ b/src/core/raw/raw_data_process.h @@ -50,7 +50,7 @@ class RawDataProcess : public DataProcess { unsigned int nodeSizeLimit; // -DEBUG- - /*对历史节点数据的采样统计,放在高端内存操作管理的地方,便于收敛统计点 , modify by tomchen 2014.08.27*/ + /*Sampling statistics for historical node data, placed in high-end memory operation management for easier convergence of statistical points, modify by tomchen 2014.08.27*/ StatSample history_datasize; StatSample history_rowsize; diff --git a/src/core/task/task_pendlist.cc b/src/core/task/task_pendlist.cc index 417a9290..758fde4b 100644 --- a/src/core/task/task_pendlist.cc +++ b/src/core/task/task_pendlist.cc @@ -30,7 +30,7 @@ TaskPendingList::~TaskPendingList() { std::list::iterator it; for (it = _pendlist.begin(); it != _pendlist.end(); ++it) { - //把所有请求踢回客户端 + //Return all requests back to clients it->first->set_error(-ETIMEDOUT, __FUNCTION__, "object deconstruct"); it->first->turn_around_job_answer(); @@ -49,12 +49,12 @@ void TaskPendingList::add2_list(DTCJobOperation *job) return; } -// 唤醒队列中所有已经pending的task +// Wake up all tasks that are already pending in the queue void TaskPendingList::Wakeup(void) { log4cplus_debug("TaskPendingList Wakeup"); - //唤醒所有task + //Wake up all tasks _wakeup = 1; attach_ready_timer(_owner->owner); @@ -79,7 +79,7 @@ void TaskPendingList::job_timer_procedure(void) time_t now = time(NULL); for (it = copy.begin(); it != copy.end(); ++it) { - //超时处理 + //Timeout handling if (it->second + _timeout >= now) { _pendlist.push_back(*it); } else { diff --git a/src/core/task/task_pendlist.h b/src/core/task/task_pendlist.h index 6e2fc976..8015e5be 100644 --- a/src/core/task/task_pendlist.h +++ b/src/core/task/task_pendlist.h @@ -24,11 +24,11 @@ DTC_BEGIN_NAMESPACE /* - * 请求挂起列表。 + * Request pending list. * - * 如果发现请求暂时没法满足,则挂起,直到 - * 1. 超时 - * 2. 条件满足被唤醒 + * If a request temporarily cannot be satisfied, it is suspended until: + * 1. Timeout + * 2. Conditions are met and awakened */ class BufferProcessAskChain; class CacheBase; @@ -39,8 +39,8 @@ class TaskPendingList : private TimerObject { TaskPendingList(JobAskInterface *o, int timeout = 5); ~TaskPendingList(); - void add2_list(DTCJobOperation *); //加入pending list - void Wakeup(void); //唤醒队列中的所有task + void add2_list(DTCJobOperation *); //Add to pending list + void Wakeup(void); //Wake up all tasks in the queue private: virtual void job_timer_procedure(void); diff --git a/src/core/tree/tree_data.cc b/src/core/tree/tree_data.cc index c24f88e4..e3754433 100644 --- a/src/core/tree/tree_data.cc +++ b/src/core/tree/tree_data.cc @@ -253,7 +253,7 @@ int TreeData::do_attach(MEM_HANDLE_T hHandle) int TreeData::encode_tree_row(const RowValue &stRow, unsigned char uchOp) { SET_TREE_VALUE(uchOp, unsigned char); - for (int j = 1; j <= stRow.num_fields(); j++) //¿½±´Ò»ÐÐÊý¾Ý + for (int j = 1; j <= stRow.num_fields(); j++) { if (stRow.table_definition()->is_discard(j)) continue; @@ -431,7 +431,7 @@ int TreeData::insert_row_flag(const RowValue &stRow, KeyComparator pfComp, } } - /*每次insert数据之后,更新头部信息*/ + /*update header information after each data insert*/ rowCnt = *(uint32_t *)(p_content_ + sizeof(unsigned char) + sizeof(uint32_t)); *(uint32_t *)(p_content_ + sizeof(unsigned char)) = offset_; @@ -543,7 +543,7 @@ int TreeData::copy_tree_all(RawData *new_data) iRet = insert_row(stOldRow, KeyCompare, false); if (iRet == EC_NO_MEM) { - /*这里为了下次完全重新建立T树,把未建立完的树全部删除*/ + /*here delete all incompletely built trees to completely rebuild T-tree next time*/ need_new_bufer_size = new_data->data_size() - new_data->data_start(); destroy_sub_tree(); @@ -678,7 +678,7 @@ int TreeData::compare_tree_data(RowValue *stpNodeRow) RowValue stOldRow(p_table_); for (uint32_t i = 0; i < resCookie.has_got_node_count; - i++) { //逐行拷贝数据 + i++) { //copy data row by row p_content_ = Pointer(pCookie[i]); uint32_t rows = *(uint32_t *)(p_content_ + sizeof(unsigned char) + @@ -746,7 +746,7 @@ int TreeData::replace_tree_data(DTCJobOperation &job_op, Node *p_node, char *NewIndex = reinterpret_cast(&new_value); CmpCookie cookie(p_table_, TTREE_INDEX_POS); if (KeyCompare(NewIndex, &cookie, *mallocator_, p_record_) != - 0) //Index字段变更 + 0) //Index field changed { char *tmp_pchContent = p_content_; uint32_t tmp_size = size_; @@ -775,12 +775,12 @@ int TreeData::replace_tree_data(DTCJobOperation &job_op, Node *p_node, if (uiTotalRows > 0 && uiTotalRows == iDelete && get_row_count() == - 0) //RowFormat上的内容已删光 + 0) //content on RowFormat has been deleted { - //删除tree node + //delete tree node bool isFreeNode = false; DTCValue value = (stOldRow) - [TTREE_INDEX_POS]; //for轮询的最后一行数据 + [TTREE_INDEX_POS]; //last row data for polling char *indexKey = reinterpret_cast( &value); @@ -805,11 +805,11 @@ int TreeData::replace_tree_data(DTCJobOperation &job_op, Node *p_node, p_tree_root_->node_count_--; p_tree_root_->root_handle_ = t_tree_.Root(); - //释放handle + //release handle mallocator_->Free(p_record_); } } - } else //Index字段不变 + } else //Index field unchanged { MEM_HANDLE_T *pRawHandle = NULL; int iRet = do_find(TTREE_INDEX_POS, *stpNodeRow, @@ -818,12 +818,12 @@ int TreeData::replace_tree_data(DTCJobOperation &job_op, Node *p_node, return iRet; iRet = replace_cur_row(*stpNodeRow, m_async, - pRawHandle); // 加进cache + pRawHandle); // add to cache if (iRet == EC_NO_MEM) { return iRet; } if (iRet != 0) { - /*标记加入黑名单*/ + /*mark as added to blacklist*/ job_op.push_black_list_size(need_size()); return (-6); } @@ -869,7 +869,7 @@ int TreeData::replace_sub_raw_data(DTCJobOperation &job_op, stpCurRow->Copy(stpNodeRow); - //如果不符合查询条件 + //if it doesn't meet query conditions if (job_op.compare_row(*stpTaskRow) == 0) continue; @@ -879,7 +879,7 @@ int TreeData::replace_sub_raw_data(DTCJobOperation &job_op, if (iRet == -100 || iRet == 0) return iRet; - job_op.update_row(*stpTaskRow); //修改数据 + job_op.update_row(*stpTaskRow); //modify data if (stpNodeTab != stpTaskTab) stpNodeRow->Copy(stpTaskRow); @@ -891,7 +891,7 @@ int TreeData::replace_sub_raw_data(DTCJobOperation &job_op, CmpCookie cookie(p_table_, TTREE_INDEX_POS); if (KeyCompare(NewIndex, &cookie, *mallocator_, - hRecord) != 0) //update Index字段 + hRecord) != 0) //update Index field { char *tmp_pchContent = p_content_; uint32_t tmp_size = size_; @@ -913,12 +913,12 @@ int TreeData::replace_sub_raw_data(DTCJobOperation &job_op, } } else { iRet = replace_cur_row(*stpNodeRow, m_async, - pRawHandle); // 加进cache + pRawHandle); // add to cache if (iRet == EC_NO_MEM) { return iRet; } if (iRet != 0) { - /*标记加入黑名单*/ + /*mark as added to blacklist*/ job_op.push_black_list_size( need_size()); return (-6); @@ -935,12 +935,12 @@ int TreeData::replace_sub_raw_data(DTCJobOperation &job_op, } if (uiTotalRows > 0 && - uiTotalRows - iDelete == 0) //RowFormat上的内容已删光 + uiTotalRows - iDelete == 0) //content on RowFormat has been deleted { - //删除tree node + //delete tree node bool isFreeNode = false; DTCValue value = - (*stpCurRow)[TTREE_INDEX_POS]; //for轮询的最后一行数据 + (*stpCurRow)[TTREE_INDEX_POS]; //for polling the last row of data char *indexKey = reinterpret_cast(&value); CmpCookie cookie(p_table_, TTREE_INDEX_POS); int iret = t_tree_.Delete(indexKey, &cookie, KeyCompare, @@ -955,7 +955,7 @@ int TreeData::replace_sub_raw_data(DTCJobOperation &job_op, p_tree_root_->tree_size_ -= size_; p_tree_root_->node_count_--; p_tree_root_->root_handle_ = t_tree_.Root(); - //释放handle + //release handle mallocator_->Free(hRecord); } @@ -963,7 +963,7 @@ int TreeData::replace_sub_raw_data(DTCJobOperation &job_op, } /* - * encode到私有内存,防止replace,update引起重新rellocate导致value引用了过期指针 + * encode to private memory, prevent replace and update from causing reallocation that would make value reference expired pointers */ int TreeData::encode_to_private_area(RawData &raw, RowValue &value, unsigned char value_flag) @@ -1030,7 +1030,7 @@ int TreeData::update_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) stpCurRow->Copy(stpNodeRow); - //如果不符合查询条件 + //if it doesn't meet query conditions if (job_op.compare_row(*stpTaskRow) == 0) continue; @@ -1040,7 +1040,7 @@ int TreeData::update_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) if (iRet == -100 || iRet == 0) return iRet; - job_op.update_row(*stpTaskRow); //修改数据 + job_op.update_row(*stpTaskRow); //modify data if (stpNodeTab != stpTaskTab) stpNodeRow->Copy(stpTaskRow); @@ -1051,7 +1051,7 @@ int TreeData::update_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) CmpCookie cookie(p_table_, TTREE_INDEX_POS); if (KeyCompare(NewIndex, &cookie, *mallocator_, hRecord) != - 0) //update Index字段 + 0) //update Index field { char *tmp_pchContent = p_content_; uint32_t tmp_size = size_; @@ -1071,7 +1071,7 @@ int TreeData::update_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) iDelete++; } } else { - // 在私有区间decode + // decode in private area RawData stTmpRows(&g_stSysMalloc, 1); if (encode_to_private_area(stTmpRows, *stpNodeRow, uchRowFlags)) { @@ -1081,12 +1081,12 @@ int TreeData::update_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) } iRet = replace_cur_row(*stpNodeRow, m_async, - pRawHandle); // 加进cache + pRawHandle); // add to cache if (iRet == EC_NO_MEM) { return iRet; } if (iRet != 0) { - /*标记加入黑名单*/ + /*mark as added to blacklist*/ job_op.push_black_list_size(need_size()); return (-6); } @@ -1100,12 +1100,12 @@ int TreeData::update_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) } if (uiTotalRows > 0 && - uiTotalRows - iDelete == 0) //RowFormat上的内容已删光 + uiTotalRows - iDelete == 0) //content on RowFormat has been deleted { - //删除tree node + //delete tree node bool isFreeNode = false; DTCValue value = - (*stpCurRow)[TTREE_INDEX_POS]; //for轮询的最后一行数据 + (*stpCurRow)[TTREE_INDEX_POS]; //for polling the last row of data char *indexKey = reinterpret_cast(&value); CmpCookie cookie(p_table_, TTREE_INDEX_POS); int iret = t_tree_.Delete(indexKey, &cookie, KeyCompare, @@ -1120,7 +1120,7 @@ int TreeData::update_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) p_tree_root_->tree_size_ -= size_; p_tree_root_->node_count_--; p_tree_root_->root_handle_ = t_tree_.Root(); - //释放handle + //release handle mallocator_->Free(hRecord); } @@ -1168,7 +1168,7 @@ int TreeData::delete_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) if (stpNodeTab != stpTaskTab) { stpTaskRow->Copy(stpNodeRow); } - if (job_op.compare_row(*stpTaskRow) != 0) { //符合del条件 + if (job_op.compare_row(*stpTaskRow) != 0) { //meets deletion condition iRet = delete_cur_row(*stpNodeRow); if (iRet != 0) { log4cplus_error( @@ -1185,12 +1185,12 @@ int TreeData::delete_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) if (iAffectRows > uiTotalRows) return (-3); else if (iAffectRows == uiTotalRows && - uiTotalRows > 0) //RowFormat上的内容已删光 + uiTotalRows > 0) //content on RowFormat has been completely deleted { - //删除tree node + //delete tree node bool isFreeNode = false; DTCValue value = - (*stpNodeRow)[TTREE_INDEX_POS]; //for轮询的最后一行数据 + (*stpNodeRow)[TTREE_INDEX_POS]; //for polling the last row of data char *indexKey = reinterpret_cast(&value); CmpCookie cookie(p_table_, TTREE_INDEX_POS); int iret = t_tree_.Delete(indexKey, &cookie, KeyCompare, @@ -1206,7 +1206,7 @@ int TreeData::delete_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) p_tree_root_->tree_size_ -= size_; p_tree_root_->node_count_--; p_tree_root_->root_handle_ = t_tree_.Root(); - //释放handle + //release handle mallocator_->Free(hRecord); } @@ -1231,7 +1231,7 @@ int TreeData::skip_row(const RowValue &stRow) SKIP_TREE_SIZE(sizeof(unsigned char)); // flag for (int j = key_index_ + 1; j <= stRow.num_fields(); - j++) //拷贝一行数据 + j++) //copy one row of data { //id: bug fix skip discard if (stRow.table_definition()->is_discard(j)) @@ -1249,15 +1249,15 @@ int TreeData::skip_row(const RowValue &stRow) ; break; - case DField::Float: //浮点数 + case DField::Float: //floating point number if (stRow.field_size(j) > (int)sizeof(float)) SKIP_TREE_SIZE(sizeof(double)); else SKIP_TREE_SIZE(sizeof(float)); break; - case DField::String: //字符串 - case DField::Binary: //二进制数据 + case DField::String: //string + case DField::Binary: //binary data default: { int iLen; GET_TREE_VALUE(iLen, int); @@ -1448,12 +1448,12 @@ int TreeData::get_sub_raw_data(DTCJobOperation &job_op, MEM_HANDLE_T hRecord) if (stpNodeTab != stpTaskTab) { stpTaskRow->Copy(stpNodeRow); } - if (job_op.compare_row(*stpTaskRow) == 0) //如果不符合查询条件 + if (job_op.compare_row(*stpTaskRow) == 0) //if it doesn't meet query conditions continue; if (stpTaskTab->expire_time_field_id() > 0) stpTaskRow->update_expire_time(); - //当前行添加到task中 + //add current row to task log4cplus_debug("append_row flag"); job_op.append_row(stpTaskRow); @@ -1483,14 +1483,14 @@ int TreeData::get_sub_raw(DTCJobOperation &job_op, unsigned int nodeCnt, t_tree_.traverse_forward(Visit, &resCookie); - if (isAsc) //升序 + if (isAsc) //ascending order { for (int i = 0; i < (int)resCookie.has_got_node_count; i++) { int iRet = (this->*subRowProc)(job_op, pCookie[i]); if (iRet != 0) return iRet; } - } else //降序 + } else //descending order { for (int i = (int)resCookie.has_got_node_count - 1; i >= 0; i--) { @@ -1508,15 +1508,15 @@ int TreeData::match_index_condition(DTCJobOperation &job_op, SubRowProcess subRowProc) { const DTCFieldValue *condition = job_op.request_condition(); - int numfields = 0; //条件字段个数 + int numfields = 0; //number of condition fields bool isAsc = !(p_table_->is_desc_order(TTREE_INDEX_POS)); if (condition) numfields = condition->num_fields(); - int indexIdArr[numfields]; //开辟空间比实际使用的大 - int indexCount = 0; //条件索引个数 - int firstEQIndex = -1; //第一个EQ在indexIdArr中的位置 + int indexIdArr[numfields]; //allocate space larger than actually used + int indexCount = 0; //number of condition indexes + int firstEQIndex = -1; //position of first EQ in indexIdArr for (int i = 0; i < numfields; i++) { if (condition->field_id(i) == TTREE_INDEX_POS) { @@ -1529,11 +1529,11 @@ int TreeData::match_index_condition(DTCJobOperation &job_op, if (indexCount == 0 || (indexCount == 1 && condition->field_operation(indexIdArr[0]) == - DField::NE)) { //平板类型 + DField::NE)) { //flat table type int iret = get_sub_raw(job_op, NodeCnt, isAsc, subRowProc); if (iret != 0) return iret; - } else if (firstEQIndex != -1) //有至少一个EQ条件 + } else if (firstEQIndex != -1) //has at least one EQ condition { MEM_HANDLE_T *pRecord = NULL; @@ -1741,7 +1741,7 @@ int TreeData::flush_tree_data(DTCFlushRequest *flush_req, Node *p_node, affected_count = 0; DTCValue astKey[p_table_->key_fields()]; TaskPackedKey::unpack_key(p_table_, key(), astKey); - RowValue stRow(p_table_); //一行数据 + RowValue stRow(p_table_); //one row of data for (int i = 0; i < p_table_->key_fields(); i++) stRow[i] = astKey[i]; @@ -1794,7 +1794,7 @@ int TreeData::get_tree_data(DTCJobOperation &job_op) return 0; } - job_op.prepare_result(); //准备返回结果对象 + job_op.prepare_result(); //prepare result object for return if (job_op.all_rows() && (job_op.count_only() || !job_op.in_range((int)rowCnt, 0))) { if (job_op.is_batch_request()) { @@ -1840,7 +1840,7 @@ int TreeData::delete_tree_data(DTCJobOperation &job_op) rows_count_ = 0; dirty_rows_count_ = 0; - job_op.prepare_result(); //准备返回结果对象 + job_op.prepare_result(); //prepare result object for return if (job_op.all_rows() && (job_op.count_only() || !job_op.in_range((int)rowCnt, 0))) { if (job_op.is_batch_request()) { @@ -1940,7 +1940,7 @@ ALLOC_SIZE_T TreeData::calc_tree_row_size(const RowValue &stRow, int keyIdx) if (keyIdx == -1) log4cplus_error("TreeData may not init yet..."); ALLOC_SIZE_T tSize = 1; // flag - for (int j = keyIdx + 1; j <= stRow.num_fields(); j++) //¿½±´Ò»ÐÐÊý¾Ý + for (int j = keyIdx + 1; j <= stRow.num_fields(); j++) { if (stRow.table_definition()->is_discard(j)) continue; @@ -1953,15 +1953,15 @@ ALLOC_SIZE_T TreeData::calc_tree_row_size(const RowValue &stRow, int keyIdx) sizeof(int32_t); break; - case DField::Float: //¸¡µãÊý + case DField::Float: tSize += likely(stRow.field_size(j) > (int)sizeof(float)) ? sizeof(double) : sizeof(float); break; - case DField::String: //×Ö·û´® - case DField::Binary: //¶þ½øÖÆÊý¾Ý + case DField::String: + case DField::Binary: default: { tSize += sizeof(int); tSize += stRow.field_value(j)->bin.len; diff --git a/src/core/tree/tree_data_process.cc b/src/core/tree/tree_data_process.cc index c0f21372..1ca49237 100644 --- a/src/core/tree/tree_data_process.cc +++ b/src/core/tree/tree_data_process.cc @@ -251,7 +251,7 @@ int TreeDataProcess::do_get(DTCJobOperation &job_op, Node *p_node) return iRet; } - /*更新访问时间和查找操作计数*/ + /*Update access time and query operation count*/ log4cplus_debug("node[id:%u] ,Get Count is %d", p_node->node_id(), m_stTreeData.total_rows()); return (0); @@ -470,17 +470,17 @@ int TreeDataProcess::do_replace_all(DTCJobOperation &job_op, Node *p_node) stpNodeRow = pstRow; } - /* 插入当前行 */ + /* Insert current row */ iRet = m_stTreeData.insert_row(*stpNodeRow, KeyCompare, false); - /* 如果内存空间不足,尝试扩大最多两次 */ + /* If insufficient memory space, try to expand up to two times */ if (iRet == EC_NO_MEM) { if (try_purge_count >= 2) { goto ERROR_PROCESS; } - /* 尝试次数 */ + /* Number of attempts */ ++try_purge_count; if (p_buffer_pond_->try_purge_size( m_stTreeData.need_size(), @@ -491,7 +491,7 @@ int TreeDataProcess::do_replace_all(DTCJobOperation &job_op, Node *p_node) if (iRet != EC_NO_MEM) p_node->vd_handle() = m_stTreeData.get_handle(); - /* 当前行操作成功 */ + /* Current row operation successful */ if (0 == iRet) continue; ERROR_PROCESS: diff --git a/src/daemons/daemon_listener.cc b/src/daemons/daemon_listener.cc index 8a20894e..cb5a046e 100644 --- a/src/daemons/daemon_listener.cc +++ b/src/daemons/daemon_listener.cc @@ -35,7 +35,7 @@ WatchDogListener::~WatchDogListener() } }; -/* 建socket */ +/* Create socket */ int WatchDogListener::attach_watch_dog() { int fd[2]; diff --git a/src/daemons/daemons.cc b/src/daemons/daemons.cc index 0f673dc3..87c4af96 100644 --- a/src/daemons/daemons.cc +++ b/src/daemons/daemons.cc @@ -69,7 +69,7 @@ static void sighdlr(int signo) WatchDog::WatchDog() { - /* 立马注册进程退出处理函数,解决启动时创建太多进程导致部分进程退出没有收到信号linjinming 2014-06-14*/ + /* Immediately register process exit handler to resolve the issue where too many processes created during startup cause some processes to exit without receiving signals linjinming 2014-06-14*/ notifier = new WatchDogPipe; signal(SIGCHLD, sighdlr); } diff --git a/src/daemons/logger.cc b/src/daemons/logger.cc index 123ae2ad..222f8f76 100644 --- a/src/daemons/logger.cc +++ b/src/daemons/logger.cc @@ -27,7 +27,7 @@ #define HOOKSO "../bin/faultlogger" -/* 设置环境变量LD_PRELOAD */ +/* Set environment variable LD_PRELOAD */ static void set_ld_preload() { if (access(HOOKSO, R_OK) == 0) { @@ -45,7 +45,7 @@ static void set_ld_preload() } } -/* 启动默认日志线程 */ +/* Start default logging thread */ int start_fault_logger(WatchDog *watchdog) { /** diff --git a/src/daemons/run.cc b/src/daemons/run.cc index cb41b27b..8a1009b9 100644 --- a/src/daemons/run.cc +++ b/src/daemons/run.cc @@ -27,7 +27,7 @@ #include "log/log.h" #include "daemon/daemon.h" #include "../core/global.h" -/* 打开看门狗 */ +/* Start watchdog */ int start_dtc(int (*entry)(void *), void *args) { int delay = 5; diff --git a/src/data_lifecycle/data_conf.cc b/src/data_lifecycle/data_conf.cc index 8f94b2ff..99479db7 100644 --- a/src/data_lifecycle/data_conf.cc +++ b/src/data_lifecycle/data_conf.cc @@ -104,7 +104,7 @@ int DataConf::ParseConfig(const std::string& config_path, ConfigParam& config_pa node = config["data_lifecycle"]["rule.cron"]; config_param.operate_time_rule_ = node? node.as(): "00 01 * * * ?"; - // 规则对应的操作operate_type delete或update + // Operation type corresponding to the rule: delete or update node = config["data_lifecycle"]["type.operate"]; config_param.operate_type_ = node? node.as(): "delete"; diff --git a/src/data_lifecycle/data_manager.cc b/src/data_lifecycle/data_manager.cc index 1aaed047..e8bb3582 100644 --- a/src/data_lifecycle/data_manager.cc +++ b/src/data_lifecycle/data_manager.cc @@ -174,7 +174,7 @@ int DataManager::DoTaskOnce(){ break; } for(auto iter = query_info_vec.begin(); iter != query_info_vec.end(); iter++){ - // 如果执行失败,更新last_id,并退出循环 + // If execution fails, update last_id and exit the loop std::string sql_set = ConstructDeleteSql(iter->field_info); ret = DoDelete(sql_set); log4cplus_debug("DoDelete ret: %d\n", ret); @@ -288,7 +288,7 @@ void hextostring(char* str, int len){ } std::set DataManager::ConstructDeleteSql(const std::string& key){ - // delete根据key删除,并带上规则 + // Delete based on key with rules applied std::set sql_set; std::string or_flag = " or "; std::set res = splitStr(data_rule_, or_flag); @@ -380,10 +380,10 @@ int DataManager::CreateTable(){ std::stringstream ss_sql; ss_sql << "CREATE TABLE if not exists " << life_cycle_table_name_ << "(" << "`id` int(11) unsigned NOT NULL AUTO_INCREMENT," - << "`ip` varchar(20) NOT NULL DEFAULT '0' COMMENT '执行清理操作的机器ip'," + << "`ip` varchar(20) NOT NULL DEFAULT '0' COMMENT 'IP address of the machine performing cleanup operations'," << "`uniq_table_name` varchar(40) DEFAULT NULL UNIQUE ," - << "`last_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上次删除的记录对应的id'," - << "`last_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '上次删除的记录对应的更新时间'," + << "`last_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'ID corresponding to the last deleted record'," + << "`last_update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Update time corresponding to the last deleted record'," << "PRIMARY KEY (`id`)" << ") ENGINE=InnoDB DEFAULT CHARSET=utf8"; int ret = full_db_conn_->do_query(cold_db_name_.c_str(), ss_sql.str().c_str()); @@ -407,9 +407,9 @@ std::set DataManager::splitStr(const std::string& src, const std::s } last_position = index + separate_characterLen; } - string last_string = src.substr(last_position);//截取最后一个分隔符后的内容 + string last_string = src.substr(last_position);//Extract content after the last separator if (!last_string.empty() && last_string != " ") - strs.insert(last_string);//如果最后一个分隔符后还有内容就入队 + strs.insert(last_string);//If there's content after the last separator, add to queue return strs; } @@ -426,8 +426,8 @@ std::vector DataManager::splitVecStr(const std::string& src, const } last_position = index + separate_characterLen; } - string last_string = src.substr(last_position);//截取最后一个分隔符后的内容 + string last_string = src.substr(last_position);//Extract content after the last separator if (!last_string.empty() && last_string != " ") - strs.push_back(last_string);//如果最后一个分隔符后还有内容就入队 + strs.push_back(last_string);//If there's content after the last separator, add to queue return strs; } diff --git a/src/libs/common/daemon/daemon.cc b/src/libs/common/daemon/daemon.cc index a6dc6ff5..338d5276 100644 --- a/src/libs/common/daemon/daemon.cc +++ b/src/libs/common/daemon/daemon.cc @@ -51,12 +51,12 @@ char d_table_file[256] = TABLE_CONF_NAME; pthread_t mainthreadid; bool flatMode; -//打印版本信息 +//Print version information void show_version_detail() { printf("%s version: %s\n", stat_project_name, version_detail); } -//打印编译信息 +//Print compilation information void show_comp_date() { printf("%s compile date: %s %s\n", stat_project_name, compdatestr, @@ -71,7 +71,7 @@ void show_usage() stat_usage_argv); } -//获取初始信息(输入参数、编译信息等) +//Get initial information (input parameters, compilation info, etc.) int load_entry_parameter(int argc, char **argv) { int c; @@ -140,7 +140,7 @@ static void sigterm_handler(int signo) { stop = 1; } -//信号量初始化,设置后台运行进程 +//Signal initialization, set background running process int init_daemon() { struct sigaction sa; @@ -156,9 +156,9 @@ int init_daemon() signal(SIGPIPE, SIG_IGN); signal(SIGCHLD, SIG_IGN); /******************************** - * sigemptyset:清空信号集 - * sigaddset:将信号加入信号集 - * sigprocmask:查询或设置信号屏蔽字 + * sigemptyset: clear signal set + * sigaddset: add signal to signal set + * sigprocmask: query or set signal mask *********************************/ sigemptyset(&sset); sigaddset(&sset, SIGTERM); @@ -227,7 +227,7 @@ int daemon_set_fd_limit(int maxfd) return 0; } -//core(coredump)文件初始化 +//core(coredump) file initialization int init_core_dump(void) { struct rlimit rlim; @@ -235,9 +235,9 @@ int init_core_dump(void) /* allow core dump 100M */ rlim.rlim_cur = 100UL << 30; rlim.rlim_max = 100UL << 30; - //设置core文件的最大字节数 + //Set maximum bytes for core file if (setrlimit(RLIMIT_CORE, &rlim) == -1) { - //如果设置失败,将软限制设置为硬限制,并重新设置 + //If setting fails, set soft limit to hard limit and reset if (getrlimit(RLIMIT_CORE, &rlim) == 0) { rlim.rlim_cur = rlim.rlim_max; setrlimit(RLIMIT_CORE, &rlim); diff --git a/src/libs/common/packet/packet_server.cc b/src/libs/common/packet/packet_server.cc index 785e83be..619a564b 100644 --- a/src/libs/common/packet/packet_server.cc +++ b/src/libs/common/packet/packet_server.cc @@ -487,7 +487,7 @@ int Packet::encode_forward_request(DTCJobOperation &job) int Packet::encode_result(DtcJob &job, int mtu, uint32_t ts) { const DTCTableDefinition *tdef = job.table_definition(); - // rp指向返回数据集 + // rp points to return dataset ResultPacket *rp = job.result_code() >= 0 ? job.get_result_packet() : NULL; BufferChain *rb = NULL; @@ -499,7 +499,7 @@ int Packet::encode_result(DtcJob &job, int mtu, uint32_t ts) /* rp may exist but no result */ if (rp && (rp->numRows || rp->totalRows)) { - //rb指向数据结果集缓冲区起始位置 + //rb points to data result set buffer start position rb = rp->bc; if (rb) rb->Count(nrp, lrp); @@ -516,7 +516,7 @@ int Packet::encode_result(DtcJob &job, int mtu, uint32_t ts) if (job.result_code() == 0) { job.set_error(0, NULL, NULL); } - //任务出现错误的时候,可能结果集里面还有值,此时需要将结果集的buffer释放掉 + //When task encounters error, result set may still have values, need to release result set buffer else if (job.result_code() < 0) { ResultPacket *resultPacket = job.get_result_packet(); if (resultPacket) { @@ -616,7 +616,7 @@ int Packet::encode_result(DtcJob &job, int mtu, uint32_t ts) buf->totalBytes = total_len - sizeof(BufferChain); } - //发送实际数据集 + //Send actual dataset buf->nextBuffer = nrp ? rb : NULL; v = (struct iovec *)buf->data; char *p = buf->data + sizeof(struct iovec) * (nrp + 1); @@ -1445,7 +1445,7 @@ int Packet::encode_result_v2(DtcJob &job, int mtu, uint32_t ts) break; } - // rp指向返回数据集 + // rp points to return dataset ResultPacket *rp = job.result_code() >= 0 ? job.get_result_packet() : NULL; log4cplus_info("result code:%d" , job.result_code()); @@ -1458,7 +1458,7 @@ int Packet::encode_result_v2(DtcJob &job, int mtu, uint32_t ts) /* rp may exist but no result */ if (rp && (rp->numRows || rp->totalRows)) { - //rb指向数据结果集缓冲区起始位置 + //rb points to data result set buffer start position log4cplus_info("result set, line:%d" ,__LINE__); b_result_set = true; rb = rp->bc; @@ -1480,7 +1480,7 @@ int Packet::encode_result_v2(DtcJob &job, int mtu, uint32_t ts) if (job.result_code() == 0) { job.set_error(0, NULL, NULL); } - //任务出现错误的时候,可能结果集里面还有值,此时需要将结果集的buffer释放掉 + //When task encounters error, result set may still have values, need to release result set buffer else if (job.result_code() < 0) { ResultPacket *resultPacket = job.get_result_packet(); if (resultPacket) { @@ -1499,7 +1499,7 @@ int Packet::encode_result_v2(DtcJob &job, int mtu, uint32_t ts) if (job.result_key() == NULL && job.request_key() != NULL) job.set_result_key(*job.request_key()); - //转换内容包 + //Convert content packet int err = job.decode_result_set(rb->data + off, lrp); if (err) { log4cplus_debug("decode result null: %d", err); @@ -1544,7 +1544,7 @@ int Packet::encode_result_v2(DtcJob &job, int mtu, uint32_t ts) buf->totalBytes = first_packet_len - sizeof(BufferChain); buf->nextBuffer = NULL; } - //设置要发送的第一个包 + //Set the first packet to send char *p = buf->data + sizeof(struct iovec) * (nrp + 1); v = (struct iovec *)buf->data; v->iov_base = p; @@ -1552,7 +1552,7 @@ int Packet::encode_result_v2(DtcJob &job, int mtu, uint32_t ts) nv = nrp + 1; buf->usedBytes = sizeof(struct iovec) * (nrp + 1) + sizeof(dtc_header); - //修改第一个包的内容 + //Modify the content of the first packet memcpy(p, &dtc_header, sizeof(dtc_header)); p += sizeof(dtc_header); if (p - (char *)v->iov_base != sizeof(dtc_header)) @@ -1592,7 +1592,7 @@ int Packet::encode_result_mysql(DtcJob &job, int mtu, uint32_t ts) log4cplus_debug("encode_result_mysql entry."); const DTCTableDefinition *tdef = job.table_definition(); - // rp指向返回数据集 + // rp points to return dataset ResultPacket *rp = job.result_code() >= 0 ? job.get_result_packet() : NULL; log4cplus_info("result code:%d" , job.result_code()); @@ -1606,7 +1606,7 @@ int Packet::encode_result_mysql(DtcJob &job, int mtu, uint32_t ts) /* rp may exist but no result */ if (rp && (rp->numRows || rp->totalRows)) { - //rb指向数据结果集缓冲区起始位置 + //rb points to data result set buffer start position log4cplus_info("result set, line:%d" ,__LINE__); b_result_set = true; rb = rp->bc; @@ -1628,7 +1628,7 @@ int Packet::encode_result_mysql(DtcJob &job, int mtu, uint32_t ts) if (job.result_code() == 0) { job.set_error(0, NULL, NULL); } - //任务出现错误的时候,可能结果集里面还有值,此时需要将结果集的buffer释放掉 + //When task encounters error, result set may still have values, need to release result set buffer else if (job.result_code() < 0) { ResultPacket *resultPacket = job.get_result_packet(); if (resultPacket) { @@ -1648,7 +1648,7 @@ int Packet::encode_result_mysql(DtcJob &job, int mtu, uint32_t ts) if (job.result_key() == NULL && job.request_key() != NULL) job.set_result_key(*job.request_key()); - //转换内容包 + //Convert content packet int err = job.decode_result_set(rb->data + off, lrp); if (err) { log4cplus_debug("decode result null: %d", err); @@ -1685,7 +1685,7 @@ int Packet::encode_result_mysql(DtcJob &job, int mtu, uint32_t ts) buf->totalBytes = first_packet_len - sizeof(BufferChain); buf->nextBuffer = NULL; } - //设置要发送的第一个包 + //Set the first packet to send v = (struct iovec *)buf->data; nv = nrp ; buf->usedBytes = sizeof(struct iovec) * (nrp); diff --git a/src/libs/common/plugin/plugin_global.h b/src/libs/common/plugin/plugin_global.h index 9ac838ab..cb339536 100644 --- a/src/libs/common/plugin/plugin_global.h +++ b/src/libs/common/plugin/plugin_global.h @@ -60,17 +60,17 @@ enum { PLUGIN_RECV_ONLY = 1, typedef struct skinfo_struct { int sockfd; //fd - int type; //类型 - int64_t recvtm; //接收时间 - int64_t sendtm; //发送时间 + int type; //type + int64_t recvtm; //receive time + int64_t sendtm; //send time - time_t tasktm; //任务开始时间 + time_t tasktm; //task start time - u_int local_ip; //本地ip - u_short local_port; //本地port - u_int remote_ip; //对端ip - u_short remote_port; //对端port - uint64_t flags; //预留标志位,以bit操作,0x01:不发送回包,0x00:需要发送回包 + u_int local_ip; //local ip + u_short local_port; //local port + u_int remote_ip; //remote ip + u_short remote_port; //remote port + uint64_t flags; //reserved flag bits, bit operations, 0x01:no response packet, 0x00:need response packet } skinfo_t; typedef int (*handle_init_t)(int, char **, int); diff --git a/src/libs/common/plugin/plugin_request.h b/src/libs/common/plugin/plugin_request.h index b3c5032c..b4c1b12c 100644 --- a/src/libs/common/plugin/plugin_request.h +++ b/src/libs/common/plugin/plugin_request.h @@ -123,10 +123,10 @@ class PluginRequest { skinfo_t _skinfo; protected: - /* 预留标志,按照bit操作 */ - /* 0: handle_process 执行失败 */ - /* 1: handle_process 执行成功 */ - /* 2: 粘包请求 */ + /* Reserved flags, bit operations */ + /* 0: handle_process execution failed */ + /* 1: handle_process execution success */ + /* 2: sticky packet request */ uint64_t _flags; }; diff --git a/src/libs/common/plugin/plugin_sync.cc b/src/libs/common/plugin/plugin_sync.cc index 84024068..1c1756d2 100644 --- a/src/libs/common/plugin/plugin_sync.cc +++ b/src/libs/common/plugin/plugin_sync.cc @@ -139,7 +139,7 @@ int PluginSync::recv_request() break; case NET_RECVING: - //如果收到部分包,则需要加入idle list, 防止该连接挂死 + //If partial packet received, need to add to idle list to prevent connection hang attach_timer(owner->idle_list()); _plugin_stage = PLUGIN_RECV; break; @@ -219,7 +219,7 @@ int PluginSync::Response(void) _plugin_stage = PLUGIN_IDLE; } - //防止多一次output事件触发 + //Prevent one extra output event trigger disable_output(); enable_input(); attach_timer(owner->idle_list()); diff --git a/src/libs/common/plugin/plugin_unit.cc b/src/libs/common/plugin/plugin_unit.cc index ab2d8688..efcab6f6 100644 --- a/src/libs/common/plugin/plugin_unit.cc +++ b/src/libs/common/plugin/plugin_unit.cc @@ -49,7 +49,7 @@ int PluginDecoderUnit::process_stream(int newfd, int req, void *peer, return -1; } - /* accept唤醒后立即recv */ + /* recv immediately after accept wakeup */ plugin_client->input_notify(); return 0; diff --git a/src/libs/common/proc_title.c b/src/libs/common/proc_title.c index ed40c09e..9eaeed3e 100644 --- a/src/libs/common/proc_title.c +++ b/src/libs/common/proc_title.c @@ -32,15 +32,15 @@ static char *arg_end; static char *env_start; extern char **environ; -//初始化进程名 +//Initialize process title void init_proc_title(int argc, char **argv) { int i; - arg_start = argv[0]; //程序地址 + arg_start = argv[0]; //program address arg_end = argv[argc - 1] + strlen(argv[argc - 1]) + 1; env_start = environ[0]; for (i = 0; i < argc; ++i) - argv[i] = STRDUP(argv[i]); //使可以操作argv空间 + argv[i] = STRDUP(argv[i]); //enable manipulation of argv space } void set_proc_title(const char *title) diff --git a/src/libs/common/request/request_threading.h b/src/libs/common/request/request_threading.h index 36d082fb..e2ecb733 100644 --- a/src/libs/common/request/request_threading.h +++ b/src/libs/common/request/request_threading.h @@ -112,7 +112,7 @@ template class ThreadingOutputDispatcher { if (Stopping()) return -1; - /* freelist被别的线程在lock锁住的时候被别的线程置成了NULL */ + /* freelist was set to NULL by other threads when locked by other threads */ Lock(); if (free_list) { q = free_list; diff --git a/src/libs/common/socket/socket_bind.cc b/src/libs/common/socket/socket_bind.cc index 0ba3ad6f..e58fcd32 100644 --- a/src/libs/common/socket/socket_bind.cc +++ b/src/libs/common/socket/socket_bind.cc @@ -35,7 +35,7 @@ int socket_bind(const SocketAddress *addr, int backlog, int rbufsz, int wbufsz, setsockopt(netfd, SOL_TCP, TCP_NODELAY, &optval, sizeof(optval)); - /* 避免没有请求的空连接唤醒epoll浪费cpu资源 */ + /* Avoid empty connections without requests waking up epoll and wasting CPU resources */ if (defer_accept) { optval = 60; setsockopt(netfd, SOL_TCP, TCP_DEFER_ACCEPT, &optval, diff --git a/src/libs/common/table/table_def.cc b/src/libs/common/table/table_def.cc index 24321a9a..cbfc4eb8 100644 --- a/src/libs/common/table/table_def.cc +++ b/src/libs/common/table/table_def.cc @@ -305,15 +305,15 @@ int DTCTableDefinition::set_key_fields(int n) fieldList[i].offset = maxSize; switch (field_type(i)) { case DField::Signed: - case DField::Unsigned: //整数 - case DField::Float: //浮点数 + case DField::Unsigned: //integer + case DField::Float: //float maxSize += field_size(i); break; - case DField::String: //以null结尾的字符串 - case DField::Binary: //二进制数据 + case DField::String: //null-terminated string + case DField::Binary: //binary data default: nvar++; - maxSize = 1 + field_size(i); // 1字节用于存储 字符串长度 + maxSize = 1 + field_size(i); // 1 byte used to store string length break; } if (keysAsUniqField) { @@ -329,7 +329,7 @@ int DTCTableDefinition::set_key_fields(int n) if (nvar == 0) { // not string , binary if (maxKeySize >= 256) return -1; - keyFormat = maxSize; // key 总大小 + keyFormat = maxSize; // total key size maxKeySize = maxSize; } else { // key has string , binary type field if (maxKeySize >= 256 + 1) diff --git a/src/libs/common/table/table_def.h b/src/libs/common/table/table_def.h index 813e7cb4..f34b75c2 100644 --- a/src/libs/common/table/table_def.h +++ b/src/libs/common/table/table_def.h @@ -44,7 +44,7 @@ struct FieldDefinition { uint8_t offset; fieldflag_t flags; - int boffset; //field的bits起始偏移 + int boffset; //field's bits start offset int bsize; //bits uint16_t next; }; @@ -91,8 +91,8 @@ class TableAttribute : public SimpleSection { set_tag(3, n); } - //压缩字段用来表示设置compressflag的字段id,传给client端使用。 - //该标识占用tag1的高八位,共计一个字节 + //Compression field is used to represent the field id with compressflag set, passed to client for use. + //This identifier occupies the high 8 bits of tag1, totaling one byte int compress_field_id(void) const { return get_tag(1) ? (((get_tag(1)->u64) >> 56) & 0xFF) : -1; @@ -296,11 +296,11 @@ class DTCTableDefinition { const int row_size(void) const { return (m_row_size + 7) / 8; - }; //返回rowsize 单位bytes + }; //return rowsize in bytes const int b_row_size(void) const { return m_row_size; - }; //返回rowsize 单位bits + }; //return rowsize in bits void set_row_size(int size) { m_row_size = size; diff --git a/src/libs/common/task/task_base.cc b/src/libs/common/task/task_base.cc index 947c6b39..2939d70f 100644 --- a/src/libs/common/task/task_base.cc +++ b/src/libs/common/task/task_base.cc @@ -995,7 +995,7 @@ void DtcJob::decode_request_v1(DTC_HEADER_V1 &header, char *p) if (header.cmd == DRequest::TYPE_SYSTEM_COMMAND) { set_table_definition( - hotbackupTableDef); // 管理命令,换成管理表定义 + hotbackupTableDef); // Management command, switch to management table definition log4cplus_debug("hb table ptr: %p, name: %s", hotbackupTableDef, hotbackupTableDef->table_name()); diff --git a/src/libs/common/task/task_const.cc b/src/libs/common/task/task_const.cc index 29ff9a82..febf7112 100644 --- a/src/libs/common/task/task_const.cc +++ b/src/libs/common/task/task_const.cc @@ -65,7 +65,7 @@ const uint16_t DtcJob::cmd2type[] = { TaskTypeWrite, // REPLACE TaskTypeWrite, // Flush TaskTypeWrite, // Invalidate - TaskTypeAdmin, // Monitor,此条是为了占位 + TaskTypeAdmin, // Monitor, this entry is for placeholder TaskTypeHelperReloadConfig, //Reload }; diff --git a/src/libs/common/task/task_copy.cc b/src/libs/common/task/task_copy.cc index 522e578a..1f2f16aa 100644 --- a/src/libs/common/task/task_copy.cc +++ b/src/libs/common/task/task_copy.cc @@ -98,9 +98,9 @@ int DtcJob::Copy(const DtcJob &rq, const DTCValue *newkey) stage = DecodeStageDone; role = TaskRoleServer; versionInfo.Copy(rq.versionInfo); - //如果是批量请求,拷贝批量task的versioninfo之后记得强制set一下keytype - //因为有些老的api发过来的请求没有设置全局的keytype - //这样批量的时候可能会在heper端出现-2024错误 + //If it's a batch request, remember to force set keytype after copying batch task's versioninfo + //Because some old API requests don't set the global keytype + //This may cause -2024 errors at helper side during batch processing if (((DTCJobOperation *)&rq)->is_batch_request()) { if (table_definition()) versionInfo.set_key_type( diff --git a/src/libs/common/task/task_request.cc b/src/libs/common/task/task_request.cc index bd78a8f5..38ac25b7 100644 --- a/src/libs/common/task/task_request.cc +++ b/src/libs/common/task/task_request.cc @@ -380,7 +380,7 @@ int DTCJobOperation::prepare_process(void) } } else if (request_code() == DRequest::TYPE_SYSTEM_COMMAND) { // admin requests - // Migrate命令需要在barrier里排队,所以需要校验是否有key以及计算hash + // Migrate commands need to queue in barrier, so need to validate key existence and calculate hash if (DRequest::SystemCommand::Migrate == requestInfo.admin_code()) { const DTCFieldValue *condition = request_condition(); diff --git a/src/libs/common/task/task_request.h b/src/libs/common/task/task_request.h index 308f2935..44bb2212 100644 --- a/src/libs/common/task/task_request.h +++ b/src/libs/common/task/task_request.h @@ -204,7 +204,7 @@ class DTCJobOperation : public DtcJob, * expire_time * * */ - /* 加入黑名单的大小 */ + /* Size when added to blacklist */ unsigned blacklist_size; uint32_t timestamp; diff --git a/src/libs/common/task/task_server.cc b/src/libs/common/task/task_server.cc index 2907f8ec..835c40d6 100644 --- a/src/libs/common/task/task_server.cc +++ b/src/libs/common/task/task_server.cc @@ -88,7 +88,7 @@ int DtcJob::pass_all_result(ResultSet *rs) int DtcJob::merge_result(const DtcJob &job) { - /*首先根据子包击中情况统计父包的名种情况*/ + /* First, count various situations of parent packets based on sub-packet hit status */ uint32_t uChildTaskHitFlag = job.resultInfo.hit_flag(); if (HIT_SUCCESS == uChildTaskHitFlag) { resultInfo.incr_tech_hit_num(); diff --git a/src/libs/common/thread/thread_cpu_stat.cc b/src/libs/common/thread/thread_cpu_stat.cc index f5d93951..0249fc2b 100644 --- a/src/libs/common/thread/thread_cpu_stat.cc +++ b/src/libs/common/thread/thread_cpu_stat.cc @@ -41,10 +41,10 @@ int thread_cpu_stat::init() return 0; } -//function: 建立cpu统计结构体,添加初始化一些基本项 -//input: 无 -//ouput: return -1: 初始化失败 -// return 0:初始化成功 +//function: Create CPU statistics structure and initialize basic items +//input: None +//output: return -1: initialization failed +// return 0: initialization successful int thread_cpu_stat::add_cpu_stat_object(const char *thread_name, int stat_idx) { Thread *thread = Thread::FindThreadByName(thread_name); @@ -64,10 +64,10 @@ int thread_cpu_stat::add_cpu_stat_object(const char *thread_name, int stat_idx) return new_cpu_stat->init(thread_name, stat_idx, thread->Pid()); } -//function: 初始化一些基本项 -//input: 无 -//ouput: return -1: 初始化失败 -// return 0:初始化成功 +//function: Initialize basic items +//input: None +//output: return -1: initialization failed +// return 0: initialization successful int one_thread_cpu_stat::init(const char *thread_name, int stat_idx, int pid) { _pid = pid; diff --git a/src/libs/common/timer/timer_list.cc b/src/libs/common/timer/timer_list.cc index 9f01ad84..3576e879 100644 --- a/src/libs/common/timer/timer_list.cc +++ b/src/libs/common/timer/timer_list.cc @@ -78,7 +78,7 @@ void TimerUnit::update_now_time(int max_wait, int interrupted) { int64_t adjustTime = 0; int64_t deadLineTime = 0; - const int MAX_DELAY_MS = 1000000; /*前向拨动最多量*/ + const int MAX_DELAY_MS = 1000000; /*Maximum forward time adjustment*/ m_SystemTime = GET_TIMESTAMP(); if (unlikely(max_wait < 0)) { @@ -88,7 +88,7 @@ void TimerUnit::update_now_time(int max_wait, int interrupted) } adjustTime = m_SystemTime + m_TimeOffSet; - /*时间被向后拨动了*/ + /*Time has been adjusted backward*/ if (adjustTime < m_NowTime) { adjustTime = interrupted ? (m_NowTime) : @@ -105,7 +105,7 @@ void TimerUnit::update_now_time(int max_wait, int interrupted) m_NowTime = adjustTime; return; } - /*时间被向前拨动了*/ + /*Time has been adjusted forward*/ else { adjustTime = interrupted ? (m_NowTime) : diff --git a/src/libs/common/timer/timer_list.h b/src/libs/common/timer/timer_list.h index 43c9f4a5..6efbe143 100644 --- a/src/libs/common/timer/timer_list.h +++ b/src/libs/common/timer/timer_list.h @@ -52,9 +52,9 @@ class TimerUnit { TimerList pending; TimerList *next; - int64_t m_SystemTime; /*系统时间*/ - int64_t m_NowTime; /*应用层时间*/ - int64_t m_TimeOffSet; /*时间拨动后的修正量*/ + int64_t m_SystemTime; /*System time*/ + int64_t m_NowTime; /*Application layer time*/ + int64_t m_TimeOffSet; /*Time offset correction after time adjustment*/ public: friend class TimerObject; diff --git a/src/libs/dep/dtcint.h b/src/libs/dep/dtcint.h index af6496ff..1e29f7ec 100644 --- a/src/libs/dep/dtcint.h +++ b/src/libs/dep/dtcint.h @@ -40,7 +40,7 @@ enum E_REPORT_TYPE RT_MAX }; -/* tp99 统计区间,单位us */ +/* tp99 statistical interval, unit us */ static const uint32_t kpi_sample_count[] = { 200, 500, 1000, @@ -131,13 +131,13 @@ class NCServer: public NCBase uint64_t agent_time_; /* add by neolv to QOS */ - /* 原有的不变增加三个参数用于做QOS */ + /* Keep original unchanged, add three parameters for QOS */ uint64_t error_count_; - /* 用于统计请求总数, 请求总数只对一个周期有效 */ + /* Used to count total requests, total requests are only valid for one cycle */ uint64_t total_count_; - /* 用于统计请求总耗时, 请求总数只对一个周期有效 */ + /* Used to count total request time, total count is only valid for one cycle */ uint64_t total_elaps_; - /* 被摘次数 */ + /* Number of times removed */ int remove_count_; public: NCServer(); @@ -451,15 +451,15 @@ class NCResultInternal: public NCResultLocal, public DTCJobOperation }; -/* 模调上报 */ +/* Module reporting */ class DataConnector { private: struct businessStatistics { - /* 10s内请求总耗时 */ + /* Total request time within 10s */ uint64_t TotalTime; - /* 10s内请求总次数 */ + /* Total request count within 10s */ uint32_t TotalRequests; public: businessStatistics(){ TotalTime = 0; TotalRequests = 0; } @@ -480,17 +480,17 @@ class DataConnector uint32_t uiBid; uint32_t uiAgentIP; uint16_t uiAgentPort; - /* 10s内请求总次数 */ + /* Total request count within 10s */ uint32_t uiTotalRequests; - /* 10s内请求总耗时 */ + /* Total request time within 10s */ uint64_t uiTotalTime; - /* 10s内错误次数 */ + /* Error count within 10s */ uint32_t uiFailCount; - /* 10s内的最大执行时间 */ + /* Maximum execution time within 10s */ uint64_t uiMaxTime; - /* 10s内的最小执行时间 */ + /* Minimum execution time within 10s */ uint64_t uiMinTime; - /* 统计值 */ + /* Statistical values */ uint32_t statArr[sizeof(kpi_sample_count) / sizeof(kpi_sample_count[0])]; public: @@ -536,10 +536,10 @@ class DataConnector private: std::map mapBi; - /* 读写 TotalTime、TotalRequests时,加锁,防止脏数据 */ + /* Lock when reading/writing TotalTime and TotalRequests to prevent dirty data */ Mutex lock_; std::map map_tp_stat_; - /* 读写 tp99 数据时,加锁,防止脏数据 */ + /* Lock when reading/writing tp99 data to prevent dirty data */ Mutex m_tp_lock; static DataConnector *pDataConnector; pthread_t thread_id_; @@ -572,15 +572,15 @@ class DataConnector class CTopPercentileSection { private: - /* 执行时间小于1000us的 */ + /* Execution time less than 1000us */ static int16_t get_little_thousand(uint64_t elapse); - /* 执行时间大于等于1000us 小于 10000us的 */ + /* Execution time greater than or equal to 1000us and less than 10000us */ static int16_t get_between_thousand_and_tenthousand(uint64_t elapse); - /* 执行时间大于等于10000us 小于 100000us的 */ + /* Execution time greater than or equal to 10000us and less than 100000us */ static int16_t get_between_tenthousand_and_hundredthousand(uint64_t elapse); - /* 执行时间大于等于100000us 小于 1000000us的 */ + /* Execution time greater than or equal to 100000us and less than 1000000us */ static int16_t get_between_hundredthousand_and_million(uint64_t elapse); - /* 执行时间大于等于1000000us的 */ + /* Execution time greater than or equal to 1000000us */ static int16_t get_exceed_million(uint64_t elapse); public: diff --git a/src/libs/dep/key_list.cc b/src/libs/dep/key_list.cc index 811639a1..af26b18c 100644 --- a/src/libs/dep/key_list.cc +++ b/src/libs/dep/key_list.cc @@ -118,7 +118,7 @@ int NCKeyValueList::add_value(const char* name, const DTCValue &v, int type) int row = fcount[col]; if(row >= key_value_max_) - /* key值太多 */ + /* Too many key values */ return -EC_TOO_MANY_KEY_VALUE; if(row >= key_count_) { if(REALLOC(val, (key_count_+1)*kn*sizeof(DTCValue)) == NULL) diff --git a/src/libs/stat/stat_alarm_reporter.cc b/src/libs/stat/stat_alarm_reporter.cc index da42d042..8541c549 100644 --- a/src/libs/stat/stat_alarm_reporter.cc +++ b/src/libs/stat/stat_alarm_reporter.cc @@ -31,7 +31,7 @@ void StatAlarmReporter::set_time_out(int time_out) post_time_out_ = time_out; } -/* 当前运行路径的第四个位置是accesskey,access的前八个字节代表moduleid */ +/* The fourth position in the current running path is accesskey, the first eight bytes of access represent moduleid */ uint64_t StatAlarmReporter::parse_module_id(const std::string &str_current_work_path) { @@ -66,7 +66,7 @@ void StatAlarmReporter::init_module_id() ddw_module_id_ = parse_module_id(std::string(buf)); } -/* 优先尝试从/usr/local/dtc/ip读取本机的ip,如果该文件没有ip,则在使用GetLocalIp函数获取本机Ip */ +/* First try to read the local machine's IP from /usr/local/dtc/ip, if the file doesn't have IP, then use GetLocalIp function to get local machine IP */ void StatAlarmReporter::init_local_id() { std::string strIpFilePath("/usr/local/dtc/ip"); @@ -143,8 +143,8 @@ bool StatAlarmReporter::parse_alarm_cfg(uint64_t ddw_stat_id, /* * - * 看配置文件是否被修改了,如果被修改需要重新加载配置 - * 如果stat文件失败也认为需要重新加载配置 + * Check whether the configuration file has been modified, if modified need to reload configuration + * If stat file fails, also consider needing to reload configuration * */ bool StatAlarmReporter::is_alarm_cfg_file_modify( @@ -160,7 +160,7 @@ bool StatAlarmReporter::is_alarm_cfg_file_modify( return false; } - /* 配置文件被修改了,更新文件修改时间,同时打error日志(此类操作较少)记录该文件修改事件 */ + /* Configuration file has been modified, update file modification time, and also log error (such operations are rare) to record this file modification event */ log4cplus_error( "alarm cfg file has been modified ,the last modify time is %lu, this modify time is %lu", modify_time_, st.st_mtime); @@ -170,23 +170,23 @@ bool StatAlarmReporter::is_alarm_cfg_file_modify( /* * - * 告警的配置项分为如下三种: - * 1、上报的url(结束处不加?号) + * Alarm configuration items are divided into the following three types: + * 1. Reporting url (no ? at the end) * url=http://192.168.214.62/api/dtc_sms_alarm_sender.php - * 2、短信通知的手机号码,中间以英文分号分开(结束处加分号) + * 2. Mobile phone numbers for SMS notification, separated by English semicolons (semicolon at the end) * cellphone=1283930303;1020123123;1212312312; - * 3、配置的告警项(结束处不加分号) + * 3. Configured alarm items (no semicolon at the end) * statItemId=thresholdValue;cat;alarmContent - * 其中cat分为10s 、job_operation、10m、all,如下以inc0的cpu占用率为例, + * Where cat is divided into 10s, job_operation, 10m, all. For example, using inc0's CPU usage rate: * 20000=8000;10s;inc0 thread cpu overload(80%) - * 这个配置项的含义就是接入线程cpu使用率的统计值(从10s文件中取值)大小超过了80%,发短信通知cpu超载 - * 所有配置的设置都采用小写英文 + * The meaning of this configuration item is that when the statistical value of access thread CPU usage rate (taken from 10s file) exceeds 80%, send SMS notification of CPU overload + * All configuration settings use lowercase English * */ bool StatAlarmReporter::init_alarm_cfg( const std::string &str_alarm_conf_file_path, bool is_dtc_server) { - /* 如果配置文件没有被修改过,就不再加载配置文件 */ + /* If the configuration file has not been modified, do not reload the configuration file */ if (!is_alarm_cfg_file_modify(str_alarm_conf_file_path)) { return true; } diff --git a/src/libs/stat/stat_alarm_reporter.h b/src/libs/stat/stat_alarm_reporter.h index 5eae8592..6201f848 100644 --- a/src/libs/stat/stat_alarm_reporter.h +++ b/src/libs/stat/stat_alarm_reporter.h @@ -22,15 +22,15 @@ #include "algorithm/singleton.h" typedef struct AlarmCfg { - // 统计项对应的统计项id + // Statistical item corresponding to statistical item id uint64_t ddw_stat_item_id; - // 统计项对应的告警阈值 + // Alarm threshold corresponding to statistical item uint64_t ddw_threshold_value; - // 统计项告警时依据的数据,分别为cur,10s、10m、all,默认为10s + // Data basis for statistical item alarm, respectively cur, 10s, 10m, all, default is 10s unsigned char cat; - // 告警项在统计文件中的位置 + // Position of alarm item in statistical file StatClient::Iterator_ info; - // 告警内容字符串 + // Alarm content string std::string str_alarm_content; } AlarmConf; typedef std::vector AlarmCfgInfo; @@ -48,16 +48,16 @@ class StatAlarmReporter { ~StatAlarmReporter() { } - // 统计进程上报告警接口,通过配置文件的阈值和告警内容上报 + // Statistical process alarm reporting interface, report through threshold and alarm content in configuration file void report_alarm(); - // 其他进程上报告警的接口,直接上报告警内容 + // Interface for other processes to report alarms, directly report alarm content void report_alarm(const std::string &str_alarm_content); bool set_stat_client(StatClient *stat_client); void set_time_out(int time_out); /* - * 初始化配置的时候需要考虑两种场景: - * 1、dtcserver,只需要url和cellphonenum,对于dtcserver来说是直接触发告警的 - * 2、stattool,即需要url和cellphonenum,又需要各个统计项的阈值 告警内容等 + * When initializing configuration, two scenarios need to be considered: + * 1. dtcserver, only needs url and cellphonenum, for dtcserver it directly triggers alarms + * 2. stattool, needs both url and cellphonenum, and also needs thresholds and alarm content of various statistical items * */ bool init_alarm_cfg(const std::string &str_alarm_conf_file_path, @@ -77,7 +77,7 @@ class StatAlarmReporter { private: std::string str_report_url_; AlarmCfgInfo alarm_Cfg_; - uint64_t ddw_module_id_; /*本业务对应的ModuleId*/ + uint64_t ddw_module_id_; /*ModuleId corresponding to this service*/ StatClient *stat_client_; std::string cell_phone_list_; std::string dtc_ip_; diff --git a/src/libs/stat/stat_dtc.cc b/src/libs/stat/stat_dtc.cc index bbc7cdc8..add3ba03 100644 --- a/src/libs/stat/stat_dtc.cc +++ b/src/libs/stat/stat_dtc.cc @@ -21,7 +21,7 @@ #include "log/log.h" StatThread g_stat_mgr; -//初始化内存映射 +//Initialize memory mapping int init_statistics(void) { int ret; From e0638d06d989c608af99c6fcd9e1a07697fe4f07 Mon Sep 17 00:00:00 2001 From: kfysck Date: Fri, 5 Sep 2025 02:33:58 +0000 Subject: [PATCH 07/10] feat: Translate Chinese comments to English in raw_data_process.cc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Systematically translated all Chinese comments to English while maintaining technical accuracy: - Database operation comments (insert, delete, update, replace) - Cache management and memory operations - Row processing and data copying operations - Error handling and blacklist marking - Query condition checking and matching - Access time and operation count updates All translations preserve the original technical meaning and context. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/core/raw/raw_data_process.cc | 74 ++++++++++++++++---------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/core/raw/raw_data_process.cc b/src/core/raw/raw_data_process.cc index 40f6eb52..bba25415 100644 --- a/src/core/raw/raw_data_process.cc +++ b/src/core/raw/raw_data_process.cc @@ -393,7 +393,7 @@ int RawDataProcess::do_delete(DTCJobOperation &job_op, Node *p_node, if (stpNodeTab != stpTaskTab) { stpTaskRow->Copy(stpNodeRow); } - if (job_op.compare_row(*stpTaskRow) != 0) { //符合del条件 + if (job_op.compare_row(*stpTaskRow) != 0) { // matches delete condition if (affected_data != NULL) { // copy row iRet = affected_data->copy_row(); if (iRet != 0) { @@ -462,7 +462,7 @@ int RawDataProcess::do_get(DTCJobOperation &job_op, Node *p_node) } unsigned int uiTotalRows = raw_data_.total_rows(); - job_op.prepare_result(); //准备返回结果对象 + job_op.prepare_result(); // prepare result object if (job_op.all_rows() && (job_op.count_only() || !job_op.in_range((int)uiTotalRows, 0))) { if (job_op.is_batch_request()) { @@ -484,7 +484,7 @@ int RawDataProcess::do_get(DTCJobOperation &job_op, Node *p_node) stpTaskRow = &stTaskRow; } unsigned char uchRowFlags; - for (unsigned int i = 0; i < uiTotalRows; i++) //逐行拷贝数据 + for (unsigned int i = 0; i < uiTotalRows; i++) // copy data row by row { job_op.update_key( *stpNodeRow); // use stpNodeRow is fine, as just modify key field @@ -500,12 +500,12 @@ int RawDataProcess::do_get(DTCJobOperation &job_op, Node *p_node) stpTaskRow->Copy(stpNodeRow); } if (job_op.compare_row(*stpTaskRow) == - 0) //如果不符合查询条件 + 0) // if query condition is not matched continue; if (stpTaskTab->expire_time_field_id() > 0) stpTaskRow->update_expire_time(); - //当前行添加到task中 + // add current row to task log4cplus_debug("append_row flag"); if (job_op.append_row(stpTaskRow) > 0 && laid > 0) { raw_data_.update_lastacc(job_op.Timestamp()); @@ -516,7 +516,7 @@ int RawDataProcess::do_get(DTCJobOperation &job_op, Node *p_node) } } } - /*更新访问时间和查找操作计数*/ + /* update access time and select operation count */ raw_data_.update_last_access_time_by_hour(); raw_data_.inc_select_count(); log4cplus_debug( @@ -580,11 +580,11 @@ int RawDataProcess::do_append(DTCJobOperation &job_op, Node *p_node, "duplicate key error"); return (-1062); } - RowValue stOldRow(stpNodeTab); //一行数据 + RowValue stOldRow(stpNodeTab); // one row of data if (setrows && job_op.table_definition()->key_part_of_uniq_field()) { for (unsigned int i = 0; i < uiTotalRows; - i++) { //逐行拷贝数据 + i++) { // copy data row by row unsigned char uchRowFlags; if (raw_data_.decode_row(stOldRow, uchRowFlags, 0) != 0) { @@ -637,7 +637,7 @@ int RawDataProcess::do_append(DTCJobOperation &job_op, Node *p_node, snprintf(err_message_, sizeof(err_message_), "raw-data insert row error: %.*s", (int)available_space, err_msg ? err_msg : "unknown error"); - /*标记加入黑名单*/ + /* mark for adding to blacklist */ job_op.push_black_list_size(raw_data_.need_size()); return (-2); } @@ -725,7 +725,7 @@ int RawDataProcess::do_replace_all(DTCJobOperation &job_op, Node *p_node) snprintf(err_message_, sizeof(err_message_), "raw-data init error: %.*s", (int)available_space, err_msg ? err_msg : "unknown error"); - /*标记加入黑名单*/ + /* mark for adding to blacklist */ job_op.push_black_list_size(raw_data_.need_size()); p_buffer_pond_->purge_node(job_op.packed_key(), *p_node); return (-2); @@ -759,12 +759,12 @@ int RawDataProcess::do_replace_all(DTCJobOperation &job_op, Node *p_node) stpNodeRow = pstRow; } - /* 插入当前行 */ + /* insert current row */ iRet = raw_data_.insert_row(*stpNodeRow, false, false); - /* 如果内存空间不足,尝试扩大最多两次 */ + /* if memory space is insufficient, try to expand up to two times */ if (iRet == EC_NO_MEM) { - /* 预测整个Node的数据大小 */ + /* predict the data size of the entire Node */ all_rows_size = raw_data_.need_size() - raw_data_.data_start(); all_rows_size *= pstResultSet->total_rows(); @@ -775,7 +775,7 @@ int RawDataProcess::do_replace_all(DTCJobOperation &job_op, Node *p_node) goto ERROR_PROCESS; } - /* 尝试次数 */ + /* number of retry attempts */ ++try_purge_count; if (p_buffer_pond_->try_purge_size( (size_t)all_rows_size, *p_node) == @@ -786,7 +786,7 @@ int RawDataProcess::do_replace_all(DTCJobOperation &job_op, Node *p_node) if (iRet != EC_NO_MEM) p_node->vd_handle() = raw_data_.get_handle(); - /* 当前行操作成功 */ + /* current row operation successful */ if (0 == iRet) continue; ERROR_PROCESS: @@ -796,7 +796,7 @@ int RawDataProcess::do_replace_all(DTCJobOperation &job_op, Node *p_node) err_message_, sizeof(err_message_), "raw-data insert row error: ret=%d,err=%.*s, cnt=%d", iRet, (int)available_space, err_msg ? err_msg : "unknown error", try_purge_count); - /*标记加入黑名单*/ + /* mark for adding to blacklist */ job_op.push_black_list_size(all_rows_size); p_buffer_pond_->purge_node(job_op.packed_key(), *p_node); @@ -873,14 +873,14 @@ int RawDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, stNewRow.default_value(); stpTaskRow = &stNewRow; stpNodeRow = &stNewNodeRow; - job_op.update_row(*stpTaskRow); //获取Replace的行 + job_op.update_row(*stpTaskRow); // get the Replace row if (stpNodeTab != stpTaskTab) stpNodeRow->Copy(stpTaskRow); else stpNodeRow = stpTaskRow; - RowValue stRow(stpNodeTab); //一行数据 - for (unsigned int i = 0; i < uiTotalRows; i++) { //逐行拷贝数据 + RowValue stRow(stpNodeTab); // one row of data + for (unsigned int i = 0; i < uiTotalRows; i++) { // copy data row by row if (raw_data_.decode_row(stRow, uchRowFlags, 0) != 0) { log4cplus_error("raw-data decode row error: %d,%s", iRet, raw_data_.get_err_msg()); @@ -906,11 +906,11 @@ int RawDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, ullAffectedrows = 2; iRet = raw_data_.replace_cur_row(*stpNodeRow, - async); // 加进cache + async); // add to cache } else { ullAffectedrows++; iRet = raw_data_.delete_cur_row( - *stpNodeRow); // 加进cache + *stpNodeRow); // add to cache } if (iRet == EC_NO_MEM) { if (p_buffer_pond_->try_purge_size( @@ -926,7 +926,7 @@ int RawDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, snprintf(err_message_, sizeof(err_message_), "raw-data replace row error: %d, %.*s", iRet, (int)available_space, err_msg ? err_msg : "unknown error"); - /*标记加入黑名单*/ + /* mark for adding to blacklist */ job_op.push_black_list_size(raw_data_.need_size()); return (-3); } @@ -936,9 +936,9 @@ int RawDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, dirty_rows_count_++; } - if (ullAffectedrows == 0) { // 找不到匹配的行,insert一行 + if (ullAffectedrows == 0) { // no matching rows found, insert one row iRet = raw_data_.insert_row(*stpNodeRow, false, - async); // 加进cache + async); // add to cache if (iRet == EC_NO_MEM) { if (p_buffer_pond_->try_purge_size( raw_data_.need_size(), *p_node) == 0) @@ -954,7 +954,7 @@ int RawDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, snprintf(err_message_, sizeof(err_message_), "raw-data replace row error: %d, %.*s", iRet, (int)available_space, err_msg ? err_msg : "unknown error"); - /*标记加入黑名单*/ + /* mark for adding to blacklist */ job_op.push_black_list_size(raw_data_.need_size()); return (-3); } @@ -967,7 +967,7 @@ int RawDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, if (async == true || setrows == true) { job_op.resultInfo.set_affected_rows(ullAffectedrows); } else if (ullAffectedrows != job_op.resultInfo.affected_rows()) { - //如果cache更新纪录数和helper更新的纪录数不相等 + // if the number of records updated by cache is not equal to the number updated by helper log4cplus_debug( "unequal affected rows, cache[%lld], helper[%lld]", (long long)ullAffectedrows, @@ -989,7 +989,7 @@ int RawDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, } /* - * encode到私有内存,防止replace,update引起重新rellocate导致value引用了过期指针 + * encode to private memory to prevent replace/update from causing reallocation that would make value reference an expired pointer */ int RawDataProcess::encode_to_private_area(RawData &raw, RowValue &value, unsigned char value_flag) @@ -1046,7 +1046,7 @@ int RawDataProcess::do_update(DTCJobOperation &job_op, Node *p_node, if (affected_data != NULL) affected_data->set_refrence(&raw_data_); - RowValue stRow(job_op.table_definition()); //一行数据 + RowValue stRow(job_op.table_definition()); // one row of data stpNodeTab = raw_data_.get_node_table_def(); stpTaskTab = job_op.table_definition(); @@ -1057,7 +1057,7 @@ int RawDataProcess::do_update(DTCJobOperation &job_op, Node *p_node, if (stpNodeTab == stpTaskTab) stpNodeRow = stpTaskRow; - for (unsigned int i = 0; i < uiTotalRows; i++) { //逐行拷贝数据 + for (unsigned int i = 0; i < uiTotalRows; i++) { // copy data row by row if (raw_data_.decode_row(*stpNodeRow, uchRowFlags, 0) != 0) { log4cplus_error("raw-data decode row error: %d,%s", iRet, raw_data_.get_err_msg()); @@ -1067,11 +1067,11 @@ int RawDataProcess::do_update(DTCJobOperation &job_op, Node *p_node, if (stpNodeTab != stpTaskTab) stpTaskRow->Copy(stpNodeRow); - //如果不符合查询条件 + // if query condition is not matched if (job_op.compare_row(*stpTaskRow) == 0) continue; - job_op.update_row(*stpTaskRow); //修改数据 + job_op.update_row(*stpTaskRow); // modify data ullAffectedrows++; if (stpNodeTab != stpTaskTab) @@ -1084,7 +1084,7 @@ int RawDataProcess::do_update(DTCJobOperation &job_op, Node *p_node, return (-2); } - // 在私有区间decode + // decode in private area RawData stTmpRows(&g_stSysMalloc, 1); if (encode_to_private_area(stTmpRows, *stpNodeRow, uchRowFlags)) { @@ -1094,7 +1094,7 @@ int RawDataProcess::do_update(DTCJobOperation &job_op, Node *p_node, } iRet = raw_data_.replace_cur_row(*stpNodeRow, - async); // 加进cache + async); // add to cache if (iRet == EC_NO_MEM) { if (p_buffer_pond_->try_purge_size( raw_data_.need_size(), *p_node) == 0) @@ -1109,7 +1109,7 @@ int RawDataProcess::do_update(DTCJobOperation &job_op, Node *p_node, snprintf(err_message_, sizeof(err_message_), "raw-data replace row error: %d, %.*s", iRet, (int)available_space, err_msg ? err_msg : "unknown error"); - /*标记加入黑名单*/ + /* mark for adding to blacklist */ job_op.push_black_list_size(raw_data_.need_size()); return (-6); } @@ -1123,7 +1123,7 @@ int RawDataProcess::do_update(DTCJobOperation &job_op, Node *p_node, if (async == true || setrows == true) { job_op.resultInfo.set_affected_rows(ullAffectedrows); } else if (ullAffectedrows != job_op.resultInfo.affected_rows()) { - //如果cache更新纪录数和helper更新的纪录数不相等 + // if the number of records updated by cache is not equal to the number updated by helper log4cplus_debug( "unequal affected rows, cache[%lld], helper[%lld]", (long long)ullAffectedrows, @@ -1165,12 +1165,12 @@ int RawDataProcess::do_flush(DTCFlushRequest *flush_req, Node *p_node, affected_count = 0; DTCValue astKey[p_table_->key_fields()]; TaskPackedKey::unpack_key(p_table_, raw_data_.key(), astKey); - RowValue stRow(p_table_); //一行数据 + RowValue stRow(p_table_); // one row of data for (int i = 0; i < p_table_->key_fields(); i++) stRow[i] = astKey[i]; for (unsigned int i = 0; p_node->is_dirty() && i < uiTotalRows; - i++) { //逐行拷贝数据 + i++) { // copy data row by row if (raw_data_.decode_row(stRow, uchRowFlags, 0) != 0) { log4cplus_error("raw-data decode row error: %d,%s", iRet, raw_data_.get_err_msg()); From ba058b70c8f3bb1c45e51903c71036219928b9c9 Mon Sep 17 00:00:00 2001 From: kfysck Date: Fri, 5 Sep 2025 03:22:52 +0000 Subject: [PATCH 08/10] feat: Translating. --- src/agent-watchdog/proc_title.c | 6 +- src/agent/da_core.c | 2 +- src/agent/da_listener.c | 6 +- src/agent/da_mem_pool.c | 4 +- src/configcenter/ca_api/app_shm_manager.c | 6 +- src/configcenter/ca_api/ca_quick_find.c | 2 +- src/core/chain/barrier_ask_answer_chain.cc | 2 +- src/core/chain/buffer_process_ask_chain.cc | 332 +++++++++--------- src/core/chain/system_command_ask_chain.cc | 4 +- src/core/chain/system_command_ask_chain.h | 10 +- src/core/data/data_chunk.h | 58 +-- src/core/hotbk/hb_log.cc | 4 +- src/core/hotbk/hb_log.h | 8 +- src/core/log/logger.cc | 12 +- src/core/misc/main_supply.cc | 2 +- src/core/node/empty_filter.cc | 6 +- src/core/node/node_index.cc | 4 +- src/core/node/node_set.cc | 12 +- src/core/nodegroup/ng_info.cc | 10 +- src/core/nodegroup/ng_info.h | 34 +- src/core/raw/raw_data.cc | 52 +-- src/core/raw/raw_data.h | 214 +++++------ src/core/tree/tree_data_process.cc | 16 +- src/hwcserver/async_file.cc | 34 +- src/hwcserver/comm.cc | 4 +- src/hwcserver/daemon.cc | 2 +- src/hwcserver/hwc_binlog_state.cc | 2 +- src/hwcserver/hwc_sync_unit.cc | 16 +- src/hwcserver/registor.cc | 2 +- src/hwcserver/registor.h | 12 +- src/libs/api/cc_api/include/dtcapi.h | 4 +- src/libs/common/blacklist/blacklist.cc | 2 +- src/libs/common/client/client_unit.cc | 4 +- src/libs/common/config/dbconfig.cc | 6 +- src/libs/common/config/dbconfig.h | 8 +- .../common/config/parse_cluster_config.cc | 10 +- src/libs/common/connector/connector_client.cc | 2 +- src/libs/common/connector/connector_group.cc | 10 +- src/libs/common/connector/connector_group.h | 6 +- src/libs/common/consistent_hash_selector.cc | 2 +- src/libs/common/daemon/daemon_wait.cc | 4 +- src/libs/common/data_connector_ask_chain.cc | 12 +- src/libs/common/dtcutils.h | 6 +- src/libs/common/field/field.cc | 8 +- src/libs/common/journal_id.h | 2 +- src/libs/common/listener/listener_bind.cc | 2 +- src/libs/common/multi_request.cc | 4 +- src/libs/common/poll/poll_thread_group.cc | 2 +- 48 files changed, 486 insertions(+), 486 deletions(-) diff --git a/src/agent-watchdog/proc_title.c b/src/agent-watchdog/proc_title.c index 0db7f120..40e137a1 100644 --- a/src/agent-watchdog/proc_title.c +++ b/src/agent-watchdog/proc_title.c @@ -32,15 +32,15 @@ static char *arg_end; static char *env_start; extern char **environ; -//初始化进程名 +// Initialize process name void init_proc_title(int argc, char **argv) { int i; - arg_start = argv[0]; //程序地址 + arg_start = argv[0]; // Program address arg_end = argv[argc - 1] + strlen(argv[argc - 1]) + 1; env_start = environ[0]; for (i = 0; i < argc; ++i) - argv[i] = STRDUP(argv[i]); //使可以操作argv空间 + argv[i] = STRDUP(argv[i]); // Allow manipulation of argv space } void set_proc_title(const char *title) diff --git a/src/agent/da_core.c b/src/agent/da_core.c index cb93e642..0070c43d 100644 --- a/src/agent/da_core.c +++ b/src/agent/da_core.c @@ -44,7 +44,7 @@ void cache_send_event(struct conn *conn) { } /* - * 根据可用连接及后端连接数,计算前端连接可用的连接数 + * Calculate available frontend connections based on available connections and backend connection count */ static int core_calc_connections(struct context *ctx) { int status; diff --git a/src/agent/da_listener.c b/src/agent/da_listener.c index ea4e56e0..e18cbb61 100644 --- a/src/agent/da_listener.c +++ b/src/agent/da_listener.c @@ -260,7 +260,7 @@ static int listener_accept(struct context *ctx, struct conn *l) continue; } /* - * 多进程情况下,同时accept会出现错误,errno=11,程序吞掉这个错误 + * In multi-process scenario, simultaneous accept will cause error, errno=11, program swallows this error */ if (errno == EAGAIN || errno == EWOULDBLOCK || errno == ECONNABORTED) { @@ -285,7 +285,7 @@ static int listener_accept(struct context *ctx, struct conn *l) } /* - * 对全局的FD资源进行限制,每个进程单独资源 + * Limit global FD resources, each process has separate resources */ if (get_ncurr_cconn() >= ctx->max_ncconn || get_ncurr_cconn() > @@ -322,7 +322,7 @@ static int listener_accept(struct context *ctx, struct conn *l) return status; } - /*所有的客户端连接在exec之后全部关闭*/ + /*All client connections are closed after exec*/ status = fcntl(c->fd, F_SETFD, FD_CLOEXEC); if (status < 0) { log_error("fcntl FD_CLOEXEC on c %d from p %d failed: %s", diff --git a/src/agent/da_mem_pool.c b/src/agent/da_mem_pool.c index de489fb2..dccfca44 100644 --- a/src/agent/da_mem_pool.c +++ b/src/agent/da_mem_pool.c @@ -32,7 +32,7 @@ struct pool_head *create_pool(char *name, unsigned int size, unsigned int flags) struct pool_head *start; unsigned int align; - //16字节对齐 + //16-byte alignment align = 16; size = (size + align - 1) & -align; @@ -117,7 +117,7 @@ void pool_gc() { static int recurse; struct pool_head *entry; - //预防重复调用 + //Prevent duplicate calls if (recurse++) goto out; diff --git a/src/configcenter/ca_api/app_shm_manager.c b/src/configcenter/ca_api/app_shm_manager.c index 8eb95352..f5f67375 100644 --- a/src/configcenter/ca_api/app_shm_manager.c +++ b/src/configcenter/ca_api/app_shm_manager.c @@ -29,7 +29,7 @@ char *get_shm(uint32_t key, uint32_t len, int flag, int *shm_id, bool create, // printf("Key:0x%x, Len:%d, Flag:%o\n", key, len, flag); void *shm_ptr = NULL; //(void*) -1; - //获取共享内存 + //Get shared memory (*shm_id) = shmget(key, len, flag); if ((*shm_id) < 0) { if (ENOENT != errno) { @@ -39,7 +39,7 @@ char *get_shm(uint32_t key, uint32_t len, int flag, int *shm_id, bool create, } *exist = 0; } - //不存在则创建 + //Create if doesn't exist if (!(*exist)) { if (!create) { return NULL; @@ -51,7 +51,7 @@ char *get_shm(uint32_t key, uint32_t len, int flag, int *shm_id, bool create, return NULL; } } - //绑定到共享内存 + //Bind to shared memory int access_flag = 0; if ((shm_ptr = shmat((*shm_id), NULL, access_flag)) == (void *)-1) { printf("shmat failed, ShmId:%d, errno:%d, strerror:%s\n", diff --git a/src/configcenter/ca_api/ca_quick_find.c b/src/configcenter/ca_api/ca_quick_find.c index a9642e49..cd6ca6b7 100644 --- a/src/configcenter/ca_api/ca_quick_find.c +++ b/src/configcenter/ca_api/ca_quick_find.c @@ -16,7 +16,7 @@ */ #include "ca_quick_find.h" -//二分查找 +//Binary search int binary_search_header(NODE_HEADER *headers_ptr, const int low, const int high, const int key) { diff --git a/src/core/chain/barrier_ask_answer_chain.cc b/src/core/chain/barrier_ask_answer_chain.cc index 0a6fab03..1c2c3aa7 100644 --- a/src/core/chain/barrier_ask_answer_chain.cc +++ b/src/core/chain/barrier_ask_answer_chain.cc @@ -102,7 +102,7 @@ void BarrierAskAnswerChain::job_ask_procedure(DTCJobOperation *job_operation) if (job_operation->request_code() == DRequest::TYPE_SYSTEM_COMMAND && job_operation->requestInfo.admin_code() != DRequest::SystemCommand::Migrate) { - //Migrate命令在PrepareRequest的时候已经计算了PackedKey和hash,需要跟普通的task一起排队 + //Migrate command has already calculated PackedKey and hash during PrepareRequest, needs to queue with normal tasks chain_request(job_operation); return; } diff --git a/src/core/chain/buffer_process_ask_chain.cc b/src/core/chain/buffer_process_ask_chain.cc index 3782adc1..7b82698e 100644 --- a/src/core/chain/buffer_process_ask_chain.cc +++ b/src/core/chain/buffer_process_ask_chain.cc @@ -404,14 +404,14 @@ int BufferProcessAskChain::set_buffer_size_and_version( /* * Function : cache_open - * Description : 打开cache - * Input : key_name 共享内存ipc key - * ulNodeTotal_ 数据节点总数 - * ulBucketTotal hash桶总数 - * ulChunkTotal chunk节点总数 - * ulChunkSize chunk节点大小(单位:byte) + * Description : Open cache + * Input : key_name shared memory ipc key + * ulNodeTotal_ total number of data nodes + * ulBucketTotal total number of hash buckets + * ulChunkTotal total number of chunk nodes + * ulChunkSize chunk node size (unit: byte) * Output : - * Return : 成功返回0,失败返回-1 + * Return : return 0 on success, -1 on failure */ int BufferProcessAskChain::open_init_buffer(int key_name, int enable_empty_filter, @@ -483,7 +483,7 @@ int BufferProcessAskChain::open_init_buffer(int key_name, update_mode_ == MODE_ASYNC ? "ASYNC" : update_mode_ == MODE_FLUSH ? "FLUSH" : ""); - // 空结点过滤 + // Empty node filtering const FEATURE_INFO_T *pstFeature; pstFeature = cache_.query_feature_by_id(EMPTY_FILTER); if (pstFeature != NULL) { @@ -526,7 +526,7 @@ int BufferProcessAskChain::open_init_buffer(int key_name, if (update_mode_ == MODE_SYNC) { async_log_ = 1; } - // 热备特性 + // Hot backup feature pstFeature = cache_.query_feature_by_id(HOT_BACKUP); if (pstFeature != NULL) { NEW(HBFeature, hotbackup_lru_feature_); @@ -542,7 +542,7 @@ int BufferProcessAskChain::open_init_buffer(int key_name, } if (hotbackup_lru_feature_->master_uptime() != 0) { - // 开启变更key日志 + // Enable key change logging log_hotbackup_key_switch_ = true; } } @@ -630,7 +630,7 @@ BufferResult BufferProcessAskChain::insert_default_row(DTCJobOperation &job) int iRet; log4cplus_debug("%s", "insert default start!"); if (!cache_transaction_node) { - // 发现空节点 + // Found empty node if (insert_empty_node() == false) { log4cplus_warning("alloc cache node error"); job.set_error(-EIO, CACHE_SVC, @@ -665,7 +665,7 @@ BufferResult BufferProcessAskChain::insert_default_row(DTCJobOperation &job) log4cplus_debug("replace data error: %d, %s", iRet, stDataRows.get_err_msg()); job.set_error(-ENOMEM, CACHE_SVC, "replace data error"); - // 标记加入黑名单 + // Mark to add to blacklist job.push_black_list_size(stDataRows.data_size()); cache_.purge_node_and_data(key, cache_transaction_node); return DTC_CODE_BUFFER_ERROR; @@ -682,10 +682,10 @@ BufferResult BufferProcessAskChain::insert_default_row(DTCJobOperation &job) /* * Function : buffer_get_data - * Description : 处理get请求 - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle get request + * Input : job request information + * Output : job return information + * Return : return 0 on success, -1 on failure */ BufferResult BufferProcessAskChain::buffer_get_data(DTCJobOperation &job) { @@ -704,7 +704,7 @@ BufferResult BufferProcessAskChain::buffer_get_data(DTCJobOperation &job) // FullCache Mode: treat as empty & fallthrough case DTC_CODE_NODE_EMPTY: ++stat_get_hits_; - //发现空节点,直接构建result + //Found empty node, directly build result log4cplus_debug("found Empty-Node[%u], response directed", job.int_key()); job.prepare_result(); @@ -734,7 +734,7 @@ BufferResult BufferProcessAskChain::buffer_get_data(DTCJobOperation &job) // Hot Backup if (lru_update_level_ < LRU_READ && write_lru_hotbackup_log(job.packed_key())) { - // 为避免错误扩大, 给客户端成功响应 + // To avoid error amplification, give client success response log4cplus_error("hb: log lru key failed"); } // Hot Bakcup @@ -744,10 +744,10 @@ BufferResult BufferProcessAskChain::buffer_get_data(DTCJobOperation &job) /* * Function : buffer_batch_get_data - * Description : 处理get请求 - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle get request + * Input : job request information + * Output : job return information + * Return : return 0 on success, -1 on failure */ BufferResult BufferProcessAskChain::buffer_batch_get_data(DTCJobOperation &job) { @@ -790,7 +790,7 @@ BufferResult BufferProcessAskChain::buffer_batch_get_data(DTCJobOperation &job) // Hot Backup if (lru_update_level_ < LRU_BATCH && write_lru_hotbackup_log(job.packed_key())) { - //为避免错误扩大, 给客户端成功响应 + //To avoid error amplification, give client success response log4cplus_error("hb: log lru key failed"); } break; @@ -803,10 +803,10 @@ BufferResult BufferProcessAskChain::buffer_batch_get_data(DTCJobOperation &job) /* * Function : buffer_get_rb - * Description : 处理Helper的get回读task - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle Helper's get readback task + * Input : job request information + * Output : job return information + * Return : return 0 on success, -1 on failure */ BufferResult BufferProcessAskChain::buffer_get_rb(DTCJobOperation &job) { @@ -823,7 +823,7 @@ BufferResult BufferProcessAskChain::buffer_get_rb(DTCJobOperation &job) return DTC_CODE_BUFFER_SUCCESS; } -// helper执行GET回来后,更新内存数据 +// After helper executes GET and returns, update memory data BufferResult BufferProcessAskChain::buffer_replace_result(DTCJobOperation &job) { int iRet; @@ -831,9 +831,9 @@ BufferResult BufferProcessAskChain::buffer_replace_result(DTCJobOperation &job) log4cplus_debug("cache replace all start!"); transaction_find_node(job); - // 数据库回来的记录如果是0行则 - // 1. 设置bits - // 2. 直接构造0行的result响应包 + // If database returns 0 rows then + // 1. Set bits + // 2. Directly construct 0-row result response packet if (empty_node_filter_ != NULL) { if ((job.result == NULL || job.result->total_rows() == 0)) { log4cplus_debug("SET Empty-Node[%u]", job.int_key()); @@ -875,7 +875,7 @@ BufferResult BufferProcessAskChain::buffer_replace_result(DTCJobOperation &job) // Hot Backup if (lru_update_level_ < LRU_READ && write_lru_hotbackup_log(job.packed_key())) { - // 为避免错误扩大, 给客户端成功响应 + // To avoid error amplification, give client success response log4cplus_error("hb: log lru key failed"); } // Hot Bakcup @@ -888,10 +888,10 @@ BufferResult BufferProcessAskChain::buffer_replace_result(DTCJobOperation &job) /* * Function : buffer_flush_data - * Description : 处理flush请求 - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle flush request + * Input : job request information + * Output : job return information + * Return : return 0 on success, -1 on failure */ BufferResult BufferProcessAskChain::buffer_flush_data_before_delete(DTCJobOperation &job) @@ -944,10 +944,10 @@ BufferProcessAskChain::buffer_flush_data_before_delete(DTCJobOperation &job) /* * Function : buffer_flush_data - * Description : 处理flush请求 - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle flush request + * Input : job request information + * Output : job return information + * Return : return 0 on success, -1 on failure */ BufferResult BufferProcessAskChain::buffer_flush_data(DTCJobOperation &job) { @@ -1022,10 +1022,10 @@ int BufferProcessAskChain::buffer_flush_data_timer(Node &node, } /* * Function : buffer_flush_data - * Description : 处理flush请求 - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle flush request + * Input : job request information + * Output : job return information + * Return : return 0 on success, -1 on failure * */ BufferResult @@ -1077,10 +1077,10 @@ BufferProcessAskChain::buffer_flush_data(Node &node, DTCJobOperation *pstTask, /* * Function : buffer_purge_data - * Description : 处理purge请求 - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle purge request + * Input : job request information + * Output : job return information + * Return : return 0 on success, -1 on failure * */ BufferResult BufferProcessAskChain::buffer_purge_data(DTCJobOperation &job) @@ -1122,10 +1122,10 @@ BufferResult BufferProcessAskChain::buffer_purge_data(DTCJobOperation &job) /* * Function : buffer_update_rows - * Description : 处理Helper的update job - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle Helper's update job + * Input : job request information + * Output : job return information + * Return : return 0 on success, -1 on failure * */ BufferResult BufferProcessAskChain::buffer_update_rows(DTCJobOperation &job, @@ -1173,7 +1173,7 @@ BufferResult BufferProcessAskChain::buffer_update_rows(DTCJobOperation &job, // or cache miss and m_bReplaceEmpty is set (equiv insert(default)+update) if (write_hotbackup_log(job, cache_transaction_node, DTCHotBackup::SYNC_UPDATE)) { - // 为避免错误扩大, 给客户端成功响应 + // To avoid error amplification, give client success response log4cplus_error("hb: log update key failed"); } } @@ -1198,7 +1198,7 @@ BufferResult BufferProcessAskChain::buffer_replace_rows(DTCJobOperation &job, cache_.purge_node_and_data(key, cache_transaction_node); cache_.inc_total_row(0LL - rows); } - // 如果是同步replace命令,返回成功 + // If it's synchronous replace command, return success if (async == false && !job.flag_black_hole()) return DTC_CODE_BUFFER_SUCCESS; log4cplus_error("cache replace rows error: %d,%s", iRet, @@ -1213,7 +1213,7 @@ BufferResult BufferProcessAskChain::buffer_replace_rows(DTCJobOperation &job, // Hot Backup if (write_hotbackup_log(job, cache_transaction_node, DTCHotBackup::SYNC_UPDATE)) { - // 为避免错误扩大, 给客户端成功响应 + // To avoid error amplification, give client success response log4cplus_error("hb: log update key failed"); } // Hot Bakcup @@ -1230,10 +1230,10 @@ BufferResult BufferProcessAskChain::buffer_replace_rows(DTCJobOperation &job, /* * Function : buffer_insert_row - * Description : 处理Helper的insert job - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle Helper's insert job + * Input : job request information + * Output : job return information + * Return : Returns 0 on success, -1 on failure * */ BufferResult BufferProcessAskChain::buffer_insert_row(DTCJobOperation &job, @@ -1303,7 +1303,7 @@ BufferResult BufferProcessAskChain::buffer_insert_row(DTCJobOperation &job, // Hot Backup if (write_hotbackup_log(job, cache_transaction_node, DTCHotBackup::SYNC_INSERT)) { - // 为避免错误扩大, 给客户端成功响应 + // To avoid error amplification, give client success response log4cplus_error("hb: log update key failed"); } // Hot Bakcup @@ -1313,10 +1313,10 @@ BufferResult BufferProcessAskChain::buffer_insert_row(DTCJobOperation &job, /* * Function : buffer_delete_rows - * Description : 处理del请求 - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 成功返回0,失败返回-1 + * Description : Handle del request + * Input : job request information + * Output : job return information + * Return : Returns 0 on success, -1 on failure * */ BufferResult BufferProcessAskChain::buffer_delete_rows(DTCJobOperation &job) @@ -1325,7 +1325,7 @@ BufferResult BufferProcessAskChain::buffer_delete_rows(DTCJobOperation &job) log4cplus_debug("buffer_delete_rows start! "); uint32_t oldRows = cache_.node_rows_count(cache_transaction_node); int all_row_delete = job.all_rows(); - // 如果没有del条件则删除整个节点 + // If no del condition, delete entire node if (job.all_rows() != 0) { empty: if (lossy_mode_ || job.flag_black_hole()) { @@ -1356,7 +1356,7 @@ BufferResult BufferProcessAskChain::buffer_delete_rows(DTCJobOperation &job) DTCHotBackup::SYNC_PURGE)) // if(hbLog.write_update_key(job.packed_key(), DTCHotBackup::SYNC_UPDATE)) { - // 为避免错误扩大, 给客户端成功响应 + // To avoid error amplification, give client success response log4cplus_error("hb: log update key failed"); } // Hot Bakcup @@ -1391,7 +1391,7 @@ BufferResult BufferProcessAskChain::buffer_delete_rows(DTCJobOperation &job) // Hot Backup if (write_hotbackup_log(job, cache_transaction_node, DTCHotBackup::SYNC_DELETE)) { - // 为避免错误扩大, 给客户端成功响应 + // To avoid error amplification, give client success response log4cplus_error("hb: log update key failed"); } // Hot Bakcup @@ -1421,7 +1421,7 @@ BufferResult BufferProcessAskChain::buffer_sync_insert_precheck(DTCJobOperation &job) { log4cplus_debug("%s", "buffer_sync_insert begin"); - // 这种模式下,不支持insert操作 + // In this mode, insert operation is not supported if (m_bReplaceEmpty == true) { job.set_error( -EC_BAD_COMMAND, CACHE_SVC, @@ -1445,7 +1445,7 @@ BufferProcessAskChain::buffer_sync_insert_precheck(DTCJobOperation &job) BufferResult BufferProcessAskChain::buffer_sync_insert(DTCJobOperation &job) { log4cplus_debug("%s", "buffer_sync_insert begin"); - // 这种模式下,不支持insert操作 + // In this mode, insert operation is not supported if (m_bReplaceEmpty == true) { job.set_error( -EC_BAD_COMMAND, CACHE_SVC, @@ -1454,7 +1454,7 @@ BufferResult BufferProcessAskChain::buffer_sync_insert(DTCJobOperation &job) "insert cmd from client, not support under replace mode"); return DTC_CODE_BUFFER_ERROR; } - // 如果自增量字段是key,则会更新key + // If auto-increment field is key, then key will be updated if (job.resultInfo.insert_id() > 0) job.update_packed_key(job.resultInfo.insert_id()); @@ -1482,7 +1482,7 @@ BufferResult BufferProcessAskChain::buffer_sync_update(DTCJobOperation &job) // NOOP sync update if (job.request_operation() == NULL) { // no field need to update - // 如果helper更新的纪录数为0则直接返回 + // If helper updated record count is 0, return directly return DTC_CODE_BUFFER_SUCCESS; } else if (setrows == false && job.resultInfo.affected_rows() == 0) { if (job.request_operation()->has_type_commit() == 0) { @@ -1494,7 +1494,7 @@ BufferResult BufferProcessAskChain::buffer_sync_update(DTCJobOperation &job) setrows = true; } else { log4cplus_debug("%s", "helper's affected rows is zero"); - // 如果helper更新的纪录数为0则直接返回 + // If helper updated record count is 0, return directly return DTC_CODE_BUFFER_SUCCESS; } } @@ -1528,7 +1528,7 @@ BufferResult BufferProcessAskChain::buffer_sync_replace(DTCJobOperation &job) // NOOP sync update if (lossy_mode_ == false && job.resultInfo.affected_rows() == 0) { log4cplus_debug("%s", "helper's affected rows is zero"); - // 如果helper更新的纪录数为0则直接返回 + // If helper updated record count is 0, return directly return DTC_CODE_BUFFER_SUCCESS; } transaction_find_node(job); @@ -1578,7 +1578,7 @@ BufferResult BufferProcessAskChain::buffer_nodb_insert(DTCJobOperation &job) { BufferResult iRet; log4cplus_debug("%s", "buffer_asyn_prepare_insert begin"); - // 这种模式下,不支持insert操作 + // In this mode, insert operation is not supported if (m_bReplaceEmpty == true) { job.set_error( -EC_BAD_COMMAND, CACHE_SVC, @@ -1686,7 +1686,7 @@ BufferResult BufferProcessAskChain::buffer_nodb_delete(DTCJobOperation &job) BufferResult BufferProcessAskChain::buffer_async_insert(DTCJobOperation &job) { log4cplus_debug("%s", "buffer_async_insert begin"); - // 这种模式下,不支持insert操作 + // In this mode, insert operation is not supported if (m_bReplaceEmpty == true) { job.set_error( -EC_BAD_COMMAND, CACHE_SVC, @@ -1716,7 +1716,7 @@ BufferResult BufferProcessAskChain::buffer_async_insert(DTCJobOperation &job) break; } log4cplus_debug("%s", "buffer_async_insert data begin"); - // 对insert 操作命中数据进行采样 + // Sample data for insert operations ++stat_insert_hits_; return buffer_insert_row(job, true /* async */, true /* setrows */); @@ -1746,7 +1746,7 @@ BufferResult BufferProcessAskChain::buffer_async_update(DTCJobOperation &job) } log4cplus_debug("%s", "buffer_async_update update data begin"); - // 对update 操作命中数据进行采样 + // Sample data for update operations ++stat_update_hits_; return buffer_update_rows(job, true /*Async*/, true /*setrows*/); } @@ -1779,11 +1779,11 @@ BufferResult BufferProcessAskChain::buffer_async_replace(DTCJobOperation &job) /* * Function : deal_single_database_addition_ask - * Description : 处理incoming job - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 0 成功 - * : -1 失败 + * Description : Handle incoming job + * Input : job request information + * Output : job return information + * Return : 0 success + * : -1 failure */ BufferResult BufferProcessAskChain::deal_single_database_addition_ask(DTCJobOperation &job) @@ -1791,7 +1791,7 @@ BufferProcessAskChain::deal_single_database_addition_ask(DTCJobOperation &job) job.renew_timestamp(); error_message_[0] = 0; job.field_type(0); - // 取命令字 + // Get command int iCmd = job.request_code(); log4cplus_debug( "BufferProcessAskChain::deal_single_database_addition_ask cmd is %d ", @@ -1807,11 +1807,11 @@ BufferProcessAskChain::deal_single_database_addition_ask(DTCJobOperation &job) "There's nothing to limit because no fields required"); return DTC_CODE_BUFFER_ERROR; } - // 如果命中黑名单,则purge掉当前节点,走PassThru模式 + // If hitting blacklist, purge current node and go to PassThru mode if (black_list_->in_blacklist(job.packed_key())) { /* - * 理论上是在黑名单的节点是不可能在cache中的 - * 为了防止异常,预purge。 + * Theoretically, blacklisted nodes cannot be in cache + * To prevent anomalies, pre-purge. */ log4cplus_debug( "blacklist hit, passthough to datasource"); @@ -1826,16 +1826,16 @@ BufferProcessAskChain::deal_single_database_addition_ask(DTCJobOperation &job) ++stat_insert_count_; if (update_mode_ == MODE_ASYNC && insert_mode_ != MODE_SYNC) return buffer_async_insert(job); - // 标示task将提交给helper + // Mark task will be submitted to helper return buffer_sync_insert_precheck(job); case DRequest::Update: ++stat_update_count_; if (update_mode_) return buffer_async_update(job); - // 标示task将提交给helper + // Mark task will be submitted to helper return DTC_CODE_BUFFER_GOTO_NEXT_CHAIN; - // 如果clinet 上送Delete 操作,删除Cache中数据,同时提交Helper - // 现阶段异步Cache暂时不支持Delete操作 + // If client sends Delete operation, delete data in Cache and submit to Helper + // Async Cache currently does not support Delete operations case DRequest::Delete: if (update_mode_ != MODE_SYNC) { if (job.request_condition() && @@ -1845,30 +1845,30 @@ BufferProcessAskChain::deal_single_database_addition_ask(DTCJobOperation &job) "Delete base non ReadOnly fields"); return DTC_CODE_BUFFER_ERROR; } - // 异步delete前先flush + // Flush before async delete BufferResult iRet = DTC_CODE_BUFFER_SUCCESS; iRet = buffer_flush_data_before_delete(job); if (iRet == DTC_CODE_BUFFER_ERROR) return iRet; } - // 对于delete操作,直接提交DB,不改变原有逻辑 + // For delete operations, submit directly to DB without changing original logic ++stat_delete_count_; - // 标示task将提交给helper + // Mark task will be submitted to helper return DTC_CODE_BUFFER_GOTO_NEXT_CHAIN; case DRequest::Purge: - // 删除指定key在cache中的数据 + // Delete data for specified key in cache ++stat_purge_count_; return buffer_purge_data(job); case DRequest::Flush: if (update_mode_) - // flush指定key在cache中的数据 + // Flush data for specified key in cache return buffer_flush_data(job); else return DTC_CODE_BUFFER_SUCCESS; case DRequest::Replace: - // 如果是淘汰的数据,不作处理 + // If it's evicted data, do not process ++stat_update_count_; - // 限制key字段作为唯一字段才能使用replace命令 + // Restrict key fields as unique fields to use replace command if (!(job.table_definition()->key_part_of_uniq_field()) || job.table_definition()->has_auto_increment()) { job.set_error( @@ -1878,7 +1878,7 @@ BufferProcessAskChain::deal_single_database_addition_ask(DTCJobOperation &job) } if (update_mode_) return buffer_async_replace(job); - // 标示task将提交给helper + // Mark task will be submitted to helper return DTC_CODE_BUFFER_GOTO_NEXT_CHAIN; case DRequest::TYPE_SYSTEM_COMMAND: return buffer_process_admin(job); @@ -1893,11 +1893,11 @@ BufferProcessAskChain::deal_single_database_addition_ask(DTCJobOperation &job) /* * Function : deal_batch_database_addition_ask - * Description : 处理incoming batch job - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 0 成功 - * : -1 失败 + * Description : Handle incoming batch job + * Input : job request information + * Output : job return information + * Return : 0 success + * : -1 failure */ BufferResult BufferProcessAskChain::deal_batch_database_addition_ask(DTCJobOperation &job) @@ -1905,7 +1905,7 @@ BufferProcessAskChain::deal_batch_database_addition_ask(DTCJobOperation &job) job.renew_timestamp(); error_message_[0] = 0; - // 取命令字 + // Get command int iCmd = job.request_code(); if (node_empty_limit_) { int bsize = job.get_batch_size(); @@ -1928,11 +1928,11 @@ BufferProcessAskChain::deal_batch_database_addition_ask(DTCJobOperation &job) /* * Function : reply_connector_answer - * Description : 处理task from helper reply - * Input : job 请求信息 - * Output : job 返回信息 - * Return : 0 成功 - * : -1 失败 + * Description : Handle task from helper reply + * Input : job request information + * Output : job return information + * Return : 0 success + * : -1 failure */ BufferResult BufferProcessAskChain::reply_connector_answer(DTCJobOperation &job) @@ -1943,7 +1943,7 @@ BufferResult BufferProcessAskChain::reply_connector_answer(DTCJobOperation &job) int iCmd = job.request_code(); switch (iCmd) { - // 一定是cache miss,全部replace入cache + // Must be cache miss, replace all into cache case DRequest::Get: if (job.flag_pass_thru()) { if (job.result) @@ -1968,7 +1968,7 @@ BufferResult BufferProcessAskChain::reply_connector_answer(DTCJobOperation &job) buffer_replace_result(job); return buffer_get_rb(job); - // 没有回读则必定是multirow,新数据附在原有数据后面 + // Without read-back, it must be multirow, new data appended after existing data case DRequest::Insert: if (job.flag_black_hole()) return buffer_nodb_insert(job); @@ -2028,7 +2028,7 @@ BufferResult BufferProcessAskChain::reply_connector_answer(DTCJobOperation &job) "invalid cmd from helper"); } case DRequest::Replicate: - // 处理主从同步 + // Handle master-slave synchronization return buffer_process_replicate(job); default: job.set_error(-EC_BAD_COMMAND, CACHE_SVC, @@ -2045,7 +2045,7 @@ BufferProcessAskChain::deal_single_cache_only_ask(DTCJobOperation &job) job.mark_as_black_hole(); job.renew_timestamp(); error_message_[0] = 0; - // 取命令字 + // Get command int iCmd = job.request_code(); switch (iCmd) { case DRequest::Get: @@ -2069,15 +2069,15 @@ BufferProcessAskChain::deal_single_cache_only_ask(DTCJobOperation &job) ++stat_delete_count_; return buffer_nodb_delete(job); case DRequest::Purge: - //删除指定key在cache中的数据 + //Delete data for specified key in cache ++stat_purge_count_; return buffer_purge_data(job); case DRequest::Flush: return DTC_CODE_BUFFER_SUCCESS; - // 如果是淘汰的数据,不作处理 + // If it's evicted data, do not process case DRequest::Replace: ++stat_update_count_; - // 限制key字段作为唯一字段才能使用replace命令 + // Restrict key fields as unique fields to use replace command if (!(job.table_definition()->key_part_of_uniq_field()) || job.table_definition()->has_auto_increment()) { job.set_error( @@ -2098,9 +2098,9 @@ BufferProcessAskChain::deal_single_cache_only_ask(DTCJobOperation &job) } /* - * 当DTC后端使用诸如Rocksdb之类的单机内嵌式持久引擎时,主从同步需要从存储侧拉取全量 - * 数据,这里处理从存储引擎侧的返回值并返回给hotback主从同步端,注意:不对当前cache - * 做任何更改 + * When DTC backend uses embedded persistent engines like Rocksdb, master-slave synchronization needs to pull full + * data from storage side. This handles return values from storage engine side and returns to hotback master-slave + * synchronization end. Note: no changes are made to current cache * */ BufferResult @@ -2110,7 +2110,7 @@ BufferProcessAskChain::buffer_process_replicate(DTCJobOperation &job) log4cplus_info("do cache process replicate start!"); // switch back the tabledef job.set_request_code(DRequest::TYPE_SYSTEM_COMMAND); - // 数据库回来的记录如果是0行,则表示全量同步结束 + // If the records returned from database are 0 rows, it indicates full synchronization is finished if ((job.result == NULL || job.result->total_rows() == 0)) { log4cplus_info("full replicate stage finished! key:[%u]", job.int_key()); @@ -2120,7 +2120,7 @@ BufferProcessAskChain::buffer_process_replicate(DTCJobOperation &job) "full sync finished!"); return DTC_CODE_BUFFER_ERROR; } - // 处理返回值 + // Process return values RowValue row(job.get_replicate_table()); RawData rawdata(&g_stSysMalloc, 1); job.prepare_result_no_limit(); @@ -2137,7 +2137,7 @@ BufferProcessAskChain::buffer_process_replicate(DTCJobOperation &job) "replicate: get data from storage failed!"); continue; } - // 设置key + // Set key job.set_request_key(pstRow->field_value(0)); job.build_packed_key(); row[2] = (*pstRow)[0]; @@ -2157,7 +2157,7 @@ BufferResult BufferProcessAskChain::reply_flush_answer(DTCJobOperation &job) error_message_[0] = '\0'; int iCmd = job.request_code(); switch (iCmd) { - // 如果是淘汰的数据,不作处理 + // If it's evicted data, do not process case DRequest::Replace: return DTC_CODE_BUFFER_SUCCESS; default: @@ -2756,7 +2756,7 @@ BufferResult BufferProcessAskChain::buffer_process_admin(DTCJobOperation &Job) Job.requestInfo.admin_code() == DRequest::SystemCommand::LogoutHB || Job.requestInfo.admin_code() == DRequest::SystemCommand::GetUpdateKey) { - if (hotbackup_lru_feature_ == NULL) { // 热备功能尚未启动 + if (hotbackup_lru_feature_ == NULL) { // Hot backup feature not yet started Job.set_error(-EBADRQC, CACHE_SVC, "hot-backup not active yet"); return DTC_CODE_BUFFER_ERROR; @@ -3039,7 +3039,7 @@ BufferProcessAskChain::buffer_column_expand_done(DTCJobOperation &Job) } } - //若是有源的,则重新载入配置文件到helper + // If it has source, reload configuration file to helper if (dtc_mode_ == DTC_MODE_DATABASE_ADDITION) { char *buf = stRow[3].bin.ptr; char *bufLocal = (char *)MALLOC(strlen(buf) + 1); @@ -3078,7 +3078,7 @@ BufferProcessAskChain::buffer_column_expand_done(DTCJobOperation &Job) DTCHotBackup::SYNC_COLEXPAND_CMD); log4cplus_debug("buffer_column_expand_done ok"); - //若是有源的,则需要通知work helper重新载入配置文件 + // If it has source, need to notify work helper to reload configuration file if (dtc_mode_ == DTC_MODE_DATABASE_ADDITION) { DTCJobOperation *pJob = new DTCJobOperation( TableDefinitionManager::instance()->get_cur_table_def()); @@ -3153,7 +3153,7 @@ BufferProcessAskChain::buffer_column_expand_key(DTCJobOperation &Job) BufferResult BufferProcessAskChain::buffer_register_hb(DTCJobOperation &Job) { - if (hotbackup_lru_feature_ == NULL) { // 共享内存还没有激活热备特性 + if (hotbackup_lru_feature_ == NULL) { // Shared memory has not yet activated hot backup feature NEW(HBFeature, hotbackup_lru_feature_); if (hotbackup_lru_feature_ == NULL) { log4cplus_error("new hot-backup feature error: %m"); @@ -3187,7 +3187,7 @@ BufferResult BufferProcessAskChain::buffer_register_hb(DTCJobOperation &Job) if (hotbackup_lru_feature_->master_uptime() == 0) hotbackup_lru_feature_->master_uptime() = time(NULL); - //开启变更key日志 + // Enable key change logging log_hotbackup_key_switch_ = true; int64_t hb_timestamp = hotbackup_lru_feature_->master_uptime(); @@ -3206,7 +3206,7 @@ BufferResult BufferProcessAskChain::buffer_logout_hb(DTCJobOperation &Job) } /* - * 遍历cache中所有的Node节点 + * Traverse all Node nodes in cache */ BufferResult BufferProcessAskChain::buffer_get_key_list(DTCJobOperation &Job) { @@ -3236,7 +3236,7 @@ BufferResult BufferProcessAskChain::buffer_get_key_list(DTCJobOperation &Job) return DTC_CODE_BUFFER_GOTO_NEXT_CHAIN; } - //遍历完所有的Node节点 + // Finished traversing all Node nodes if (lst > cache_.max_node_id()) { Job.set_error(-EC_FULL_SYNC_COMPLETE, "buffer_get_key_list", "node id is overflow"); @@ -3254,7 +3254,7 @@ BufferResult BufferProcessAskChain::buffer_get_key_list(DTCJobOperation &Job) if (i > cache_.max_node_id()) break; - //查找对应的Node节点 + // Find corresponding Node node Node node = I_SEARCH(i); if (!node) continue; @@ -3263,15 +3263,15 @@ BufferResult BufferProcessAskChain::buffer_get_key_list(DTCJobOperation &Job) if (cache_.is_time_marker(node)) continue; - // 解码Key + // Decode Key DataChunk *keyptr = M_POINTER(DataChunk, node.vd_handle()); - //发送packedkey + // Send packedkey r[2] = TableDefinitionManager::instance() ->get_cur_table_def() ->packed_key(keyptr->key()); - //解码Value + // Decode Value if (data_process_->get_node_all_rows_count(&node, &rawdata)) { rawdata.destory(); continue; @@ -3290,9 +3290,9 @@ BufferResult BufferProcessAskChain::buffer_get_key_list(DTCJobOperation &Job) } /* - * hot backup拉取更新key或者lru变更,如果没有则挂起请求,直到 - * 1. 超时 - * 2. 有更新key, 或者LRU变更 + * Hot backup pulls updated keys or lru changes, if none then suspend request until + * 1. Timeout + * 2. There are updated keys or LRU changes */ BufferResult BufferProcessAskChain::buffer_get_update_key(DTCJobOperation &Job) { @@ -3311,18 +3311,18 @@ BufferResult BufferProcessAskChain::buffer_get_raw_data(DTCJobOperation &Job) log4cplus_debug("buffer_get_raw_data start "); - RowValue stRow(Job.table_definition()); //一行数据 + RowValue stRow(Job.table_definition()); // One row of data RawData stNodeData(&g_stSysMalloc, 1); Job.prepare_result_no_limit(); for (int i = 0; i < condition->num_fields(); i++) { key = condition->field_value(i); - stRow[1].u64 = DTCHotBackup::HAS_VALUE; //表示附加value字段 + stRow[1].u64 = DTCHotBackup::HAS_VALUE; // Indicates additional value field stRow[2].Set(key->bin.ptr, key->bin.len); Node stNode = cache_.cache_find_auto_chose_hash(key->bin.ptr); - if (!stNode) { //master没有该key的数据 + if (!stNode) { // Master does not have data for this key stRow[1].u64 = DTCHotBackup::KEY_NOEXIST; stRow[3].Set(0); log4cplus_debug("append_row flag"); @@ -3342,7 +3342,7 @@ BufferResult BufferProcessAskChain::buffer_get_raw_data(DTCJobOperation &Job) } log4cplus_debug("append_row flag"); - Job.append_row(&stRow); //当前行添加到task中 + Job.append_row(&stRow); // Add current row to task stNodeData.destory(); } @@ -3359,7 +3359,7 @@ BufferProcessAskChain::buffer_replace_raw_data(DTCJobOperation &Job) const DTCFieldValue *condition = Job.request_condition(); const DTCValue *key; - RowValue stRow(Job.table_definition()); //一行数据 + RowValue stRow(Job.table_definition()); // One row of data RawData stNodeData(&g_stSysMalloc, 1); if (condition->num_fields() < 1) { log4cplus_debug("%s", "replace raw data need key"); @@ -3370,16 +3370,16 @@ BufferProcessAskChain::buffer_replace_raw_data(DTCJobOperation &Job) key = condition->field_value(0); stRow[2].Set(key->bin.ptr, key->bin.len); - Job.update_row(stRow); //获取数据 + Job.update_row(stRow); // Get data log4cplus_debug("value[len: %d]", stRow[3].bin.len); - //调整备机的空节点过滤 + // Adjust slave empty node filtering if (stRow[1].u64 & DTCHotBackup::EMPTY_NODE && empty_node_filter_) { empty_node_filter_->SET(*(unsigned int *)(key->bin.ptr)); } - //key在master不存在, 或者是空节点,purge cache. + // Key does not exist in master, or is empty node, purge cache. if (stRow[1].u64 & DTCHotBackup::KEY_NOEXIST || stRow[1].u64 & DTCHotBackup::EMPTY_NODE) { log4cplus_debug("purge slave data"); @@ -3391,7 +3391,7 @@ BufferProcessAskChain::buffer_replace_raw_data(DTCJobOperation &Job) return DTC_CODE_BUFFER_SUCCESS; } - // 解析成raw data + // Parse into raw data ALLOC_HANDLE_T hData = g_stSysMalloc.Malloc(stRow[3].bin.len); if (hData == INVALID_HANDLE) { log4cplus_error("malloc error: %m"); @@ -3410,7 +3410,7 @@ BufferProcessAskChain::buffer_replace_raw_data(DTCJobOperation &Job) return DTC_CODE_BUFFER_ERROR; } - // 检查packed key是否匹配 + // Check if packed key matches DTCValue packed_key = TableDefinitionManager::instance() ->get_cur_table_def() ->packed_key(stNodeData.key()); @@ -3426,7 +3426,7 @@ BufferProcessAskChain::buffer_replace_raw_data(DTCJobOperation &Job) return DTC_CODE_BUFFER_ERROR; } - // 查找分配node节点 + // Find allocated node unsigned int uiNodeID; Node stNode = cache_.cache_find_auto_chose_hash(key->bin.ptr); @@ -3452,7 +3452,7 @@ BufferProcessAskChain::buffer_replace_raw_data(DTCJobOperation &Job) uiNodeID = stNode.node_id(); - // 替换数据 + // Replace data iRet = data_process_->do_replace_all(&stNode, &stNodeData); if (iRet != 0) { if (dtc_mode_ == DTC_MODE_CACHE_ONLY) { @@ -3485,7 +3485,7 @@ BufferResult BufferProcessAskChain::buffer_adjust_lru(DTCJobOperation &Job) log4cplus_debug("buffer_adjust_lru start "); - RowValue stRow(Job.table_definition()); //一行数据 + RowValue stRow(Job.table_definition()); // One row of data for (int i = 0; i < condition->num_fields(); i++) { key = condition->field_value(i); @@ -3532,7 +3532,7 @@ BufferResult BufferProcessAskChain::buffer_verify_hbt(DTCJobOperation &Job) { log4cplus_debug("buffer_verify_hbt start "); - if (hotbackup_lru_feature_ == NULL) { // 共享内存还没有激活热备特性 + if (hotbackup_lru_feature_ == NULL) { // Shared memory has not yet activated hot backup feature NEW(HBFeature, hotbackup_lru_feature_); if (hotbackup_lru_feature_ == NULL) { log4cplus_error("new hot-backup feature error: %m"); @@ -3584,7 +3584,7 @@ BufferResult BufferProcessAskChain::buffer_get_hbt(DTCJobOperation &Job) { log4cplus_debug("buffer_get_hbt start "); - if (hotbackup_lru_feature_ == NULL) { // 共享内存还没有激活热备特性 + if (hotbackup_lru_feature_ == NULL) { // Shared memory has not yet activated hot backup feature Job.versionInfo.set_master_hb_timestamp(0); Job.versionInfo.set_slave_hb_timestamp(0); } else { @@ -3737,26 +3737,26 @@ BufferResult BufferProcessAskChain::buffer_migrate(DTCJobOperation &Job) log4cplus_debug("cache_cache_migrate start "); - RowValue stRow(Job.table_definition()); //一行数据 + RowValue stRow(Job.table_definition()); // One row of data RawData stNodeData(&g_stSysMalloc, 1); Node stNode = cache_.cache_find_auto_chose_hash(key.bin.ptr); - //如果有updateInfo则说明请求从DTC过来 + // If there is updateInfo, it indicates the request comes from DTC int flag = 0; if (ui && ui->field_value(0)) { flag = ui->field_value(0)->s64; } if ((flag & 0xFF) == DTCMigrate::FROM_SERVER) { log4cplus_debug("this migrate cmd is from DTC"); - RowValue stRow(Job.table_definition()); //一行数据 + RowValue stRow(Job.table_definition()); // One row of data RawData stNodeData(&g_stSysMalloc, 1); stRow[2].Set(key.bin.ptr, key.bin.len); - Job.update_row(stRow); //获取数据 + Job.update_row(stRow); // Get data log4cplus_debug("value[len: %d]", stRow[3].bin.len); - //key在master不存在, 或者是空节点,purge cache. + // Key does not exist in master, or is empty node, purge cache. if (stRow[1].u64 & DTCHotBackup::KEY_NOEXIST || stRow[1].u64 & DTCHotBackup::EMPTY_NODE) { log4cplus_debug("purge slave data"); @@ -3764,7 +3764,7 @@ BufferResult BufferProcessAskChain::buffer_migrate(DTCJobOperation &Job) return DTC_CODE_BUFFER_SUCCESS; } - // 解析成raw data + // Parse into raw data ALLOC_HANDLE_T hData = g_stSysMalloc.Malloc(stRow[3].bin.len); if (hData == INVALID_HANDLE) { log4cplus_error("malloc error: %m"); @@ -3785,7 +3785,7 @@ BufferResult BufferProcessAskChain::buffer_migrate(DTCJobOperation &Job) return DTC_CODE_BUFFER_ERROR; } - // 检查packed key是否匹配 + // Check if packed key matches DTCValue packed_key = TableDefinitionManager::instance() ->get_cur_table_def() ->packed_key(stNodeData.key()); @@ -3800,7 +3800,7 @@ BufferResult BufferProcessAskChain::buffer_migrate(DTCJobOperation &Job) return DTC_CODE_BUFFER_ERROR; } - // 查找分配node节点 + // Find allocated node unsigned int uiNodeID; if (!stNode) { @@ -3822,7 +3822,7 @@ BufferResult BufferProcessAskChain::buffer_migrate(DTCJobOperation &Job) cache_.remove_from_lru(stNode); cache_.insert_to_clean_lru(stNode); } - if ((flag >> 8) & 0xFF) //如果为脏节点 + if ((flag >> 8) & 0xFF) // If it's a dirty node { cache_.remove_from_lru(stNode); cache_.insert_to_dirty_lru(stNode); @@ -3830,7 +3830,7 @@ BufferResult BufferProcessAskChain::buffer_migrate(DTCJobOperation &Job) uiNodeID = stNode.node_id(); - // 替换数据 + // Replace data iRet = data_process_->do_replace_all(&stNode, &stNodeData); if (iRet != 0) { if (dtc_mode_ == DTC_MODE_CACHE_ONLY) { @@ -3863,14 +3863,14 @@ BufferResult BufferProcessAskChain::buffer_migrate(DTCJobOperation &Job) } log4cplus_debug("this migrate cmd is from api"); - //请求从工具过来,我们需要构造请求发给其他dtc + // Request comes from tool, we need to construct request and send to other DTC if (!stNode) { Job.set_error(-EC_KEY_NOTEXIST, "buffer_migrate", "this key not found in cache"); return DTC_CODE_BUFFER_ERROR; } - //获取该节点的raw-data,构建replace请求给后端helper + // Get raw-data of this node, construct replace request for backend helper iRet = data_process_->get_node_all_rows_count(&stNode, &stNodeData); if (iRet != 0) { log4cplus_error("get raw-data failed"); @@ -3886,8 +3886,8 @@ BufferResult BufferProcessAskChain::buffer_migrate(DTCJobOperation &Job) return DTC_CODE_BUFFER_ERROR; } //id0 {"type", DField::Unsigned, 4, DTCValue::Make(0), 0} - //type的最后一个字节用来表示请求来着其他dtc还是api - //倒数第二个字节表示节点是否为脏 + // The last byte of type is used to indicate whether the request comes from other DTC or API + // The second to last byte indicates whether the node is dirty uitmp->add_value(0, DField::Set, DField::Unsigned, DTCValue::Make(DTCMigrate::FROM_SERVER | (stNode.is_dirty() << 8))); diff --git a/src/core/chain/system_command_ask_chain.cc b/src/core/chain/system_command_ask_chain.cc index e80e983c..dbe4fc72 100644 --- a/src/core/chain/system_command_ask_chain.cc +++ b/src/core/chain/system_command_ask_chain.cc @@ -100,7 +100,7 @@ void SystemCommandAskChain::job_ask_procedure(DTCJobOperation *job_operation) log4cplus_debug("Cmd is %d, AdminCmd is %u", job_operation->request_code(), job_operation->requestInfo.admin_code()); - //处理ServerAdmin命令 + //Handle ServerAdmin commands if (DRequest::TYPE_SYSTEM_COMMAND == job_operation->request_code()) { switch (job_operation->requestInfo.admin_code()) { case DRequest::SystemCommand::SET_READONLY: @@ -120,7 +120,7 @@ void SystemCommandAskChain::job_ask_procedure(DTCJobOperation *job_operation) } } - //当server为readonly,对非查询请求直接返回错误 + //When server is readonly, directly return error for non-query requests if (0 != atomic8_read(&read_only_)) { if (DRequest::Get != job_operation->request_code()) { log4cplus_info( diff --git a/src/core/chain/system_command_ask_chain.h b/src/core/chain/system_command_ask_chain.h index f655d561..0fa9bc67 100644 --- a/src/core/chain/system_command_ask_chain.h +++ b/src/core/chain/system_command_ask_chain.h @@ -26,9 +26,9 @@ class SystemCommandAskChain : public JobAskInterface { SystemCommandAskChain(PollerBase *o); public: - //返回实例,如果实例尚未构造,则构造一个新的实例返回 + //Return instance, if instance not yet constructed, construct a new instance and return static SystemCommandAskChain *get_instance(PollerBase *o); - //仅是返回,如果实例尚未构造,则返回空 + //Just return, if instance not yet constructed, return null static SystemCommandAskChain *get_instance(); virtual ~SystemCommandAskChain(void); void register_next_chain(JobAskInterface *p) @@ -43,15 +43,15 @@ class SystemCommandAskChain : public JobAskInterface { private: ChainJoint main_chain; - //server是否为只读状态 + //Whether server is in read-only state atomic8_t read_only_; - //Readonly的统计对象 + //Read-only statistics object StatCounter stat_read_only; private: virtual void job_ask_procedure(DTCJobOperation *); - //处理serveradmin 命令 + //Handle serveradmin commands void deal_server_admin(DTCJobOperation *job_operation); void query_mem_info(DTCJobOperation *job_operation); }; diff --git a/src/core/data/data_chunk.h b/src/core/data/data_chunk.h index 83d95d7a..174a7936 100644 --- a/src/core/data/data_chunk.h +++ b/src/core/data/data_chunk.h @@ -23,15 +23,15 @@ class DataChunk { protected: - unsigned char data_type_; // 数据chunk的类型 + unsigned char data_type_; // Type of data chunk public: /************************************************* - Description: 计算基本结构大小 + Description: Calculate basic structure size Input: Output: - Return: 内存大小 - *************************************************/ + Return: Memory size + ***********************************************/ ALLOC_SIZE_T base_size() { if (data_type_ == DATA_TYPE_RAW) @@ -54,11 +54,11 @@ class DataChunk { } /************************************************* - Description: 获取格式化后的key + Description: Get formatted key Input: Output: - Return: key指针 - *************************************************/ + Return: key pointer + ***********************************************/ const char *key() const { if ((data_type_ & 0x7f) == DATA_TYPE_RAW) { @@ -72,11 +72,11 @@ class DataChunk { } /************************************************* - Description: 获取格式化后的key + Description: Get formatted key Input: Output: - Return: key指针 - *************************************************/ + Return: key pointer + ***********************************************/ char *key() { if ((data_type_ & 0x7f) == DATA_TYPE_RAW) { @@ -90,11 +90,11 @@ class DataChunk { } /************************************************* - Description: 保存key - Input: key key的实际值 + Description: Save key + Input: key actual value of key Output: Return: - *************************************************/ + **********************************************/ #define SET_KEY_FUNC(type, key) \ void set_key(type key) \ @@ -114,12 +114,12 @@ class DataChunk { SET_KEY_FUNC(uint64_t, ullKey) /************************************************* - Description: 保存字符串key - Input: key key的实际值 - iLen key的长度 + Description: Save string key + Input: key actual value of key + iLen length of key Output: Return: - *************************************************/ + **********************************************/ void set_key(const char *pchKey, int iLen) { if (data_type_ == DATA_TYPE_RAW) { @@ -134,11 +134,11 @@ class DataChunk { } /************************************************* - Description: 保存格式化好的字符串key - Input: key key的实际值, 要求key[0]是长度 + Description: Save formatted string key + Input: key actual value of key, requires key[0] to be length Output: Return: - *************************************************/ + **********************************************/ void set_key(const char *pchKey) { if (data_type_ == DATA_TYPE_RAW) { @@ -153,10 +153,10 @@ class DataChunk { } /************************************************* - Description: 查询字符串key大小 + Description: Query string key size Input: Output: - Return: key大小 + Return: key size *************************************************/ int str_key_size() { @@ -170,10 +170,10 @@ class DataChunk { } /************************************************* - Description: 查询二进制key大小 + Description: Query binary key size Input: Output: - Return: key大小 + Return: key size *************************************************/ int bin_key_size() { @@ -189,10 +189,10 @@ class DataChunk { } /************************************************* - Description: 查询数据头大小,如果是CRawData的chunk,data_size()是不包括Row的长度,仅包括头部信息以及key + Description: Query data header size. If it's CRawData chunk, data_size() does not include Row length, only header info and key Input: Output: - Return: 内存大小 + Return: memory size *************************************************/ unsigned int data_size(int iKeySize) { @@ -250,10 +250,10 @@ class DataChunk { } /************************************************* - Description: 销毁内存并释放内存 + Description: Destroy and free memory Input: Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int destory(MallocBase *pstMalloc) { @@ -271,7 +271,7 @@ class DataChunk { return (-1); } - /* 查询如果destroy这块内存,能释放多少空间出来 (包括合并)*/ + /* Query how much space can be freed if this memory is destroyed (including merging) */ unsigned ask_for_destroy_size(MallocBase *pstMalloc) { MEM_HANDLE_T hHandle = pstMalloc->ptr_to_handle(this); diff --git a/src/core/hotbk/hb_log.cc b/src/core/hotbk/hb_log.cc index 1cf6d036..73c97213 100644 --- a/src/core/hotbk/hb_log.cc +++ b/src/core/hotbk/hb_log.cc @@ -145,12 +145,12 @@ int HBLog::Seek(const JournalID &v) return log_reader_->Seek(v); } -/* 批量拉取更新key,返回更新key的个数 */ +/* Batch fetch update keys, return count of update keys */ int HBLog::task_append_all_rows(DTCJobOperation &job, int limit) { int count; for (count = 0; count < limit; ++count) { - /* 没有待处理日志 */ + /* No pending logs to process */ if (log_reader_->Read()) break; diff --git a/src/core/hotbk/hb_log.h b/src/core/hotbk/hb_log.h index ed5514ea..e58baa48 100644 --- a/src/core/hotbk/hb_log.h +++ b/src/core/hotbk/hb_log.h @@ -31,7 +31,7 @@ class BinlogReader; class HBLog { public: - //传入编解码的表结构 + //Pass in table structure for encoding/decoding HBLog(DTCTableDefinition *tbl); ~HBLog(); @@ -42,13 +42,13 @@ class HBLog { JournalID get_reader_jid(void); JournalID get_writer_jid(void); - //不带value,只写更新key + //Without value, only write update key int write_update_key(DTCValue key, int type); - //将多条log记录编码进TaskReqeust + //Encode multiple log records into TaskRequest int task_append_all_rows(DTCJobOperation &, int limit); - //提供给LRUBitUnit来记录lru变更 + //Provide to LRUBitUnit to record lru changes int write_lru_hb_log(DTCJobOperation &job); int write_update_log(DTCJobOperation &job); int write_update_key(DTCValue key, DTCValue v, int type); diff --git a/src/core/log/logger.cc b/src/core/log/logger.cc index 3a0be019..f28d621d 100644 --- a/src/core/log/logger.cc +++ b/src/core/log/logger.cc @@ -274,7 +274,7 @@ int LogReader::read(void *buf, size_t size) return -1; } - // 如果还有更大的serial,则丢弃buf内容,切换文件。否则,回退文件指针 + // If there is a larger serial, discard the buf content and switch files. Otherwise, revert the file pointer refresh(); if (_cur_serial < _max_serial) { @@ -282,7 +282,7 @@ int LogReader::read(void *buf, size_t size) _cur_offset = 0; close_file(); - //跳过序号不存在的文件 + // Skip files with non-existent serial numbers while (open_file(_cur_serial, 1) == -1 && _cur_serial < _max_serial) _cur_serial += 1; @@ -293,7 +293,7 @@ int LogReader::read(void *buf, size_t size) return -1; } - // 回退文件指针 + // Revert file pointer if (rd > 0) { seek(JournalID(_cur_serial, _cur_offset)); } @@ -312,7 +312,7 @@ int LogReader::seek(const JournalID &v) char file[MAX_PATH_NAME_LEN] = { 0 }; file_name(file, MAX_PATH_NAME_LEN, v.serial); - /* 确保文件存在 */ + /* Ensure the file exists */ if (access(file, F_OK)) return -1; @@ -387,11 +387,11 @@ int BinlogWriter::append_body(const void *buf, size_t size) int BinlogWriter::Commit() { - //计算总长度 + // Calculate total length uint32_t total = _codec_buffer.size(); total -= struct_sizeof(length); - //写入总长度 + // Write total length struct_typeof(length) *length = (struct_typeof(length) *)(_codec_buffer.c_str()); *length = total; diff --git a/src/core/misc/main_supply.cc b/src/core/misc/main_supply.cc index 276a425b..5807161b 100644 --- a/src/core/misc/main_supply.cc +++ b/src/core/misc/main_supply.cc @@ -578,7 +578,7 @@ int init_data_connector_ask_chain(PollerBase *thread) return DTC_CODE_SUCCESS; } -//获取、配置基础信息 +// Get and configure basic information int init_config_info() { g_hash_changing = g_dtc_config->get_int_val("cache", "HashChanging", 0); diff --git a/src/core/node/empty_filter.cc b/src/core/node/empty_filter.cc index cf433ab9..37b87f52 100644 --- a/src/core/node/empty_filter.cc +++ b/src/core/node/empty_filter.cc @@ -48,7 +48,7 @@ void EmptyNodeFilter::SET(uint32_t key) uint32_t tableid = get_index(key); if (_enf->enf_tables[tableid].t_size < bitoff / CHAR_BIT + 1) { - /* 按step的整数倍来increase table*/ + /* Increase table by integer multiples of step*/ int incbyte = bitoff / CHAR_BIT + 1 - _enf->enf_tables[tableid].t_size; int how = (incbyte + _enf->enf_step - 1) / _enf->enf_step; @@ -58,7 +58,7 @@ void EmptyNodeFilter::SET(uint32_t key) _enf->enf_tables[tableid].t_handle = M_REALLOC(_enf->enf_tables[tableid].t_handle, size); if (_enf->enf_tables[tableid].t_handle == INVALID_HANDLE) { - /* realloc 失败后,不会重试*/ + /* After realloc fails, will not retry*/ return; } @@ -75,7 +75,7 @@ void EmptyNodeFilter::CLR(uint32_t key) uint32_t tableid = get_index(key); if (_enf->enf_tables[tableid].t_size < bitoff / CHAR_BIT + 1) - /* 超出表范围,return*/ + /* Beyond table range, return*/ return; return CLR_B(bitoff, diff --git a/src/core/node/node_index.cc b/src/core/node/node_index.cc index 8a8c5714..769ada56 100644 --- a/src/core/node/node_index.cc +++ b/src/core/node/node_index.cc @@ -44,8 +44,8 @@ void NodeIndex::destroy() int NodeIndex::pre_allocate_index(size_t mem_size) { /* - * 按所有节点全为空节点来分配2级NodeIndex - * 一个空节点占用44 bytes + * Allocate 2-level NodeIndex assuming all nodes are empty nodes + * An empty node occupies 44 bytes */ uint32_t n = 65536 * 256 * 44; n = mem_size / n + 1; diff --git a/src/core/node/node_set.cc b/src/core/node/node_set.cc index a192f167..a7e04a06 100644 --- a/src/core/node/node_set.cc +++ b/src/core/node/node_set.cc @@ -22,7 +22,7 @@ DTC_USING_NAMESPACE -//定义每种属性的内存大小, 至少有以下四种,可以再增加 +//Define memory size for each attribute type, at least the following four types, can add more const uint32_t NODE_SET::NG_ATTR_SIZE[] = { NODE_GROUP_INCLUDE_NODES * sizeof(NODE_ID_T), //NEXT_NODE NODE_GROUP_INCLUDE_NODES * sizeof(NODE_ID_T) * 2, //TIME_LIST @@ -38,14 +38,14 @@ int NODE_SET::do_init(NODE_ID_T id) ng_free = 0; ng_nid = id; - //属性 + //Attributes ng_attr.count = attr_count(); ng_attr.offset[0] = base_header_size(); for (unsigned int i = 1; i < ng_attr.count; i++) { ng_attr.offset[i] = ng_attr.offset[i - 1] + NG_ATTR_SIZE[i - 1]; } - /* 初始化每个Node */ + /* Initialize each Node */ for (unsigned i = 0; i < NODE_GROUP_INCLUDE_NODES; ++i) { next_node_id(i) = INVALID_NODE_ID; NODE_ID_T *lru = node_lru(i); @@ -127,7 +127,7 @@ Node NODE_SET::allocate_node(void) return Node(NULL, 0); } - //优先分配release掉的Node空间 + //Prioritize allocating released Node space if (ng_dele.count > 0) { Node N(this, ng_dele.top); N.Reset(); @@ -137,7 +137,7 @@ Node NODE_SET::allocate_node(void) return N; } - //在空闲Node中分配 + //Allocate from free Nodes else { Node N(this, ng_free); N.Reset(); @@ -149,7 +149,7 @@ Node NODE_SET::allocate_node(void) int NODE_SET::release_node(Node N) { - //复用node的handle attribute空间来把释放掉的node组织为单链表 + //Reuse node's handle attribute space to organize released nodes as single linked list N.vd_handle() = ng_dele.top; ng_dele.top = N.get_index(); ng_dele.count++; diff --git a/src/core/nodegroup/ng_info.cc b/src/core/nodegroup/ng_info.cc index 0fb8a7c9..8aa35b40 100644 --- a/src/core/nodegroup/ng_info.cc +++ b/src/core/nodegroup/ng_info.cc @@ -46,10 +46,10 @@ NGInfo::~NGInfo() Node NGInfo::allocate_node(void) { - //优先在空闲链表分配 + // Prioritize allocation in free list NODE_SET *NS = find_free_ng(); if (!NS) { - /* 防止NodeGroup把内存碎片化,采用预分配 */ + /* Prevent NodeGroup from fragmenting memory, using pre-allocation */ static int step = DTCGlobal::pre_alloc_nodegroup_count; static int fail = 0; for (int i = 0; i < step; i++) { @@ -75,7 +75,7 @@ Node NGInfo::allocate_node(void) } Node node = NS->allocate_node(); - //NG中没有任何可分配的Node + // There are no allocatable Nodes in NG if (NS->is_full()) { list_del(NS); full_list_add(NS); @@ -100,7 +100,7 @@ int NGInfo::release_node(Node &node) { NODE_SET *NS = node.Owner(); if (NS->is_full()) { - //NG挂入空闲链表 + // NG hangs into free list list_del(NS); free_list_add(NS); } @@ -190,7 +190,7 @@ NODE_SET *NGInfo::allocate_ng(void) NODE_SET *NGInfo::find_free_ng(void) { - //链表为空 + // List is empty if (NG_LIST_EMPTY(&(nodegroup_info_->ni_free_head))) { return (NODE_SET *)0; } diff --git a/src/core/nodegroup/ng_info.h b/src/core/nodegroup/ng_info.h index 705a8aaf..8d7abc5f 100644 --- a/src/core/nodegroup/ng_info.h +++ b/src/core/nodegroup/ng_info.h @@ -26,13 +26,13 @@ DTC_BEGIN_NAMESPACE -/* high-level 层支持的cache种类*/ +/* Cache types supported by high-level layer */ enum MEM_CACHE_TYPE_T { MEM_DTC_TYPE = 0x1UL, MEM_BMP_TYPE = 0x2UL, }; -/* high-level 层cache的签名、版本、类型等*/ +/* Signature, version, type, etc. of high-level cache */ #define MEM_CACHE_SIGN 0xFF00FF00FF00FF00ULL #define MEM_CACHE_VERSION 0x1ULL #define MEM_CACHE_TYPE MEM_DTC_TYPE @@ -44,8 +44,8 @@ struct cache_info { }; typedef struct cache_info CACHE_INFO_T; -/* Low-Level预留了4k的空间,供后续扩展 */ -/* TODO: 增加更加细致的逻辑判断*/ +/* Low-Level reserves 4k space for future expansion */ +/* TODO: Add more detailed logic judgment */ struct app_storage { CACHE_INFO_T as_cache_info; MEM_HANDLE_T as_extend_info; @@ -69,12 +69,12 @@ struct app_storage { typedef struct app_storage APP_STORAGE_T; struct ng_info { - NG_LIST_T ni_free_head; //有空闲Node的NG链表 - NG_LIST_T ni_full_head; //Node分配完的NG链表 - NODE_ID_T ni_min_id; //下一个被分配NG的起始NodeId - MEM_HANDLE_T ni_sys_zone; //第一个NG为系统保留 + NG_LIST_T ni_free_head; // NG linked list with free Nodes + NG_LIST_T ni_full_head; // NG linked list with all Nodes allocated + NODE_ID_T ni_min_id; // Starting NodeId of the next allocated NG + MEM_HANDLE_T ni_sys_zone; // First NG is reserved for system - /*以下为统计值,用来控制异步flush的起停,速度等*/ + /* The following are statistics used to control asynchronous flush start/stop, speed, etc. */ uint32_t ni_used_ng; uint32_t ni_used_node; uint32_t ni_dirty_node; @@ -97,8 +97,8 @@ class NGInfo { Singleton::destory(); } - Node allocate_node(void); //分配一个新Node - int release_node(Node &); //归还CNode到所属的NG并摧毁自己 + Node allocate_node(void); // Allocate a new Node + int release_node(Node &); // Return CNode to its owning NG and destroy itself /*statistic, for async flush */ void inc_dirty_node(int v) @@ -144,14 +144,14 @@ class NGInfo { Node clean_node_head(); Node empty_node_head(); - /* 获取最小可用的NodeID */ + /* Get the minimum available NodeID */ NODE_ID_T get_min_valid_node_id() const { return (NODE_ID_T)256; } - /* 获取目前分配的最大NodeID */ - /* 由于目前node-group大小固定,而且分配后不会释放,因此可以直接通过已用的node-group算出来 */ + /* Get the currently allocated maximum NodeID */ + /* Since the current node-group size is fixed and will not be released after allocation, it can be calculated directly through the used node-group */ NODE_ID_T max_node_id() const { return nodegroup_info_->ni_used_ng * 256 - 1; @@ -184,11 +184,11 @@ class NGInfo { return errmsg_; } - //创建物理内存并格式化 + // Create physical memory and format int do_init(void); - //绑定到物理内存 + // Bind to physical memory int do_attach(MEM_HANDLE_T handle); - //脱离物理内存 + // Detach from physical memory int do_detach(void); protected: diff --git a/src/core/raw/raw_data.cc b/src/core/raw/raw_data.cc index 1aaf2d7a..ac6e55df 100644 --- a/src/core/raw/raw_data.cc +++ b/src/core/raw/raw_data.cc @@ -130,7 +130,7 @@ int RawData::init(uint8_t uchKeyIdx, int iKeySize, const char *pchKey, { int ks = iKeySize != 0 ? iKeySize : 1 + *(unsigned char *)pchKey; - /*|1字节:类型|4字节:数据大小|4字节: 行数| 1字节 : Get次数| 2字节: 最后访问时间| 2字节 : 最后更新时间|2字节: 最后创建时间 |key|*/ + /*|1 byte:type|4 bytes:data size|4 bytes: row count| 1 byte : Get count| 2 bytes: last access time| 2 bytes : last update time|2 bytes: last creation time |key|*/ uiDataSize += 2 + sizeof(uint32_t) * 2 + sizeof(uint16_t) * 3 + ks; handle_ = INVALID_HANDLE; @@ -381,7 +381,7 @@ int RawData::decode_row(RowValue &stRow, unsigned char &uchRowFlags, GET_VALUE(uchRowFlags, unsigned char); for (int j = key_index_ + 1; j <= stRow.num_fields(); - j++) //拷贝一行数据 + j++) //copy row data { if (stRow.table_definition()->is_discard(j)) continue; @@ -406,7 +406,7 @@ int RawData::decode_row(RowValue &stRow, unsigned char &uchRowFlags, } break; - case DField::Float: //浮点数 + case DField::Float: //float type if (likely(stRow.field_size(j) > (int)sizeof(float))) { GET_VALUE(stRow.field_value(j)->flt, double); } else { @@ -414,8 +414,8 @@ int RawData::decode_row(RowValue &stRow, unsigned char &uchRowFlags, } break; - case DField::String: //字符串 - case DField::Binary: //二进制数据 + case DField::String: //string type + case DField::Binary: //binary data default: { GET_VALUE(stRow.field_value(j)->bin.len, int); stRow.field_value(j)->bin.ptr = p_content_ + offset_; @@ -456,7 +456,7 @@ int RawData::get_expire_time(DTCTableDefinition *t, uint32_t &expire) SKIP_SIZE(sizeof(unsigned char)); //skip flag // the first field should be expire time for (int j = key_index_ + 1; j <= table_definition_->num_fields(); - j++) { //拷贝一行数据 + j++) { //copy row data if (j == expire_id_) { expire = *((uint32_t *)(p_content_ + offset_)); break; @@ -473,7 +473,7 @@ int RawData::get_expire_time(DTCTableDefinition *t, uint32_t &expire) ; break; - case DField::Float: //浮点数 + case DField::Float: //float type if (table_definition_->field_size(j) > (int)sizeof(float)) SKIP_SIZE(sizeof(double)); @@ -481,8 +481,8 @@ int RawData::get_expire_time(DTCTableDefinition *t, uint32_t &expire) SKIP_SIZE(sizeof(float)); break; - case DField::String: //字符串 - case DField::Binary: //二进制数据 + case DField::String: //string type + case DField::Binary: //binary data default: int iLen = 0; GET_VALUE(iLen, int); @@ -510,7 +510,7 @@ int RawData::get_lastcmod(uint32_t &lastcmod) SKIP_SIZE(sizeof(unsigned char)); //skip flag for (int j = key_index_ + 1; j <= table_definition_->num_fields(); - j++) //拷贝一行数据 + j++) //copy row data { //id: bug fix skip discard if (table_definition_->is_discard(j)) @@ -529,7 +529,7 @@ int RawData::get_lastcmod(uint32_t &lastcmod) ; break; - case DField::Float: //浮点数 + case DField::Float: //float type if (table_definition_->field_size(j) > (int)sizeof(float)) SKIP_SIZE(sizeof(double)); @@ -537,8 +537,8 @@ int RawData::get_lastcmod(uint32_t &lastcmod) SKIP_SIZE(sizeof(float)); break; - case DField::String: //字符串 - case DField::Binary: //二进制数据 + case DField::String: //string type + case DField::Binary: //binary data default: { int iLen = 0; GET_VALUE(iLen, int); @@ -621,7 +621,7 @@ ALLOC_SIZE_T RawData::calc_row_size(const RowValue &stRow, int keyIdx) if (keyIdx == -1) log4cplus_error("RawData may not init yet..."); ALLOC_SIZE_T tSize = 1; // flag - for (int j = keyIdx + 1; j <= stRow.num_fields(); j++) //拷贝一行数据 + for (int j = keyIdx + 1; j <= stRow.num_fields(); j++) //copy row data { if (stRow.table_definition()->is_discard(j)) continue; @@ -634,15 +634,15 @@ ALLOC_SIZE_T RawData::calc_row_size(const RowValue &stRow, int keyIdx) sizeof(int32_t); break; - case DField::Float: //浮点数 + case DField::Float: //float type tSize += likely(stRow.field_size(j) > (int)sizeof(float)) ? sizeof(double) : sizeof(float); break; - case DField::String: //字符串 - case DField::Binary: //二进制数据 + case DField::String: //string type + case DField::Binary: //binary data default: { tSize += sizeof(int); tSize += stRow.field_value(j)->bin.len; @@ -674,7 +674,7 @@ int RawData::encode_row(const RowValue &stRow, unsigned char uchOp, SET_VALUE(uchOp, unsigned char); for (int j = key_index_ + 1; j <= stRow.num_fields(); - j++) //拷贝一行数据 + j++) //copy row data { if (stRow.table_definition()->is_discard(j)) continue; @@ -696,15 +696,15 @@ int RawData::encode_row(const RowValue &stRow, unsigned char uchOp, SET_VALUE(v->u64, uint32_t); break; - case DField::Float: //浮点数 + case DField::Float: //float type if (likely(stRow.field_size(j) > (int)sizeof(float))) SET_VALUE(v->flt, double); else SET_VALUE(v->flt, float); break; - case DField::String: //字符串 - case DField::Binary: //二进制数据 + case DField::String: //string type + case DField::Binary: //binary data default: { SET_BIN_VALUE(v->bin.ptr, v->bin.len); break; @@ -771,7 +771,7 @@ int RawData::insert_n_rows(unsigned int uiNRows, const RowValue *pstRow, for (i = 0; i < uiNRows; i++) tSize += calc_row_size(pstRow[i], key_index_); - iRet = expand_chunk(tSize); // 先扩大buffer,避免后面insert失败回滚 + iRet = expand_chunk(tSize); // expand buffer first to avoid rollback if insert fails later if (iRet != 0) return (iRet); @@ -826,7 +826,7 @@ int RawData::skip_row(const RowValue &stRow) SKIP_SIZE(sizeof(unsigned char)); // flag for (int j = key_index_ + 1; j <= stRow.num_fields(); - j++) //拷贝一行数据 + j++) //copy row data { //id: bug fix skip discard if (stRow.table_definition()->is_discard(j)) @@ -842,15 +842,15 @@ int RawData::skip_row(const RowValue &stRow) ; break; - case DField::Float: //浮点数 + case DField::Float: //float type if (stRow.field_size(j) > (int)sizeof(float)) SKIP_SIZE(sizeof(double)); else SKIP_SIZE(sizeof(float)); break; - case DField::String: //字符串 - case DField::Binary: //二进制数据 + case DField::String: //string type + case DField::Binary: //binary data default: { int iLen; GET_VALUE(iLen, int); diff --git a/src/core/raw/raw_data.h b/src/core/raw/raw_data.h index 2ec04d5f..828fff4c 100644 --- a/src/core/raw/raw_data.h +++ b/src/core/raw/raw_data.h @@ -45,22 +45,22 @@ typedef enum _enum_oper_type_ { } TOperType; struct RawFormat { - unsigned char data_type_; // 数据类型EnumDataType - uint32_t data_size_; // 数据总大小 - uint32_t row_count_; // 行数 - uint8_t get_request_count_; // get次数 - uint16_t latest_request_time_; // 最近访问时间 - uint16_t latest_update_time_; // 最近更新时间 - uint16_t create_time_; // 创建时间 - char p_key_[0]; // key - char p_rows_data_[0]; // 行数据 + unsigned char data_type_; // Data type EnumDataType + uint32_t data_size_; // Total data size + uint32_t row_count_; // Number of rows + uint8_t get_request_count_; // Get request count + uint16_t latest_request_time_; // Latest access time + uint16_t latest_update_time_; // Latest update time + uint16_t create_time_; // Creation time + char p_key_[0]; // Key + char p_rows_data_[0]; // Row data } __attribute__((packed)); -// 注意:修改操作可能会导致handle改变,因此需要检查重新保存 +// Note: Modification operations may cause handle changes, so it's necessary to check and save again class RawData { private: - char *p_content_; // 注意:地址可能会因为realloc而改变 - uint32_t data_size_; // 包括data_type,data_size,rowcnt,key,rows等总数据大小 + char *p_content_; // Note: Address may change due to realloc + uint32_t data_size_; // Total data size including data_type, data_size, rowcnt, key, rows, etc. uint32_t row_count_; uint8_t key_index_; int key_size_; @@ -80,7 +80,7 @@ class RawData { uint16_t latest_request_time_; uint16_t latest_update_time_; uint16_t create_time_; - ALLOC_SIZE_T need_new_bufer_size; // 最近一次分配内存失败需要的大小 + ALLOC_SIZE_T need_new_bufer_size; // Size needed for the most recent failed memory allocation MEM_HANDLE_T handle_; uint64_t size_; @@ -109,9 +109,9 @@ class RawData { public: /************************************************* - Description: 构造函数 - Input: pstMalloc 内存分配器 - iAutoDestroy 析构的时候是否自动释放内存 + Description: Constructor + Input: pstMalloc Memory allocator + iAutoDestroy Whether to automatically free memory during destruction Output: Return: *************************************************/ @@ -130,13 +130,13 @@ class RawData { } /************************************************* - Description: 新分配一块内存,并初始化 - Input: uchKeyIdx 作为key的字段在table里的下标 - iKeySize key的格式,0为变长,非0为定长长度 - pchKey 为格式化后的key,变长key的第0字节为长度 - uiDataSize 为数据的大小,用于一次分配足够大的chunk。如果设置为0,则insert row的时候再realloc扩大 + Description: Allocate a new block of memory and initialize it + Input: uchKeyIdx Index of the field used as key in the table + iKeySize Key format, 0 for variable length, non-zero for fixed length + pchKey Formatted key, for variable length key, byte 0 is the length + uiDataSize Data size, used to allocate a sufficiently large chunk at once. If set to 0, realloc will expand during insert row Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int init(uint8_t uchKeyIdx, int iKeySize, const char *pchKey, ALLOC_SIZE_T uiDataSize = 0, int laid = -1, int expireid = -1, @@ -144,22 +144,22 @@ class RawData { int do_init(const char *pchKey, ALLOC_SIZE_T uiDataSize = 0); /************************************************* - Description: attach一块已经格式化好的内存 - Input: hHandle 内存的句柄 - uchKeyIdx 作为key的字段在table里的下标 - iKeySize key的格式,0为变长,非0为定长长度 + Description: Attach to a block of pre-formatted memory + Input: hHandle Memory handle + uchKeyIdx Index of the field used as key in the table + iKeySize Key format, 0 for variable length, non-zero for fixed length Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int do_attach(MEM_HANDLE_T hHandle, uint8_t uchKeyIdx, int iKeySize, int laid = -1, int lastcmod = -1, int expireid = -1); int do_attach(MEM_HANDLE_T hHandle); /************************************************* - Description: 获取内存块的句柄 + Description: Get the memory block handle Input: Output: - Return: 句柄。 注意:任何修改操作可能会导致handle改变,因此需要检查重新保存 + Return: Handle. Note: Any modification operation may cause handle changes, so it's necessary to check and save again *************************************************/ MEM_HANDLE_T get_handle() { @@ -172,8 +172,8 @@ class RawData { } /************************************************* - Description: 设置一个refrence,在调用CopyRow()或者CopyAll()的时候使用 - Input: pstRef refrence指针 + Description: Set a reference, used when calling CopyRow() or CopyAll() + Input: pstRef Reference pointer Output: Return: *************************************************/ @@ -183,10 +183,10 @@ class RawData { } /************************************************* - Description: 包括key、rows等所有内存的大小 + Description: Size of all memory including key, rows, etc. Input: Output: - Return: 所有内存的大小 + Return: Total size of all memory *************************************************/ uint32_t data_size() const { @@ -194,10 +194,10 @@ class RawData { } /************************************************* - Description: rows的开始偏移量 + Description: Starting offset of rows Input: Output: - Return: rows的开始偏移量 + Return: Starting offset of rows *************************************************/ uint32_t data_start() const { @@ -205,10 +205,10 @@ class RawData { } /************************************************* - Description: 内存分配失败时,返回所需要的内存大小 + Description: Return the required memory size when memory allocation fails Input: Output: - Return: 返回所需要的内存大小 + Return: Return the required memory size *************************************************/ ALLOC_SIZE_T need_size() { @@ -216,18 +216,18 @@ class RawData { } /************************************************* - Description: 计算插入该行所需要的内存大小 - Input: stRow 行数据 + Description: Calculate the memory size required for inserting this row + Input: stRow Row data Output: - Return: 返回所需要的内存大小 + Return: Return the required memory size *************************************************/ ALLOC_SIZE_T calc_row_size(const RowValue &stRow, int keyIndex); /************************************************* - Description: 获取格式化后的key + Description: Get the formatted key Input: Output: - Return: 格式化后的key + Return: Formatted key *************************************************/ const char *key() const { @@ -239,10 +239,10 @@ class RawData { } /************************************************* - Description: 获取key的格式 + Description: Get the key format Input: Output: - Return: 变长返回0,定长key返回定长的长度 + Return: Returns 0 for variable length, returns fixed length for fixed-length key *************************************************/ int key_format() const { @@ -250,10 +250,10 @@ class RawData { } /************************************************* - Description: 获取key的实际长度 + Description: Get the actual length of the key Input: Output: - Return: key的实际长度 + Return: Actual length of the key *************************************************/ int key_size(); @@ -268,126 +268,126 @@ class RawData { } /************************************************* - Description: 销毁释放内存 + Description: Destroy and free memory Input: Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int destory(); /************************************************* - Description: 释放多余的内存(通常在delete一些row后调用一次) + Description: Free excess memory (usually called once after deleting some rows) Input: Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int strip_mem(); /************************************************* - Description: 读取一行数据 + Description: Read one row of data Input: - Output: stRow 保存行数据 - uchRowFlags 行数据是否脏数据等flag - iDecodeFlag 是否只是pre-read,不fetch_row移动指针 - Return: 0为成功,非0失败 + Output: stRow Stores row data + uchRowFlags Flags for whether row data is dirty, etc. + iDecodeFlag Whether it's just pre-read, without fetch_row moving pointer + Return: 0 for success, non-zero for failure *************************************************/ int decode_row(RowValue &stRow, unsigned char &uchRowFlags, int iDecodeFlag = 0); /************************************************* - Description: 插入一行数据 - Input: stRow 需要插入的行数据 + Description: Insert one row of data + Input: stRow Row data to be inserted Output: - byFirst 是否插入到最前面,默认添加到最后面 - isDirty 是否脏数据 - Return: 0为成功,非0失败 + byFirst Whether to insert at the front, default is to add at the end + isDirty Whether it's dirty data + Return: 0 for success, non-zero for failure *************************************************/ int insert_row(const RowValue &stRow, bool byFirst, bool isDirty); /************************************************* - Description: 插入一行数据 - Input: stRow 需要插入的行数据 + Description: Insert one row of data + Input: stRow Row data to be inserted Output: - byFirst 是否插入到最前面,默认添加到最后面 - uchOp row的标记 - Return: 0为成功,非0失败 + byFirst Whether to insert at the front, default is to add at the end + uchOp Row flag + Return: 0 for success, non-zero for failure *************************************************/ int insert_row_flag(const RowValue &stRow, bool byFirst, unsigned char uchOp); /************************************************* - Description: 插入若干行数据 - Input: uiNRows 行数 - stRow 需要插入的行数据 + Description: Insert multiple rows of data + Input: uiNRows Number of rows + stRow Row data to be inserted Output: - byFirst 是否插入到最前面,默认添加到最后面 - isDirty 是否脏数据 - Return: 0为成功,非0失败 + byFirst Whether to insert at the front, default is to add at the end + isDirty Whether it's dirty data + Return: 0 for success, non-zero for failure *************************************************/ int insert_n_rows(unsigned int uiNRows, const RowValue *pstRow, bool byFirst, bool isDirty); /************************************************* - Description: 用指定数据替换当前行 - Input: stRow 新的行数据 + Description: Replace current row with specified data + Input: stRow New row data Output: - isDirty 是否脏数据 - Return: 0为成功,非0失败 + isDirty Whether it's dirty data + Return: 0 for success, non-zero for failure *************************************************/ int replace_cur_row(const RowValue &stRow, bool isDirty); /************************************************* - Description: 删除当前行 - Input: stRow 仅使用row的字段类型等信息,不需要实际数据 + Description: Delete current row + Input: stRow Only uses field type information from row, no actual data needed Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int delete_cur_row(const RowValue &stRow); /************************************************* - Description: 删除所有行 + Description: Delete all rows Input: Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int delete_all_rows(); /************************************************* - Description: 设置当前行的标记 - Input: uchFlag 行的标记 + Description: Set the flag for current row + Input: uchFlag Row flag Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int set_cur_row_flag(unsigned char uchFlag); /************************************************* - Description: 从refrence copy当前行到本地buffer末尾 + Description: Copy current row from reference to end of local buffer Input: Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int copy_row(); /************************************************* - Description: 用refrence的数据替换本地数据 + Description: Replace local data with reference data Input: Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int copy_all(); /************************************************* - Description: 添加N行已经格式化好的数据到末尾 + Description: Append N rows of pre-formatted data to the end Input: Output: - Return: 0为成功,非0失败 + Return: 0 for success, non-zero for failure *************************************************/ int append_n_records(unsigned int uiNRows, const char *pchData, const unsigned int uiLen); /************************************************* - Description: 更新最后访问时间戳 - Input: 时间戳 + Description: Update last access timestamp + Input: Timestamp Output: Return: *************************************************/ @@ -398,8 +398,8 @@ class RawData { } int get_expire_time(DTCTableDefinition *t, uint32_t &expire); /************************************************* - Description: 获取最后需改时间 - Input: 时间戳 + Description: Get last modification time + Input: Timestamp Output: Return: *************************************************/ @@ -408,52 +408,52 @@ class RawData { int size); /************************************************* - Description: 初始化时间戳,包括最后访问时间 - 、最后更新时间、创建时间三部分 - Input: 时间戳(以某个绝对事件为开始的小时数) - 虽然名字为Update,其实只会被调用一次 + Description: Initialize timestamp, including last access time, + last update time, and creation time + Input: Timestamp (hours since some absolute event) + Although named Update, it's actually only called once tomchen *************************************************/ void init_timp_stamp(); /************************************************* - Description: 更新节点最后访问时间 - Input: 时间戳(以某个绝对事件为开始的小时数) + Description: Update node's last access time + Input: Timestamp (hours since some absolute event) tomchen *************************************************/ void update_last_access_time_by_hour(); /************************************************* - Description: 更新节点最后更新时间 - Input: 时间戳(以某个绝对事件为开始的小时数) + Description: Update node's last update time + Input: Timestamp (hours since some absolute event) tomchen *************************************************/ void update_last_update_time_by_hour(); /************************************************* - Description: 增加节点被select请求的次数 + Description: Increment the number of select requests for the node tomchen *************************************************/ void inc_select_count(); /************************************************* - Description: 获取节点创建时间 + Description: Get node creation time tomchen *************************************************/ uint32_t get_create_time_by_hour(); /************************************************* - Description: 获取节点最后访问时间 + Description: Get node's last access time tomchen *************************************************/ uint32_t get_last_access_time_by_hour(); /************************************************* - Description: 获取节点最后更新时间 + Description: Get node's last update time tomchen *************************************************/ uint32_t get_last_update_time_by_hour(); /************************************************* - Description: 获取节点被select操作的次数 + Description: Get the number of select operations on the node tomchen *************************************************/ uint32_t get_select_op_count(); /************************************************* - Description: attach上时间戳 + Description: Attach timestamp tomchen *************************************************/ void attach_time_stamp(); diff --git a/src/core/tree/tree_data_process.cc b/src/core/tree/tree_data_process.cc index 1ca49237..32d39734 100644 --- a/src/core/tree/tree_data_process.cc +++ b/src/core/tree/tree_data_process.cc @@ -207,7 +207,7 @@ int TreeDataProcess::do_append(DTCJobOperation &job_op, Node *p_node, snprintf(err_message_, sizeof(err_message_), "tree-data insert row error: %.*s,%d", (int)available_space, err_msg ? err_msg : "unknown error", iRet); - /*标记加入黑名单*/ + /* Mark to add to blacklist */ job_op.push_black_list_size(m_stTreeData.need_size()); return (-2); } @@ -436,7 +436,7 @@ int TreeDataProcess::do_replace_all(DTCJobOperation &job_op, Node *p_node) snprintf(err_message_, sizeof(err_message_), "raw-data init error: %.*s", (int)available_space, err_msg ? err_msg : "unknown error"); - /*标记加入黑名单*/ + /* Mark to add to blacklist */ job_op.push_black_list_size(m_stTreeData.need_size()); p_buffer_pond_->purge_node(job_op.packed_key(), *p_node); return (-2); @@ -502,7 +502,7 @@ int TreeDataProcess::do_replace_all(DTCJobOperation &job_op, Node *p_node) "raw-data insert row error: ret=%d,err=%.*s, cnt=%d", iRet, (int)available_space, err_msg ? err_msg : "unknown error", try_purge_count); - /*标记加入黑名单*/ + /* Mark to add to blacklist */ job_op.push_black_list_size(all_rows_size); p_buffer_pond_->purge_node(job_op.packed_key(), *p_node); @@ -587,9 +587,9 @@ int TreeDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, RowValue stNewRow(stpTaskTab); stNewRow.default_value(); stpNewRow = &stNewRow; - job_op.update_row(*stpNewRow); //获取Replace的行 + job_op.update_row(*stpNewRow); // Get Replace row iRet = m_stTreeData.insert_row(*stpNewRow, KeyCompare, - async); // 加进cache + async); // Add to cache if (iRet == EC_NO_MEM) { if (p_buffer_pond_->try_purge_size( m_stTreeData.need_size(), *p_node) == 0) @@ -605,7 +605,7 @@ int TreeDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, snprintf(err_message_, sizeof(err_message_), "raw-data replace row error: %d, %.*s", iRet, (int)available_space, err_msg ? err_msg : "unknown error"); - /*标记加入黑名单*/ + /* Mark to add to blacklist */ job_op.push_black_list_size(m_stTreeData.need_size()); return (-3); } @@ -617,7 +617,7 @@ int TreeDataProcess::do_replace(DTCJobOperation &job_op, Node *p_node, if (async == true || setrows == true) { job_op.resultInfo.set_affected_rows(ullAffectedRows); } else if (ullAffectedRows != job_op.resultInfo.affected_rows()) { - //如果cache更新纪录数和helper更新的纪录数不相等 + // If the number of cache updated records is not equal to the number of helper updated records log4cplus_debug( "unequal affected rows, cache[%lld], helper[%lld]", (long long)ullAffectedRows, @@ -668,7 +668,7 @@ int TreeDataProcess::do_update(DTCJobOperation &job_op, Node *p_node, if (async == true || setrows == true) { job_op.resultInfo.set_affected_rows(ullAffectedRows); } else if (ullAffectedRows != job_op.resultInfo.affected_rows()) { - //如果cache更新纪录数和helper更新的纪录数不相等 + // If the number of cache updated records is not equal to the number of helper updated records log4cplus_debug( "unequal affected rows, cache[%lld], helper[%lld]", (long long)ullAffectedRows, diff --git a/src/hwcserver/async_file.cc b/src/hwcserver/async_file.cc index 079bd5c5..91cbe167 100644 --- a/src/hwcserver/async_file.cc +++ b/src/hwcserver/async_file.cc @@ -27,7 +27,7 @@ void CMapBase::unmount() void CMapBase::Unlink() { /* - * 读完后,truncate文件为0并删除,防止启动磁盘flush + * After reading, truncate file to 0 and delete to prevent disk flush on startup */ if (_rw == O_RDONLY) { //int unused; @@ -171,7 +171,7 @@ int CAsyncFileWriter::Open() } /* - * 加入writer的map文件列表 + * Add to writer's map file list */ AddToList(p); @@ -185,12 +185,12 @@ int CAsyncFileWriter::Write(buffer & buf) "__BUG__, writer maps is zero"); return CHBGlobal::ERR_ASYNC_WRITER_LOGIC; } - //从缓冲中取一个文件来写 + // Take a file from buffer to write int ret = _asyncfiles.front()->Input(buf); switch (ret) { case CHBGlobal::ASYNC_PROCESS_OK: { - //成功写入 更新控制文件写指针 + // Successfully written, update control file write pointer _controller.WriterPos() = _asyncfiles.front()->CurrentPos(); break; @@ -198,7 +198,7 @@ int CAsyncFileWriter::Write(buffer & buf) case CHBGlobal::ASYNC_NEED_SWTICH_FILE: { - //已经写满,需要切换, 先准备下一个文件,再切换。 + // Already full, need to switch, prepare next file first, then switch CAsyncFilePos pos = _controller.WriterPos(); pos.Shift(); @@ -211,13 +211,13 @@ int CAsyncFileWriter::Write(buffer & buf) DELETE(p); return CHBGlobal::ERR_ASYNC_SWTICH_FILE_ERR; } - //加入缓冲 + // Add to buffer AddToList(p); - //更新控制文件 + // Update control file _controller.SwitchWriterPos(); - //继续写 + // Continue writing return Write(buf); break; } @@ -264,18 +264,18 @@ int CAsyncFileReader::Read(buffer & buff) Commit(); - /* 判断是否出现切文件暂态,如果出现则sespend读者 */ + /* Check if file switching transient state occurs, if so suspend reader */ if(_controller.ReaderPos().IsTransient(_controller.WriterPos())){ return CHBGlobal::ASYNC_READER_WAIT_DATA; } - /* 暂时没有更多数据 */ + /* Temporarily no more data */ if (_controller.ReaderPos().EQ(_controller.WriterPos())) return CHBGlobal::ASYNC_READER_WAIT_DATA; /* ERROR */ if( _controller.ReaderPos().GT(_controller.WriterPos())) { - /* 害怕再次遇到切换暂态 */ + /* Afraid of encountering switching transient state again */ usleep(1000); if( _controller.ReaderPos().GT(_controller.WriterPos())) { snprintf(_errmsg, sizeof(_errmsg), "reader pos is overflow"); @@ -291,7 +291,7 @@ int CAsyncFileReader::Read(buffer & buff) // mark as processing, delay commit _processing = 1; - //更新控制文件读指针 + // Update control file read pointer //_controller.ReaderPos() = _asyncfile->CurrentPos(); break; } @@ -337,13 +337,13 @@ int CAsyncFileChecker::Check() return CHBGlobal::ERR_FULL_SYNC_NOT_COMPLETE; } - /* 检查reader是否比write快 */ + /* Check if reader is faster than writer */ if (_controller.ReaderPos().GT(_controller.WriterPos())) { snprintf(_errmsg, sizeof(_errmsg), "reader pos is overflow"); return CHBGlobal::ERR_ASYNC_READER_OVERFLOW; } - /*检查reader的有效性 */ + /* Check reader validity */ if (!_controller.ReaderPos().Zero()) { _asyncfile = new CAsyncFileImpl; if (_asyncfile->OpenForReader(_controller.ReaderPos())) { @@ -362,7 +362,7 @@ int CAsyncFileChecker::Check() DELETE(_asyncfile); - /*检查writer有效性 */ + /* Check writer validity */ if (!_controller.WriterPos().Zero()) { _asyncfile = new CAsyncFileImpl; if (_asyncfile->OpenForWriter(_controller.WriterPos())) { @@ -384,7 +384,7 @@ int CAsyncFileChecker::Check() } /* - * 测试代码 + * Test code */ #ifdef __UNIT_TEST__ @@ -451,7 +451,7 @@ int main() nice(5); W(); } else { - //先让writer跑起来, 否则没有文件,reader会出错 + // Let writer run first, otherwise there's no file and reader will error sleep(3); R(); } diff --git a/src/hwcserver/comm.cc b/src/hwcserver/comm.cc index ed91ad8b..72343388 100644 --- a/src/hwcserver/comm.cc +++ b/src/hwcserver/comm.cc @@ -176,7 +176,7 @@ int CComm::check_hb_status() int CComm::fixed_hb_env() { - /* FIXME: 简单删除,后续再考虑如何恢复 */ + /* FIXME: Simple deletion, consider how to restore later */ if (system("cd ../bin/ && ./hb_fixed_env.sh hbp")) { log4cplus_error("invoke hb_fixed_env.sh hbp failed, %m"); return -1; @@ -199,7 +199,7 @@ int CComm::fixed_slave_env() return 0; } -/* 确保hbp唯一, 锁住hbp的控制文件目录 */ +/* Ensure hbp uniqueness, lock hbp's control file directory */ int CComm::uniq_lock(const char *p) { if (access(p, F_OK | X_OK)) diff --git a/src/hwcserver/daemon.cc b/src/hwcserver/daemon.cc index 3a4944e9..0dcf3d19 100644 --- a/src/hwcserver/daemon.cc +++ b/src/hwcserver/daemon.cc @@ -67,7 +67,7 @@ int DaemonBase::DaemonStart(int back) int DaemonBase::DaemonWait() { int status; - //任何一个子进程退出,整个程序退出 + //Any child process exits, entire program exits while (wait(&status) == -1 && !DaemonBase::_stop) ; return 0; } diff --git a/src/hwcserver/hwc_binlog_state.cc b/src/hwcserver/hwc_binlog_state.cc index bcfa6dbf..9c77d21e 100644 --- a/src/hwcserver/hwc_binlog_state.cc +++ b/src/hwcserver/hwc_binlog_state.cc @@ -27,7 +27,7 @@ void BinlogState::Exit() void BinlogState::HandleEvent() { - // 获取本机dtc 写请求 + // Get local dtc write requests switch (CComm::registor.Regist()) { case -DTC::EC_FULL_SYNC_STAGE: diff --git a/src/hwcserver/hwc_sync_unit.cc b/src/hwcserver/hwc_sync_unit.cc index 123b1538..a49b9f24 100644 --- a/src/hwcserver/hwc_sync_unit.cc +++ b/src/hwcserver/hwc_sync_unit.cc @@ -87,7 +87,7 @@ int HwcSync::get_current_time() int HwcSync::Run() { - /* 先关闭连接,防止fd重路 */ + /* Close connection first to prevent fd redirection */ p_master_->Close(); int i_sec = get_current_time() + 1; while (true) { @@ -117,20 +117,20 @@ int HwcSync::Run() log4cplus_error("master report journalID is not match"); } - // 重试 + // Retry if (0 != ret) { log4cplus_warning("fetch key-list from master, limit[%d], ret=%d, err=%s", i_limit_, ret, result_m.ErrorMessage()); usleep(100); continue; } - // 写请求 插入 冷数据库 + // Write request insert into cold database for (int i = 0; i < result_m.NumRows(); ++i) { ret = result_m.FetchRow(); if (ret < 0) { log4cplus_error("fetch key-list from master failed, limit[%d], ret=%d, err=%s", i_limit_, ret, result_m.ErrorMessage()); - // dtc可以运行失败 + // dtc can run with failure return E_HWC_SYNC_DTC_ERROR; } @@ -198,7 +198,7 @@ int HwcSync::Run() const RowValue* p_hot_raw = p_hot_result.fetch_row(); bool b_check = false; - // 冷数据库为base,只要冷数据库中没有热的,就插入 + // Cold database as base, insert if cold database doesn't have hot data for (int j = 0; j < p_cold_res->total_rows(); j++) { const RowValue* p_cold_raw = p_cold_res->fetch_row(); if(p_hot_raw->Compare(*p_cold_raw , @@ -211,7 +211,7 @@ int HwcSync::Run() } if (!b_check) { - // 对账失败,执行sql语句 ,容错逻辑 + // Account verification failed, execute sql statement, error tolerance logic log4cplus_info("check: need insert in cold table"); sql_statement_query(astKey, s_sql); break; @@ -224,7 +224,7 @@ int HwcSync::Run() continue; } } - // 成功,则更新控制文件中的journalID + // Success, update journalID in control file o_journal_id_ = (uint64_t)result_m.HotBackupID(); log4cplus_info("end serial:%d , offset:%d" , o_journal_id_.serial , o_journal_id_.offset); CComm::registor.JournalId() = o_journal_id_; @@ -233,7 +233,7 @@ int HwcSync::Run() return E_HWC_SYNC_NORMAL_EXIT; } -//***************************分割线*************************** +//***************************Separator*************************** HwcSyncUnit::HwcSyncUnit() : p_hwc_sync_(NULL) { } diff --git a/src/hwcserver/registor.cc b/src/hwcserver/registor.cc index ac19daa2..bc3864b3 100644 --- a/src/hwcserver/registor.cc +++ b/src/hwcserver/registor.cc @@ -6,7 +6,7 @@ int CRegistor::Regist() { DTC::SvrAdminRequest rq(_master); rq.SetAdminCode(DTC::RegisterHB); - // 发送自己的JournalID + // Send own JournalID JournalID self = _controller.JournalId(); log4cplus_info("registed to master, master[serial=%u, offset=%u]", self.serial , self.offset); diff --git a/src/hwcserver/registor.h b/src/hwcserver/registor.h index 1475988d..98882d80 100644 --- a/src/hwcserver/registor.h +++ b/src/hwcserver/registor.h @@ -56,11 +56,11 @@ class CRegistor { int GetSyncStaus() { return _controller.GetDirty(); } /* - * 定期检查双方的共享内存,确保二者始终没有变化过。 + * Periodically check both parties' shared memory to ensure they have never changed. * - * 如果slave上记录的内存创建时间和master共享内存 - * 创建时间相同,证明二者的内存自创建以来,没有 - * 被删除过,返回0, 否则返回1 + * If the memory creation time recorded on slave is the same as master's shared memory + * creation time, it proves that neither party's memory has been + * deleted since creation, return 0, otherwise return 1 */ int CheckMemoryCreateTime() { int64_t v0; @@ -90,8 +90,8 @@ class CRegistor { #endif /* - * 设置hbp状态为 "全量同步未完成" - * 当hbp出现任何不可恢复的错误时,应该invoke这个接口 + * Set hbp status to "full sync incomplete" + * When hbp encounters any unrecoverable error, should invoke this interface * */ // void SetHBPStatusDirty() { diff --git a/src/libs/api/cc_api/include/dtcapi.h b/src/libs/api/cc_api/include/dtcapi.h index 74635ccb..e84c77a8 100644 --- a/src/libs/api/cc_api/include/dtcapi.h +++ b/src/libs/api/cc_api/include/dtcapi.h @@ -76,7 +76,7 @@ namespace DTC { void init_log (const char *app, const char *dir = NULL); void set_log_level(int n); - int set_key_value_max(unsigned int count); // 设置批量操作一次最多多少个key(默认最多32个) + int set_key_value_max(unsigned int count); // Set maximum number of keys for batch operations (default max 32) #ifndef WIN32 void write_log (int level, const char*file, const char *func, int lineno, @@ -473,7 +473,7 @@ namespace DTC { #undef _REDIR_ const char *ErrorMessage(void) const; - //无源模式超时时间 add by xuxinxin, 2014/12/09 + //No-source mode timeout add by xuxinxin, 2014/12/09 int SetExpireTime(const char* key, int time); int GetExpireTime(const char* key); }; diff --git a/src/libs/common/blacklist/blacklist.cc b/src/libs/common/blacklist/blacklist.cc index 6cb2c19c..5dad56f7 100644 --- a/src/libs/common/blacklist/blacklist.cc +++ b/src/libs/common/blacklist/blacklist.cc @@ -133,7 +133,7 @@ int BlackList::try_expired_blacklist(void) return 0; } -/* TODO: 统计top10 */ +/* TODO: Count top10 */ void BlackList::stat_everything(const struct blslot *slot, const int add) { /* add */ diff --git a/src/libs/common/client/client_unit.cc b/src/libs/common/client/client_unit.cc index c1644d38..c13a7e48 100644 --- a/src/libs/common/client/client_unit.cc +++ b/src/libs/common/client/client_unit.cc @@ -101,7 +101,7 @@ int DTCDecoderUnit::process_stream(int newfd, int req, void *peer, int peerSize) return -1; } - /* accept唤醒后立即recv */ + /* Immediately recv after accept wakeup */ cli->input_notify(); } else { ClientAsync *cli = @@ -120,7 +120,7 @@ int DTCDecoderUnit::process_stream(int newfd, int req, void *peer, int peerSize) return -1; } - /* accept唤醒后立即recv */ + /* Immediately recv after accept wakeup */ cli->input_notify(); } return 0; diff --git a/src/libs/common/config/dbconfig.cc b/src/libs/common/config/dbconfig.cc index 54e55f4c..63c3c07f 100644 --- a/src/libs/common/config/dbconfig.cc +++ b/src/libs/common/config/dbconfig.cc @@ -68,7 +68,7 @@ static int ParseDbLine(const char *buf, uint16_t *dbIdx) return n; } -/* 前置空格已经过滤了 */ +/* Leading spaces have been filtered out */ static char *skip_blank(char *p) { char *iter = p; @@ -167,7 +167,7 @@ int DbConfig::load_key_hash(DTCConfig *raw) const char *iter = strchr(var.c_str(), '('); if (NULL == iter) { /* - * 按照整个buffer来处理 + * Process according to entire buffer */ keyHashConfig.keyHashLeftBegin = 1; keyHashConfig.keyHashRightBegin = -1; @@ -190,7 +190,7 @@ int DbConfig::load_key_hash(DTCConfig *raw) keyHashConfig.keyHashRightBegin = -1; } - /* 过滤fun中的空格*/ + /* Filter spaces in function */ fun = skip_blank(fun); void *dll = dlopen(so.c_str(), RTLD_NOW | RTLD_GLOBAL); diff --git a/src/libs/common/config/dbconfig.h b/src/libs/common/config/dbconfig.h index 9e1ca98c..ffa6df20 100644 --- a/src/libs/common/config/dbconfig.h +++ b/src/libs/common/config/dbconfig.h @@ -36,10 +36,10 @@ #define DB_FIELD_FLAGS_HAS_DEFAULT 0x20 #define DB_FIELD_FLAGS_NULLABLE 0x40 -/* 默认key-hash so文件名及路径 */ +/* Default key-hash so filename and path */ #define DEFAULT_KEY_HASH_SO_NAME "../lib/key-hash.so" #define DEFAULT_KEY_HASH_FUNCTION "StringHash(1,128)" -/* key-hash接口函数 */ +/* key-hash interface function */ typedef uint64_t (*key_hash_interface)(const char *key, int len, int left, int right); @@ -87,8 +87,8 @@ struct FieldConfig { struct KeyHash { int keyHashEnable; - int keyHashLeftBegin; /* buff 的左起始位置 */ - int keyHashRightBegin; /* buff 的右起始位置 */ + int keyHashLeftBegin; /* Left start position of buffer */ + int keyHashRightBegin; /* Right start position of buffer */ key_hash_interface keyHashFunction; }; diff --git a/src/libs/common/config/parse_cluster_config.cc b/src/libs/common/config/parse_cluster_config.cc index 488fd1a1..be023203 100644 --- a/src/libs/common/config/parse_cluster_config.cc +++ b/src/libs/common/config/parse_cluster_config.cc @@ -36,7 +36,7 @@ bool parse_cluster_config(std::string &strSelfName, int len) { log4cplus_debug("%.*s", len, buf); - //配置中不允许有相同servername的节点出现,本set用于检查重复servername + // Configuration does not allow nodes with same servername to appear, this set is used to check duplicate servername std::set filter; @@ -98,7 +98,7 @@ bool parse_cluster_config(std::string &strSelfName, return true; } -//读取配置文件 +// Read configuration file bool parse_cluster_config(std::vector *result) { bool bResult = false; @@ -180,7 +180,7 @@ bool parse_cluster_config(std::string &strSelfName, return true; } -//保存vector到配置文件 +// Save vector to configuration file bool save_cluster_config(std::vector *result, std::string &strSelfName) { @@ -199,14 +199,14 @@ bool save_cluster_config(std::vector *result, return xml.Save(CLUSTER_CONFIG_FILE); } -//检查是否有配置文件,如果没有则生成配置文件 +// Check if configuration file exists, if not then generate configuration file bool check_and_create(const char *filename) { if (filename == NULL) filename = CLUSTER_CONFIG_FILE; if (access(filename, F_OK)) { - //配置文件不存在,创建配置文件 + // Configuration file does not exist, create configuration file if (errno == ENOENT) { log4cplus_info("%s didn't exist,create it.", filename); MarkupSTL xml; diff --git a/src/libs/common/connector/connector_client.cc b/src/libs/common/connector/connector_client.cc index 4ff33ebf..c6dc4329 100644 --- a/src/libs/common/connector/connector_client.cc +++ b/src/libs/common/connector/connector_client.cc @@ -41,7 +41,7 @@ ConnectorClient::ConnectorClient(EpollOperation *o, ConnectorGroup *hg, int idx supportBatchKey = 0; connectErrorCnt = 0; ready = 0; - Ready(); // 开始默认可用 + Ready(); // Start with default availability } ConnectorClient::~ConnectorClient() diff --git a/src/libs/common/connector/connector_group.cc b/src/libs/common/connector/connector_group.cc index cd5dc26a..e30d4e71 100644 --- a/src/libs/common/connector/connector_group.cc +++ b/src/libs/common/connector/connector_group.cc @@ -86,7 +86,7 @@ ConnectorGroup::ConnectorGroup(const char *s, const char *name_, int hc, int qs, int statIndex , int i_has_hwc) : JobAskInterface(NULL), queueSize(qs), helperCount(0), helperMax(hc), readyHelperCnt(0), fallback(NULL), - average_delay(0),/*默认时延为0*/ + average_delay(0), /* Default delay is 0 */ hblogoutput_(owner), writeBinlogReply(), i_has_hwc_(i_has_hwc) @@ -263,7 +263,7 @@ void ConnectorGroup::record_process_time(int cmd, unsigned int usec) if (t) statTime[t].push(usec); - /* 计算新的平均时延 */ + /* Calculate new average delay */ record_response_delay(usec); } @@ -404,7 +404,7 @@ int ConnectorGroup::accept_new_request_fail(DTCJobOperation *job) unsigned work_client = helperMax; unsigned queue_size = queue.Count(); - /* queue至少排队work_client个任务 */ + /* Queue should have at least work_client tasks */ if (queue_size <= work_client) return 0; @@ -455,7 +455,7 @@ void ConnectorGroup::job_ask_procedure(DTCJobOperation *job) if (fallback && fallback->has_free_helper()) { fallback->process_task(job); } else if (accept_new_request_fail(job)) { - /* helper 响应变慢,主动踢掉task */ + /* Helper response slowing down, actively drop task */ log4cplus_debug( "ConnectorGroup response is slow, give up current job"); IncHelperExpireCount(); @@ -491,7 +491,7 @@ void ConnectorGroup::dump_state(void) void ConnectorGroup::group_notify_helper_reload_config(DTCJobOperation *job) { - //进入到这一步,helper应该是全部处于空闲状态的 + // At this step, helper should all be in idle state if (!freeHelper.ListEmpty()) process_task(job); else if (fallback && fallback->has_free_helper()) diff --git a/src/libs/common/connector/connector_group.h b/src/libs/common/connector/connector_group.h index 9d9f6839..062c0000 100644 --- a/src/libs/common/connector/connector_group.h +++ b/src/libs/common/connector/connector_group.h @@ -141,19 +141,19 @@ class ConnectorGroup : private TimerObject, public: void record_process_time(int type, unsigned int msec); - /* queue当前长度 */ + /* Current queue length */ int queue_count(void) const { return queue.Count(); } - /* queue最大长度*/ + /* Maximum queue length */ int queue_max_count(void) const { return queueSize; } private: - /* 平均请求时延 */ + /* Average request delay */ double average_delay; StatSample statTime[6]; diff --git a/src/libs/common/consistent_hash_selector.cc b/src/libs/common/consistent_hash_selector.cc index 217d2f49..eedc7670 100644 --- a/src/libs/common/consistent_hash_selector.cc +++ b/src/libs/common/consistent_hash_selector.cc @@ -51,7 +51,7 @@ void ConsistentHashSelector::add_node(const char *name) uint32_t value = Hash(buf, strlen(buf)); std::map::iterator iter = m_nodes.find(value); if (iter != m_nodes.end()) { - //hash值冲突,选取字符串中较小者 + // Hash value conflict, select the smaller string if (m_nodeNames[iter->second] < name) continue; } diff --git a/src/libs/common/daemon/daemon_wait.cc b/src/libs/common/daemon/daemon_wait.cc index 9d2f87bf..4b717da7 100644 --- a/src/libs/common/daemon/daemon_wait.cc +++ b/src/libs/common/daemon/daemon_wait.cc @@ -49,7 +49,7 @@ void daemon_wait(void) cpu_stat.do_stat(); - /* 扫描进程打开的fd句柄数,如果超过配置阈值,向二级网管告警 */ + /* Scan process open fd handle count, if exceeds configured threshold, alert to secondary network management */ statfd = scan_process_openning_fd(); if ((unsigned)statfd > fdthreshold) { log4cplus_fatal( @@ -63,7 +63,7 @@ void daemon_wait(void) } } -/* 扫描进程已打开的文件句柄数 */ +/* Scan number of file handles opened by process */ unsigned int scan_process_openning_fd(void) { unsigned int count = 0; diff --git a/src/libs/common/data_connector_ask_chain.cc b/src/libs/common/data_connector_ask_chain.cc index 080b8049..8b2879fc 100644 --- a/src/libs/common/data_connector_ask_chain.cc +++ b/src/libs/common/data_connector_ask_chain.cc @@ -65,11 +65,11 @@ DataConnectorAskChain::DataConnectorAskChain() groupMap[1] = NULL; groups[0] = NULL; groups[1] = NULL; - /*总队列的统计,暂时还有意义,暂时保留*/ + /* Total queue statistics, still meaningful for now, temporarily retained */ statQueueCurCount = g_stat_mgr.get_stat_int_counter(CUR_QUEUE_COUNT); statQueueMaxCount = g_stat_mgr.get_stat_int_counter(MAX_QUEUE_COUNT); - /*新增的四个组中最大的队列长度统计项,用来进行告警监控*/ + /* Added statistics for maximum queue length among four groups, used for alert monitoring */ statReadQueueCurMaxCount = g_stat_mgr.get_stat_int_counter( HELPER_READ_GROUR_CUR_QUEUE_MAX_SIZE); statWriteQueueMaxCount = g_stat_mgr.get_stat_int_counter( @@ -739,7 +739,7 @@ int DataConnectorAskChain::get_queue_cur_max_count(int iColumn) } for (int row = 0; row < dbConfig[0]->machineCnt; row++) { - /*read组是在group矩阵的第一列*/ + /* Read group is in the first column of group matrix */ ConnectorGroup *readGroup = groups[0][GROUPS_PER_MACHINE * row + iColumn]; if (NULL == readGroup) { @@ -753,12 +753,12 @@ int DataConnectorAskChain::get_queue_cur_max_count(int iColumn) } return max_count; } -/*传入请求类型,每次只根据请求类型统计响应的值*/ +/* Pass in request type, only count corresponding values based on request type each time */ void DataConnectorAskChain::stat_helper_group_cur_max_queue_count( int iRequestType) { - /*根据请求类型分辨不出来是主读还是备读(和Workload配置有关),只好同时即统计主读组又统计备读组了*/ - /*除非遍历group矩阵里的指针值和selectgroup后的group指针比较,然后再对比矩阵列,这个更复杂*/ + /* Cannot distinguish between master read and slave read based on request type (related to Workload configuration), have to count both master read group and slave read group */ + /* Unless traversing pointer values in group matrix and comparing with group pointer after selectgroup, then comparing matrix columns, which is more complex */ if (TaskTypeRead == iRequestType) { statReadQueueCurMaxCount = get_queue_cur_max_count(MASTER_READ_GROUP_COLUMN); diff --git a/src/libs/common/dtcutils.h b/src/libs/common/dtcutils.h index b5f9cbe0..de15b526 100644 --- a/src/libs/common/dtcutils.h +++ b/src/libs/common/dtcutils.h @@ -24,13 +24,13 @@ #include #include -/*此文件放置dtc的工具函数*/ +/*This file contains dtc utility functions*/ namespace dtc { namespace utils { /************************************************* - 获取本机的ip tomchen + Get local IP tomchen **************************************************/ inline std::string get_local_ip() { @@ -62,7 +62,7 @@ inline std::string get_local_ip() return inet_ntoa(stINETAddrLocal.sin_addr); } /************************************************* - 切割字符串strOri, 以_Ch为分隔符,结果为theVec + Split string strOri using _Ch as delimiter, result stored in theVec **************************************************/ inline void split_str(std::string strOri, char _Ch, std::vector &theVec) diff --git a/src/libs/common/field/field.cc b/src/libs/common/field/field.cc index 24a1c37d..32dfdec3 100644 --- a/src/libs/common/field/field.cc +++ b/src/libs/common/field/field.cc @@ -378,16 +378,16 @@ int RowValue::Compare(const RowValue &rv, uint8_t *fieldIDList, uint8_t num) con rv.field_value(fieldIDList[i])->u64) return -1; break; - case DField::Float: //浮点数 - //浮点数不允许比较 + case DField::Float: //floating point number + //floating point numbers not allowed for comparison return -2; break; - case DField::String: //字符串 + case DField::String: //string if (!string_equal(value[fieldIDList[i]], *(rv.field_value(fieldIDList[i])))) return -1; break; - case DField::Binary: //二进制数据 + case DField::Binary: //binary data if (!binary_equal(value[fieldIDList[i]], *(rv.field_value(fieldIDList[i])))) return -1; diff --git a/src/libs/common/journal_id.h b/src/libs/common/journal_id.h index 979b9570..41c1d10d 100644 --- a/src/libs/common/journal_id.h +++ b/src/libs/common/journal_id.h @@ -58,7 +58,7 @@ struct JournalID { } /* - * 对外接口全部打包为uint64_t, 方便操作。 + * All external interfaces are packaged as uint64_t for convenience. */ JournalID &operator=(const uint64_t v) { diff --git a/src/libs/common/listener/listener_bind.cc b/src/libs/common/listener/listener_bind.cc index c365950a..2b15f035 100644 --- a/src/libs/common/listener/listener_bind.cc +++ b/src/libs/common/listener/listener_bind.cc @@ -60,7 +60,7 @@ int socket_bind(const char *addr, uint16_t port, int backlog) setsockopt(netfd, SOL_TCP, TCP_NODELAY, &reuse_addr, sizeof(reuse_addr)); reuse_addr = 60; - /* 避免没有请求的空连接唤醒epoll浪费cpu资源 */ + /* Avoid empty connections without requests waking up epoll and wasting CPU resources */ setsockopt(netfd, SOL_TCP, TCP_DEFER_ACCEPT, &reuse_addr, sizeof(reuse_addr)); diff --git a/src/libs/common/multi_request.cc b/src/libs/common/multi_request.cc index 9d19557d..7ee8be81 100644 --- a/src/libs/common/multi_request.cc +++ b/src/libs/common/multi_request.cc @@ -200,8 +200,8 @@ void MultiRequest::complete_task(DTCJobOperation *req, int index) set_key_completed(index); subReq--; - // 注意,如果将CTaskMultiplexer放到cache线程执行,则会导致每split一个task,都是直接到cache_process执行完到这里;然后再split出第二个task。这会导致这一个判断逻辑有问题。 - // 目前CTaskMultiplexer是跟incoming线程绑在一起的,因此没有问题 + // Note: If CTaskMultiplexer is placed in cache thread execution, it will cause each split task to go directly to cache_process and execute here; then split the second task. This will cause problems with this judgment logic. + // Currently CTaskMultiplexer is bound to the incoming thread, so there's no problem if (firstPass == 0 && subReq == 0) { complete_waiter(); delete this; diff --git a/src/libs/common/poll/poll_thread_group.cc b/src/libs/common/poll/poll_thread_group.cc index e1b8e4c9..0038b40b 100644 --- a/src/libs/common/poll/poll_thread_group.cc +++ b/src/libs/common/poll/poll_thread_group.cc @@ -77,7 +77,7 @@ void PollThreadGroup::Start(int numThreads, int mp) snprintf(threadName, sizeof(threadName), "%s@%d", groupName.c_str(), i); pollThreads[i] = new PollerBase(threadName); - //set_max_pollers一定要再InitializeThread前调用,否则不生效 + // set_max_pollers must be called before InitializeThread, otherwise it won't take effect pollThreads[i]->set_max_pollers(mp); pollThreads[i]->initialize_thread(); } From 74ac930572de4576a6cf1e66b24065110fb647fe Mon Sep 17 00:00:00 2001 From: kfysck Date: Fri, 5 Sep 2025 08:43:14 +0000 Subject: [PATCH 09/10] feat: Translate all remaining Chinese comments to English MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Systematically translated Chinese comments in 16 files across agent and libs directories - Covers algorithm, data connector, key routing, queue management, and agent components - Maintains technical accuracy and context while improving code readability - All translations verified through check_cn.sh script execution 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/agent/da_buf.c | 6 +++--- src/agent/da_listener.c | 2 +- src/agent/da_log.c | 2 +- src/agent/da_response.c | 2 +- src/agent/da_top_percentile.c | 4 ++-- src/agent/hashkit/da_ketama.c | 12 ++++++------ src/agent/proto/da_dtcparse.c | 16 ++++++++-------- src/libs/common/agent/agent_client.cc | 2 +- src/libs/common/algorithm/bitsop.h | 6 +++--- src/libs/common/algorithm/compress.cc | 12 ++++++------ src/libs/common/algorithm/compress.h | 12 ++++++------ .../common/algorithm/relative_hour_calculator.h | 4 ++-- src/libs/common/data_connector_ask_chain.h | 12 ++++++------ src/libs/common/key/key_route_ask_chain.cc | 4 ++-- src/libs/common/key/key_route_ask_chain.h | 6 +++--- src/libs/common/queue/mtpqueue_nolock.h | 2 +- 16 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/agent/da_buf.c b/src/agent/da_buf.c index 3ebada70..5abab98b 100644 --- a/src/agent/da_buf.c +++ b/src/agent/da_buf.c @@ -87,7 +87,7 @@ struct mbuf *mbuf_get() { } /* - * 将mbuf归还内存池 + * Return mbuf to memory pool */ void mbuf_put(struct mbuf *mbuf) { uint8_t *buf; @@ -99,7 +99,7 @@ void mbuf_put(struct mbuf *mbuf) { } /* - * 重置mbuf + * Reset mbuf */ void mbuf_rewind(struct mbuf *mbuf) { mbuf->pos = mbuf->start; @@ -107,7 +107,7 @@ void mbuf_rewind(struct mbuf *mbuf) { } /* - * 返回mbuf中现有的数据 + * Return existing data in mbuf */ uint32_t mbuf_length(struct mbuf *mbuf) { ASSERT(mbuf->last >= mbuf->pos); diff --git a/src/agent/da_listener.c b/src/agent/da_listener.c index e18cbb61..855215e0 100644 --- a/src/agent/da_listener.c +++ b/src/agent/da_listener.c @@ -332,7 +332,7 @@ static int listener_accept(struct context *ctx, struct conn *l) } /* - * 对于ipv4与ipv6协议关闭negale算法 + * Disable Nagle algorithm for ipv4 and ipv6 protocols */ if (l->family == AF_INET || l->family == AF_INET6) { status = set_tcpnodelay(c->fd); diff --git a/src/agent/da_log.c b/src/agent/da_log.c index 373cde56..52042926 100644 --- a/src/agent/da_log.c +++ b/src/agent/da_log.c @@ -129,7 +129,7 @@ void _set_log_level_(int l) { void _set_log_switch_(int iSwitch) { - //0 不开启本地日志 + //0 means do not enable local logging __log_switch__ = iSwitch; } diff --git a/src/agent/da_response.c b/src/agent/da_response.c index fda7c797..73cc58e7 100644 --- a/src/agent/da_response.c +++ b/src/agent/da_response.c @@ -215,7 +215,7 @@ void rsp_recv_done(struct context *ctx, struct conn *conn, struct msg *msg, return; } - //Get请求信息放在此处进行统计 + //Get request information is counted here if(req->cmd == MSG_REQ_GET) { stats_pool_incr(ctx, c_conn->owner, pool_requests_get); diff --git a/src/agent/da_top_percentile.c b/src/agent/da_top_percentile.c index 1bdddb1e..b3b468eb 100644 --- a/src/agent/da_top_percentile.c +++ b/src/agent/da_top_percentile.c @@ -41,7 +41,7 @@ int8_t get_host_name_info(const char *addr, char *result) if(ret != 0) return -1; - //正常情况应该是只有一个IP,所以只取第一个 + //Normally there should be only one IP, so only take the first one for(curr = answer; curr != NULL; curr = curr->ai_next) { sk_addr = (struct sockaddr_in *)(curr->ai_addr); @@ -63,7 +63,7 @@ int8_t set_remote_config(const char *addr, uint16_t port, struct sockaddr_in *re if(NULL == remote_addr) return -1; int8_t ret = 0; - //因为不使用域名,addr 直接为IP,所以不再进行get_host_name_info转换 + //Since domain names are not used and addr is directly an IP, no get_host_name_info conversion is needed /* char szIP[ADDR_LEN]; memset(szIP, 0, ADDR_LEN); diff --git a/src/agent/hashkit/da_ketama.c b/src/agent/hashkit/da_ketama.c index d911c0eb..08204cd0 100644 --- a/src/agent/hashkit/da_ketama.c +++ b/src/agent/hashkit/da_ketama.c @@ -24,7 +24,7 @@ #include "../da_log.h" /* - * 一致性hash节点数 + * Consistent hash node count */ #define KETAMA_CONTINUUM_ADDITION 10 /* # extra slots to build into continuum */ #define KETAMA_POINTS_PER_SERVER 160 /* 40 points per hash */ @@ -83,7 +83,7 @@ int ketama_update(struct server_pool *pool) { if (continuum == NULL) { return -1; } - //设置pool的一致性hash环 + //Set the consistent hash ring for the pool pool->continuum = continuum; pool->nserver_continuum = nserver_continuum; /* pool->ncontinuum is initialized later as it could be <= ncontinuum */ @@ -117,7 +117,7 @@ int ketama_update(struct server_pool *pool) { pointer_counter += points_per_server; } pool->ncontinuum = pointer_counter; - //对continum进行排序 + //Sort the continuum qsort(pool->continuum, pool->ncontinuum, sizeof(*pool->continuum), ketama_item_cmp); for (pointer_index = 0; @@ -178,7 +178,7 @@ int ketama_update(struct server_pool *pool) { if (continuum == NULL) { return -1; } - //设置pool的一致性hash环 + //Set the consistent hash ring for the pool pool->continuum = continuum; pool->nserver_continuum = nserver_continuum; /* pool->ncontinuum is initialized later as it could be <= ncontinuum */ @@ -196,7 +196,7 @@ int ketama_update(struct server_pool *pool) { server = array_get(&pool->server, server_index); - pct = (float) server->weight / (float) total_weight; //权重计算 + pct = (float) server->weight / (float) total_weight; //Weight calculation pointer_per_server = (uint32_t) ((floorf( (float) (pct * KETAMA_POINTS_PER_SERVER / 4 * (float) nserver + 0.0000000001))) * 4); @@ -223,7 +223,7 @@ int ketama_update(struct server_pool *pool) { } pool->ncontinuum = pointer_counter; - //对continum进行排序 + //Sort the continuum qsort(pool->continuum, pool->ncontinuum, sizeof(*pool->continuum), ketama_item_cmp); diff --git a/src/agent/proto/da_dtcparse.c b/src/agent/proto/da_dtcparse.c index 04c14920..bb98e7ec 100644 --- a/src/agent/proto/da_dtcparse.c +++ b/src/agent/proto/da_dtcparse.c @@ -542,7 +542,7 @@ void dtc_parse_req(struct msg *r) { r->keys[0].end = p + r->cur_parse_lenth; if (r->keytype == String || r->keytype == Binary) { - r->keys[0].end -= 1; //去除字符串末尾的\0 + r->keys[0].end -= 1; //Remove the trailing \0 from string } log_debug( @@ -1699,7 +1699,7 @@ static int dtc_encode_agentid(struct msg *r) { } /* - * get分包函数,暂时不考虑联合组件的情况 + * get fragmentation function, temporarily not considering union components */ static int dtc_fragment_get(struct msg *r, uint32_t ncontinuum, struct msg_tqh *frag_msgq) { @@ -1712,7 +1712,7 @@ static int dtc_fragment_get(struct msg *r, uint32_t ncontinuum, CValue val; uint32_t idx = 0; int version_len = 0, requestinfo_len = 0; - //用于放置分组所有的key + //Used to store all keys for grouping struct keypos keys[ncontinuum][r->keyCount]; int keynum[ncontinuum]; @@ -1725,7 +1725,7 @@ static int dtc_fragment_get(struct msg *r, uint32_t ncontinuum, struct keypos *kpos = &r->keys[i]; if(r->keytype == Unsigned || r->keytype == Signed) { if(sizeof(uint64_t) == kpos->end - kpos->start) { - //此处没有考虑大端小端问题源于SDK编码 + //Endianness is not considered here due to SDK encoding val.u64 = *(uint64_t*)kpos->start; idx = msg_backend_idx(r, (uint8_t *)&val.u64, sizeof(uint64_t)); log_debug("key is %lu, idx is %u, len is %ld", @@ -1735,7 +1735,7 @@ static int dtc_fragment_get(struct msg *r, uint32_t ncontinuum, return -1; } else { - //多Key时每个key被附加4Byte Key长度 + //When multiple keys, each key is appended with 4-byte key length int len = kpos->end - kpos->start - sizeof(uint32_t); if(len > 0) { char temp[len + 2]; @@ -1966,7 +1966,7 @@ int dtc_fragment(struct msg *r, uint32_t ncontinuum, struct msg_tqh *frag_msgq) break; } } - //级联灰度版本特别的地方 + //Special place for cascade grayscale version status = dtc_encode_agentid(r); return status; } @@ -2085,7 +2085,7 @@ static int dtc_coalesce_get(struct msg *r) { } } } - if (errortag == 1) { //有分包查找出错,one of the search result is in error + if (errortag == 1) { //There is a fragmented search error, one of the search result is in error cmsg->peer = NULL; cmsg->peerid = 0; peermsg->peer = NULL; @@ -2095,7 +2095,7 @@ static int dtc_coalesce_get(struct msg *r) { peermsg->peer = r; peermsg->id = r->id; goto coalesce_succ_err; - } else if (validmsgcount == 0 || validmsgcount == 1) { //结果集统统处于一个包中,only a package contain search resule + } else if (validmsgcount == 0 || validmsgcount == 1) { //All results are in one package, only a package contain search resule peermsg = singleresmsg->peer; singleresmsg->peer = NULL; singleresmsg->peerid = 0; diff --git a/src/libs/common/agent/agent_client.cc b/src/libs/common/agent/agent_client.cc index bbcddcea..a2ebd646 100644 --- a/src/libs/common/agent/agent_client.cc +++ b/src/libs/common/agent/agent_client.cc @@ -328,7 +328,7 @@ int ClientAgent::send_result() if (frontPkt->vec_count() + sender->vec_count() > SENDER_MAX_VEC) { - /*这个地方打印error,如果在10s内会5次走入此次分支的话,统计子进程会上报告警*/ + /*Print error here, if this branch is entered 5 times within 10s, the statistics subprocess will report an alarm*/ log4cplus_error( "the sum value of front packet veccount[%d] and sender veccount[%d]is greater than SENDER_MAX_VEC[%d]", frontPkt->vec_count(), sender->vec_count(), diff --git a/src/libs/common/algorithm/bitsop.h b/src/libs/common/algorithm/bitsop.h index 03c1bf63..5b0ca46e 100644 --- a/src/libs/common/algorithm/bitsop.h +++ b/src/libs/common/algorithm/bitsop.h @@ -20,13 +20,13 @@ #include __BEGIN_DECLS /* - bits操作函数 + bits operation functions */ /* * - * select.h中提供的FD_*宏在32位机器上是按照byte来置位的(汇编实现),但在64位 - * 机器上是按照8 bytes来置位的,所以当碰到mmap文件末尾时,有可能segment fault。 + * FD_* macros provided in select.h set bits by byte on 32-bit machines (assembly implementation), but on 64-bit + * machines they set bits by 8 bytes, so when encountering the end of mmap files, segment fault may occur. */ #define CHAR_BITS 8 diff --git a/src/libs/common/algorithm/compress.cc b/src/libs/common/algorithm/compress.cc index 418bf3c0..6e3ddbe0 100644 --- a/src/libs/common/algorithm/compress.cc +++ b/src/libs/common/algorithm/compress.cc @@ -53,9 +53,9 @@ int DTCCompress::set_buffer_len(unsigned long len) return 0; } -//source 被压缩的缓冲区 sourcelen 被压缩缓冲区的原始长度 -//dest 压缩后的缓冲区 destlen 被压缩后的缓冲区长度 -//注意调用该函数时, destlen 首先要设置为dest缓冲区最大可以容纳的长度 +//source: buffer to be compressed, sourcelen: original length of buffer to be compressed +//dest: compressed buffer, destlen: length of compressed buffer +//Note: when calling this function, destlen must first be set to the maximum capacity of dest buffer int DTCCompress::compress(const char *source, unsigned long sourceLen) { if (_buf == NULL || source == NULL) { @@ -65,9 +65,9 @@ int DTCCompress::compress(const char *source, unsigned long sourceLen) return compress2(_buf, &_len, (Bytef *)source, sourceLen, _level); } -//source 待解压的缓冲区 sourcelen 待解压缓冲区的原始长度 -//dest 解压后的缓冲区 destlen 解缩后的缓冲区长度 -//注意调用该函数时, destlen 首先要设置为dest缓冲区最大可以容纳的长度 +//source: buffer to be decompressed, sourcelen: original length of buffer to be decompressed +//dest: decompressed buffer, destlen: length of decompressed buffer +//Note: when calling this function, destlen must first be set to the maximum capacity of dest buffer int DTCCompress::UnCompress(char **buf, int *lenp, const char *source, unsigned long sourceLen) { diff --git a/src/libs/common/algorithm/compress.h b/src/libs/common/algorithm/compress.h index 640ee32b..db96da7d 100644 --- a/src/libs/common/algorithm/compress.h +++ b/src/libs/common/algorithm/compress.h @@ -25,14 +25,14 @@ class DTCCompress { return errmsg_; } - //source 被压缩的缓冲区 sourcelen 被压缩缓冲区的原始长度 - //dest 压缩后的缓冲区 destlen 被压缩后的缓冲区长度 - //注意调用该函数时, destlen 首先要设置为dest缓冲区最大可以容纳的长度 + //source: buffer to be compressed, sourcelen: original length of buffer to be compressed + //dest: compressed buffer, destlen: length of compressed buffer + //Note: when calling this function, destlen must first be set to the maximum capacity of dest buffer int compress(const char *source, unsigned long sourceLen); - //source 待解压的缓冲区 sourcelen 待解压缓冲区的原始长度 - //dest 解压后的缓冲区 destlen 解缩后的缓冲区长度 - //注意调用该函数时, destlen 首先要设置为dest缓冲区最大可以容纳的长度 + //source: buffer to be decompressed, sourcelen: original length of buffer to be decompressed + //dest: decompressed buffer, destlen: length of decompressed buffer + //Note: when calling this function, destlen must first be set to the maximum capacity of dest buffer int UnCompress(char **dest, int *destlen, const char *source, unsigned long sourceLen); diff --git a/src/libs/common/algorithm/relative_hour_calculator.h b/src/libs/common/algorithm/relative_hour_calculator.h index 72c6be41..ef10f4d5 100644 --- a/src/libs/common/algorithm/relative_hour_calculator.h +++ b/src/libs/common/algorithm/relative_hour_calculator.h @@ -28,7 +28,7 @@ class RelativeHourCalculator { ~RelativeHourCalculator() { } - /*由于mktimehelper原因,需要减去八个小时*/ + /*Due to mktimehelper, need to subtract eight hours*/ void set_base_hour(uint64_t ddwBaseYear) { uint64_t ddwRelativeTime = @@ -68,7 +68,7 @@ class RelativeHourCalculator { } private: - uint64_t m_BaseHour; /*本业务对应的ModuleId*/ + uint64_t m_BaseHour; /*ModuleId corresponding to this business*/ }; #define RELATIVE_HOUR_CALCULATOR Singleton::instance() #endif diff --git a/src/libs/common/data_connector_ask_chain.h b/src/libs/common/data_connector_ask_chain.h index 43f432d5..94cfd853 100644 --- a/src/libs/common/data_connector_ask_chain.h +++ b/src/libs/common/data_connector_ask_chain.h @@ -100,12 +100,12 @@ class DataConnectorAskChain : public JobAskInterface { KeyHelper *guard; private: - StatCounter statQueueCurCount; /*所有组当前总的队列大小*/ - StatCounter statQueueMaxCount; /*所有组配置总的队列大小*/ - StatCounter statReadQueueCurMaxCount; /*所有机器所有主读组当前最大的队列大小*/ - StatCounter statWriteQueueMaxCount; /*所有机器所有写组当前最大的队列大小*/ - StatCounter statCommitQueueCurMaxCount; /*所有机器所有提交组当前最大的队列大小*/ - StatCounter statSlaveReadQueueMaxCount; /*所有机器所有备读组当前最大的队列大小*/ + StatCounter statQueueCurCount; /*Current total queue size of all groups*/ + StatCounter statQueueMaxCount; /*Total configured queue size of all groups*/ + StatCounter statReadQueueCurMaxCount; /*Current maximum queue size of all master read groups on all machines*/ + StatCounter statWriteQueueMaxCount; /*Current maximum queue size of all write groups on all machines*/ + StatCounter statCommitQueueCurMaxCount; /*Current maximum queue size of all commit groups on all machines*/ + StatCounter statSlaveReadQueueMaxCount; /*Current maximum queue size of all slave read groups on all machines*/ }; #endif diff --git a/src/libs/common/key/key_route_ask_chain.cc b/src/libs/common/key/key_route_ask_chain.cc index 612ec705..de79d534 100644 --- a/src/libs/common/key/key_route_ask_chain.cc +++ b/src/libs/common/key/key_route_ask_chain.cc @@ -311,7 +311,7 @@ bool KeyRouteAskChain::is_same_cluster_config( } void KeyRouteAskChain::process_reload(DTCJobOperation *t) { - //在迁移未完成前不允许切换表 + //Table switching is not allowed before migration is completed if (migration_inprogress()) { RowValue row(t->table_definition()); t->update_row(row); @@ -772,7 +772,7 @@ void KeyRouteAskChain::process_cascade(DTCJobOperation *t) "switch cascade state CS_CASCADING to CS_NOT_STARTED, addr [%s]", strAddr.c_str()); m_iCSState = newState; - //切换为未开始状态时,将对端地址置空 + //When switching to unstarted state, set the remote address to empty m_strCSAddr = ""; break; } diff --git a/src/libs/common/key/key_route_ask_chain.h b/src/libs/common/key/key_route_ask_chain.h index 745d4047..1de44305 100644 --- a/src/libs/common/key/key_route_ask_chain.h +++ b/src/libs/common/key/key_route_ask_chain.h @@ -109,15 +109,15 @@ class KeyRouteAskChain : public JobAskInterface { std::string m_selfName; ConsistentHashSelector m_selector; - //级联状态枚举值,不可与上面的迁移状态枚举值重复 + //Cascade state enum values, cannot duplicate with migration state enum values above enum CascadeState { CS_NOT_STARTED = 100, CS_CASCADING, CS_MAX, }; - //本DTC级联状态 + //This DTC cascade state int m_iCSState; - //级联对端DTC地址,例:10.191.147.188:12000/tcp + //Cascade remote DTC address, e.g.: 10.191.147.188:12000/tcp std::string m_strCSAddr; }; diff --git a/src/libs/common/queue/mtpqueue_nolock.h b/src/libs/common/queue/mtpqueue_nolock.h index cd0aa5f0..e2f00b47 100644 --- a/src/libs/common/queue/mtpqueue_nolock.h +++ b/src/libs/common/queue/mtpqueue_nolock.h @@ -27,7 +27,7 @@ __sync_bool_compare_and_swap(a_ptr, a_oldVal, a_newVal) /* - * 提供给业务类继承 + * Provided for business class inheritance */ class BaseTask { private: From ed51bd6a61ad2f6d75f5f32e148f3cacb9e840dd Mon Sep 17 00:00:00 2001 From: kfysck Date: Fri, 5 Sep 2025 08:44:48 +0000 Subject: [PATCH 10/10] delete script. --- check_cn.sh | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100755 check_cn.sh diff --git a/check_cn.sh b/check_cn.sh deleted file mode 100755 index edf2764a..00000000 --- a/check_cn.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -DIR="./" - -find "$DIR" -type f \( -name "*.h" -o -name "*.cc" -o -name "*.c" \) | while read -r file; do - if grep -qP '[\x{4e00}-\x{9fff}]' "$file" 2>/dev/null; then - echo "==== $file ====" - grep -nP '[\x{4e00}-\x{9fff}]' "$file" 2>/dev/null - echo - fi -done -