diff --git a/src/election/ob_election.h b/src/election/ob_election.h index 77395d45bc5fe1183b93387161154488c3f1386e..7f985971aab65f19a6ea21b2791a153791b3f383 100644 --- a/src/election/ob_election.h +++ b/src/election/ob_election.h @@ -373,7 +373,7 @@ private: static const int64_t OB_ELECTION_HASH_TIME_US = 10000; // 10ms static const int64_t OB_ELECTION_HASH_TABLE_NUM_NEW = 580; // mod 580 /**************************************************************************************************/ - static const int64_t OB_ELECTION_MAX_CENTRIALIZED_TIME = 100000; // 100ms + static const int64_t OB_ELECTION_MAX_CENTRALIZED_TIME = 100000; // 100ms static const int64_t OB_ELECTION_LEADER_EXPIRED_PRINT_INTERVAL_US = 10 * 1000 * 1000; // 10S // RWLock performs better on ARM platform, but worse on x86 platform #if defined(__x86_64__) diff --git a/src/election/ob_election_msg_pool.cpp b/src/election/ob_election_msg_pool.cpp index a72da981b059cde0cdaedbef7bf24d14e2581557..447ca41981355f4f6f53bb197e56f489a124195d 100644 --- a/src/election/ob_election_msg_pool.cpp +++ b/src/election/ob_election_msg_pool.cpp @@ -194,8 +194,8 @@ void ObElectionVoteMsgPool::correct_recordT1_if_necessary(int64_t T1_timestamp) vote_recorder_.correct_recordT1_if_necessary(T1_timestamp); } -// record messages, in [decentralized prepare/decentralizes voting/centralized prepare/centralized voting] -// @param [in] msg messgae for recording +// record messages, in [decentralized prepare/decentralized voting/centralized prepare/centralized voting] +// @param [in] msg message for recording // @return error code int ObElectionVoteMsgPool::store(const ObElectionVoteMsg& msg) { @@ -214,7 +214,7 @@ int ObElectionVoteMsgPool::store(const ObElectionVoteMsg& msg) const ObElectionMsgDEPrepare& casted_msg = static_cast(msg); if (OB_UNLIKELY(!casted_msg.get_priority().is_candidate())) { ret = OB_ELECTION_WARN_NOT_CANDIDATE; - ELECT_ASYNC_LOG(ERROR, "deprepare msg sender is not candidiate", K_(partition), K(msg), K(ret)); + ELECT_ASYNC_LOG(ERROR, "deprepare msg sender is not candidate", K_(partition), K(msg), K(ret)); } else if (OB_UNLIKELY(OB_FAIL(deprepare_recorder_.record_msg(msg)))) { ELECT_ASYNC_LOG(WARN, "fail to store election msg", K_(partition), K(msg), K(ret)); } else if (OB_UNLIKELY(casted_msg.get_T1_timestamp() > cached_devote_prepare_msg_.get_T1_timestamp())) { diff --git a/src/election/ob_election_msg_pool.h b/src/election/ob_election_msg_pool.h index 43a896e90751756bf0d71cb5d760acbf42c5d9e6..83bd033ca35250b8b9a47b4c136a192c04bab35c 100644 --- a/src/election/ob_election_msg_pool.h +++ b/src/election/ob_election_msg_pool.h @@ -49,7 +49,7 @@ public: void correct_recordT1_if_necessary(int64_t T1_timestamp); int store(const ObElectionVoteMsg& msg); int get_decentralized_candidate(common::ObAddr& server, - ObElectionPriority& priority, // get the highest prioirity of server + ObElectionPriority& priority, // get the highest priority of server const int64_t replica_num, const int64_t t1, int64_t& lease_time); int check_decentralized_majority(common::ObAddr& new_leader, int64_t& ticket, // check if votes for self reach majority