From fcf52f5ee3f0d017cb515ed760e16bfd17e2034d Mon Sep 17 00:00:00 2001 From: dshe Date: Tue, 15 Jun 2021 14:26:26 +0800 Subject: [PATCH] Fix code comment typo (#32) fix comment typo --- src/storage/memtable/mvcc/ob_multi_version_iterator.h | 2 +- src/storage/memtable/ob_lock_wait_mgr.h | 4 ++-- src/storage/memtable/ob_mt_hash.h | 2 +- src/storage/ob_partition_base_data_ob_reader.h | 2 +- src/storage/ob_partition_group_lock.h | 2 +- src/storage/ob_replay_status.h | 2 +- src/storage/replayengine/ob_i_log_replay_engine.h | 2 +- .../transaction/ob_tenant_weak_read_cluster_version_mgr.h | 2 +- src/storage/transaction/ob_time_wheel.h | 2 +- src/storage/transaction/ob_trans_coord_ctx.h | 2 +- src/storage/transaction/ob_trans_ctx.h | 4 ++-- src/storage/transaction/ob_trans_define.h | 2 +- src/storage/transaction/ob_trans_log.h | 2 +- src/storage/transaction/ob_trans_msg.h | 6 +++--- src/storage/transaction/ob_trans_part_ctx.h | 2 +- src/storage/transaction/ob_trans_rpc.h | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/storage/memtable/mvcc/ob_multi_version_iterator.h b/src/storage/memtable/mvcc/ob_multi_version_iterator.h index 6d63df8fd..667f29951 100644 --- a/src/storage/memtable/mvcc/ob_multi_version_iterator.h +++ b/src/storage/memtable/mvcc/ob_multi_version_iterator.h @@ -32,7 +32,7 @@ class ObMultiVersionValueIterator : public ObIMvccValueIterator { public: ObMultiVersionValueIterator(); virtual ~ObMultiVersionValueIterator(); - // for iterating multi version row or uncommited transaction row + // for iterating multi version row or uncommitted transaction row public: int init(const ObIMvccCtx& ctx, const transaction::ObTransSnapInfo& snapshot_info, const ObMemtableKey* key, ObMvccRow* value, transaction::ObTransStateTableGuard& trans_table_guard); diff --git a/src/storage/memtable/ob_lock_wait_mgr.h b/src/storage/memtable/ob_lock_wait_mgr.h index fd9b69540..53d43c082 100644 --- a/src/storage/memtable/ob_lock_wait_mgr.h +++ b/src/storage/memtable/ob_lock_wait_mgr.h @@ -88,10 +88,10 @@ class ObLockWaitMgr : public share::ObThreadPool { protected: // obtain the request waiting on the row or transaction Node* fetch_waiter(uint64_t hash); - // check whether there exits requests already timeoutt or need be + // check whether there exits requests already timeout or need be // retried(session is killed, deadlocked or son on), and wakeup and retry them ObLink* check_timeout(); - // reclaim the chained reuqests + // reclaim the chained requests void retire_node(ObLink*& tail, Node* node); // wakeup the request and put into the thread worker queue virtual int repost(Node* node); diff --git a/src/storage/memtable/ob_mt_hash.h b/src/storage/memtable/ob_mt_hash.h index 67cf5f0b0..038192974 100644 --- a/src/storage/memtable/ob_mt_hash.h +++ b/src/storage/memtable/ob_mt_hash.h @@ -449,7 +449,7 @@ class ObMtHash { // if the insert position is very forward and arr_size is big, there is no // need to access the same element repeatedly when recursively looking up, just decrease by half. // Note: bucket_count can decrease more rapidly, but as long as not access array elements, - // it's accesptabale to loop multiple times(< 64) to decreasse by half. + // it's acceptable to loop multiple times(< 64) to decrease by half. int64_t last_arr_idx = arr_idx; while (OB_SUCC(ret) && arr_idx > 0) { diff --git a/src/storage/ob_partition_base_data_ob_reader.h b/src/storage/ob_partition_base_data_ob_reader.h index 0b4a54672..d0d5aa41c 100644 --- a/src/storage/ob_partition_base_data_ob_reader.h +++ b/src/storage/ob_partition_base_data_ob_reader.h @@ -271,7 +271,7 @@ class ObPartitionMacroBlockObProducer { // end_key(1) // end_key(2) // ... -// end_key(n) shoule be MAX +// end_key(n) should be MAX class ObLogicBaseMetaProducer { public: ObLogicBaseMetaProducer() : is_inited_(false), partition_service_(NULL), arg_(NULL) diff --git a/src/storage/ob_partition_group_lock.h b/src/storage/ob_partition_group_lock.h index 1604d96b5..459f47ccb 100644 --- a/src/storage/ob_partition_group_lock.h +++ b/src/storage/ob_partition_group_lock.h @@ -89,7 +89,7 @@ class ObPartitionGroupLockGuard { }; // ATTENTION: -// The lock is designed to resolve the deadlock of code desgin between replay +// The lock is designed to resolve the deadlock of code design between replay // engine and partition group. You need use the guard when adding replay engine // lock inside partition group class ObPGLockWithPendingReplayGuard { diff --git a/src/storage/ob_replay_status.h b/src/storage/ob_replay_status.h index a494a5ea8..0da8d0f4c 100644 --- a/src/storage/ob_replay_status.h +++ b/src/storage/ob_replay_status.h @@ -281,7 +281,7 @@ struct ObSubmitReplayLogTask : public ObReplayTask { ObStorageLogType storage_log_type_; // recode log_type when failed to check condition before submit int64_t accum_checksum_; //-----------new added members for decoupling of replay engine and sliding window---------// - // the info of last log that sliding window submiteed + // the info of last log that sliding window submitted struct types::uint128_t last_slide_out_log_info_; // the info of last log that replay engine submit to replay queue struct types::uint128_t next_submit_log_info_; diff --git a/src/storage/replayengine/ob_i_log_replay_engine.h b/src/storage/replayengine/ob_i_log_replay_engine.h index c9bc4f34b..62bf54e48 100644 --- a/src/storage/replayengine/ob_i_log_replay_engine.h +++ b/src/storage/replayengine/ob_i_log_replay_engine.h @@ -57,7 +57,7 @@ class ObILogReplayEngine { // @param[in] need_replay:Whether the log needs to be replayed, the member change log and the // transaction log of D replica and log replica do not need to be replayed // @param[in] pkey:pkey of PG - // @param[in] log_id:🔐id of submited log + // @param[in] log_id:🔐id of submitted log // @param[in] log_ts:submit_timestamp of log // @retval OB_SUCCESS : The task is submitted successfully // @retval OB_NOT_INIT: ObLogReplayEngine has not been inited diff --git a/src/storage/transaction/ob_tenant_weak_read_cluster_version_mgr.h b/src/storage/transaction/ob_tenant_weak_read_cluster_version_mgr.h index f0dd9f9ba..dd984894f 100644 --- a/src/storage/transaction/ob_tenant_weak_read_cluster_version_mgr.h +++ b/src/storage/transaction/ob_tenant_weak_read_cluster_version_mgr.h @@ -47,7 +47,7 @@ class ObTenantWeakReadClusterVersionMgr { const int64_t total_part_count, const int64_t generate_tstamp, bool& is_new_server); /// get min server version which not smaller than base_version - /// if no statisfied server version, return base_version + /// if no satisfied server version, return base_version int64_t get_version(const int64_t base_version, int64_t& skip_server_count, const bool need_print_server_info) const; // get server count in cluster master cached registered servers diff --git a/src/storage/transaction/ob_time_wheel.h b/src/storage/transaction/ob_time_wheel.h index 3bb3fdf09..220c003c7 100644 --- a/src/storage/transaction/ob_time_wheel.h +++ b/src/storage/transaction/ob_time_wheel.h @@ -145,7 +145,7 @@ class TimeWheelBase : public share::ObThreadPool { private: static const int64_t MAX_BUCKET = 10000; - // scaner max sleep 1000000us + // scanner max sleep 1000000us static const int64_t MAX_SCAN_SLEEP = 1000000; static const int64_t MAX_TIMER_NAME_LEN = 16; diff --git a/src/storage/transaction/ob_trans_coord_ctx.h b/src/storage/transaction/ob_trans_coord_ctx.h index ab38a55a1..a944db7fd 100644 --- a/src/storage/transaction/ob_trans_coord_ctx.h +++ b/src/storage/transaction/ob_trans_coord_ctx.h @@ -258,7 +258,7 @@ class ObCoordTransCtx : public ObDistTransCtx, public ObTsCbTask { ObPartitionArray unconfirmed_participants_; ObVersionArray participant_publish_version_array_; ObTransSplitInfoArray split_info_arr_; - // TRUE by default for xa trans, false is set after receving xa commit + // TRUE by default for xa trans, false is set after receiving xa commit bool is_waiting_xa_commit_; ObTransCtxArray part_ctx_arr_; // it is used to store the max commit_log_ts of participants diff --git a/src/storage/transaction/ob_trans_ctx.h b/src/storage/transaction/ob_trans_ctx.h index 8b4c91325..5e048e87f 100644 --- a/src/storage/transaction/ob_trans_ctx.h +++ b/src/storage/transaction/ob_trans_ctx.h @@ -138,7 +138,7 @@ class ObTransState { // NOTICE: You should **CHANGE** the signature of all inherit class once you // change one of the signature of `ObTransCtx`. // For Example: If you change the signature of the function `commit` in -// `ObTransCtx`, you should also modify the signatore of function `commit` in +// `ObTransCtx`, you should also modify the signature of function `commit` in // `ObPartTransCtx`, `ObSlaveTransCtx`, `ObScheTransCtx` and `ObCoordTransCtx` class ObTransCtx : public TransCtxHashValue { friend class CtxLock; @@ -690,7 +690,7 @@ class ObDistTransCtx : public ObTransCtx { ObITransRpc* rpc_; ObILocationAdapter* location_adapter_; int64_t commit_start_time_; - // the variable is used to get the time between the trans start and respone to client + // the variable is used to get the time between the trans start and response to client int64_t trans_start_time_; bool need_refresh_location_; int64_t trans_2pc_timeout_; diff --git a/src/storage/transaction/ob_trans_define.h b/src/storage/transaction/ob_trans_define.h index c62d074e3..42b316185 100644 --- a/src/storage/transaction/ob_trans_define.h +++ b/src/storage/transaction/ob_trans_define.h @@ -3631,7 +3631,7 @@ typedef common::ObSEArray ObMem typedef common::ObSEArray ObAddrLogIdArray; const int64_t OB_TRANS_REDO_LOG_RESERVE_SIZE = 128 * 1024; const int64_t MAX_ONE_PC_TRANS_SIZE = 1500000; -// parmeters config transaction related +// parameters config transaction related const int64_t TRANS_ACCESS_STAT_INTERVAL = 60 * 1000 * 1000; // 60s const int64_t TRANS_MEM_STAT_INTERVAL = 5 * 1000 * 1000; // 60s diff --git a/src/storage/transaction/ob_trans_log.h b/src/storage/transaction/ob_trans_log.h index 3d3412253..305437561 100644 --- a/src/storage/transaction/ob_trans_log.h +++ b/src/storage/transaction/ob_trans_log.h @@ -380,7 +380,7 @@ class ObTransPrepareLogHelper { // will be pre-allocated and recorded in the log body for updating // part_ctx's prepare_version during follower's replay process. // and it's equal to submit_timestamp recorded in log header, to avoid redundency, - // this field is not used in version 2.2 and later versions.(it's not removed for compatability reasons) + // this field is not used in version 2.2 and later versions.(it's not removed for compatibility reasons) int64_t local_trans_version_; common::ObVersion active_memstore_version_; common::ObString app_trace_id_str_; diff --git a/src/storage/transaction/ob_trans_msg.h b/src/storage/transaction/ob_trans_msg.h index 9a84c9b79..a1451106a 100644 --- a/src/storage/transaction/ob_trans_msg.h +++ b/src/storage/transaction/ob_trans_msg.h @@ -201,9 +201,9 @@ class ObTransMsg : public ObTransMsgBase { // 2.extra param: scheduler_, coordinator_, participats_, status_, request_id_ // 3.note: // (1) scheduler_,coordinator_, participants_: required, use to recovery after coordinator failure - // (2) status_: required, used to idneify participant's commit/abort state + // (2) status_: required, used to identify participant's commit/abort state // (3) request_id_: required, used to reject steal message - // (4) xid: requried for XA + // (4) xid: required for XA // (5) is_xa_prepare: required for XA int init(const uint64_t tenant_id, const ObTransID& trans_id, const int64_t msg_type, const int64_t trans_time, const common::ObPartitionKey& sender, const common::ObPartitionKey& receiver, const common::ObAddr& scheduler, @@ -223,7 +223,7 @@ class ObTransMsg : public ObTransMsgBase { // (4) trans_version_: participant's local prepare version // (5) request_id_: used to reject steal message // (6) xid: required for XA - // (7) is_xa_prepare: requried for XA + // (7) is_xa_prepare: required for XA int init(const uint64_t tenant_id, const ObTransID& trans_id, const int64_t msg_type, const int64_t trans_time, const common::ObPartitionKey& sender, const common::ObPartitionKey& receiver, const common::ObAddr& scheduler, const common::ObPartitionKey& coordinator, const common::ObPartitionArray& participants, diff --git a/src/storage/transaction/ob_trans_part_ctx.h b/src/storage/transaction/ob_trans_part_ctx.h index aa86478ab..ff46847a3 100644 --- a/src/storage/transaction/ob_trans_part_ctx.h +++ b/src/storage/transaction/ob_trans_part_ctx.h @@ -705,7 +705,7 @@ class ObPartTransCtx : public ObDistTransCtx, public ObTsCbTask { bool is_redo_prepared_; bool has_gen_last_redo_log_; // this let clear_log's timestamp always - // greate than commit timestamp of all participants + // greater than commit timestamp of all participants int64_t clear_log_base_ts_; TransResultInfo result_info_; int64_t end_log_ts_for_batch_commit_; diff --git a/src/storage/transaction/ob_trans_rpc.h b/src/storage/transaction/ob_trans_rpc.h index 9f549b042..171297b39 100644 --- a/src/storage/transaction/ob_trans_rpc.h +++ b/src/storage/transaction/ob_trans_rpc.h @@ -302,7 +302,7 @@ void ObTransRPCCB::on_timeout() // 2. for read-only transaction, if remote server crash stop when tranaction commit, // scheduler no need to retry the request // 3. for read-write transaction, if need to rollback, location cache will be refreshed after timeout reached - // clean cache of current transaction and resend reqeust to new leader + // clean cache of current transaction and resend request to new leader // 4. for other type of messsage, don't handle but register asynchronouse task if (OB_SUCCESS != (tmp_ret = transaction::handle_trans_msg_callback(trans_service_, pkey_,