diff --git a/src/clog/ob_batch_submit_ctx.cpp b/src/clog/ob_batch_submit_ctx.cpp index f751bf692..b02cded4f 100644 --- a/src/clog/ob_batch_submit_ctx.cpp +++ b/src/clog/ob_batch_submit_ctx.cpp @@ -240,7 +240,7 @@ int ObBatchSubmitCtx::flush_cb(const ObLogCursor& base_log_cursor) CLOG_LOG(ERROR, "ObBatchSubmitCtx is not inited", K(ret), K(trans_id_)); } else if (!base_log_cursor.is_valid()) { ret = OB_INVALID_ARGUMENT; - CLOG_LOG(ERROR, "invalid argumets", K(ret), K(trans_id_), K(base_log_cursor)); + CLOG_LOG(ERROR, "invalid arguments", K(ret), K(trans_id_), K(base_log_cursor)); } else { ObMutexGuard guard(lock_); diff --git a/src/clog/ob_buffer_task.h b/src/clog/ob_buffer_task.h index 2b16c4d4a..c231b522f 100644 --- a/src/clog/ob_buffer_task.h +++ b/src/clog/ob_buffer_task.h @@ -49,7 +49,7 @@ private: DISALLOW_COPY_AND_ASSIGN(MyFixedBufferAlloc); }; -// DiskLogBuffer and NetLogBuffer serilize different content to BatchBuffer by using respective BufferTask. +// DiskLogBuffer and NetLogBuffer serialize different content to BatchBuffer by using respective BufferTask. class ObIBufferTask { public: ObIBufferTask() : next_(NULL), need_callback_(false) diff --git a/src/clog/ob_clog_mgr.cpp b/src/clog/ob_clog_mgr.cpp index da155777f..e32a19935 100644 --- a/src/clog/ob_clog_mgr.cpp +++ b/src/clog/ob_clog_mgr.cpp @@ -1279,7 +1279,7 @@ int ObCLogMgr::pre_batch_change_member_(const common::ObPartitionArray& partitio } else if (OB_FAIL(member_list_array.push_back(member_list))) { CLOG_LOG(WARN, "member_list_array push_back failed", K(ret), K(partition_key), K(member_list)); } else if (OB_FAIL(proposal_id_array.push_back(proposal_id))) { - CLOG_LOG(WARN, "proposal_id_array push_back faield", K(ret), K(partition_key), K(proposal_id_array)); + CLOG_LOG(WARN, "proposal_id_array push_back failed", K(ret), K(partition_key), K(proposal_id_array)); } else if (OB_FAIL(ret_map.insert(partition_key, ret))) { CLOG_LOG(WARN, "ret_map insert failed", K(ret), K(ret), K(partition_key)); } else { @@ -2925,7 +2925,7 @@ int ObCLogMgr::leader_construct_log_info_(const common::ObPartitionArray& partit unused_freeze_version, is_trans_log))) { CLOG_LOG(WARN, - "log_header genearte_header failed", + "log_header generate_header failed", K(ret), K(log_type), K(partition_key), diff --git a/src/clog/ob_clog_mgr.h b/src/clog/ob_clog_mgr.h index 977cdb1e8..6092976c5 100644 --- a/src/clog/ob_clog_mgr.h +++ b/src/clog/ob_clog_mgr.h @@ -221,7 +221,7 @@ public: // // ret code: // OB_NOT_INIT/OB_INVALID_ARGUMENT for normal case. - // OB_SUCCESS, all Partititions execute success. + // OB_SUCCESS, all partitions execute success. // OB_PARTIAL_FAILED, some Partition execution fails, the caller needs to check ret_array to determine the execution // state of each Partition. virtual int batch_add_member(const common::ObPartitionArray& partition_array, @@ -232,7 +232,7 @@ public: virtual int batch_remove_member(const common::ObPartitionArray& partition_array, const common::ObMemberArray& member_array, const common::ObQuorumArray& quorum_array, common::ObReturnArray& ret_array, ObMCLogInfoArray& log_info_array) = 0; - // Function: Check whether the operation of adding/deleting members of a group of Parttiions is performed + // Function: Check whether the operation of adding/deleting members of a group of Partitions is performed // successfully. // // Arguments: @@ -250,7 +250,7 @@ public: // state of each Partition. virtual int batch_is_member_change_done(const common::ObPartitionArray& partition_array, const ObMCLogInfoArray& log_info_array, common::ObReturnArray& ret_array) = 0; - //===================== batch chdange member end ================ + //===================== batch change member end ================ // Function: // Single-machine distributed transaction batch commits log, performing one phase optimization. @@ -384,7 +384,7 @@ public: // Query the accumulative checksum and submit_timestamp values corresponding to this log_id based on log_id. // use case: // When minor freeze need obtain base_storage_info, only the log_id corresponding to the snapshot point is saved - // in the transaction context At this time, the accumulative checksum and submit_timetamp corresponding to this + // in the transaction context At this time, the accumulative checksum and submit_timestamp corresponding to this // log_id need to be returned and saved in base_storage_info // // accum_checksum and submit_timestamp are saved in ilog entry, so just need query ilog_storage. @@ -527,7 +527,7 @@ private: private: int create_partition_(const common::ObPartitionKey& partition_key, const int64_t replica_num, const common::ObMemberList& member_list, const common::ObVersion& freeze_version, - const common::ObReplicaType replica_type, const common::ObReplicaProperty replia_property, + const common::ObReplicaType replica_type, const common::ObReplicaProperty replica_property, const int64_t last_submit_timestamp, const uint64_t last_replay_log_id, const int16_t archive_restore_state, const bool need_skip_mlist_check, ObIPartitionLogService* pls); int query_max_ilog_id_(const common::ObPartitionKey& pkey, uint64_t& ret_max_file_id); diff --git a/src/clog/ob_clog_sync_msg.h b/src/clog/ob_clog_sync_msg.h index aa38e6e90..96a158d18 100644 --- a/src/clog/ob_clog_sync_msg.h +++ b/src/clog/ob_clog_sync_msg.h @@ -137,7 +137,7 @@ private: uint64_t max_confirmed_log_id_; // following conditions will lead to false: // 1. out of memory - // 2. disk space not enougn + // 2. disk space not enough bool is_normal_partition_; private: diff --git a/src/clog/ob_external_fetcher.cpp b/src/clog/ob_external_fetcher.cpp index c8fb519a6..8d76e5a11 100644 --- a/src/clog/ob_external_fetcher.cpp +++ b/src/clog/ob_external_fetcher.cpp @@ -274,7 +274,7 @@ int ObExtLogFetcher::wash() return ret; } -// log_id wantted does not exist on this server, feed this information back to liboblog, +// log_id wanted does not exist on this server, feed this information back to liboblog, // liboblog needs to change search server. int ObExtLogFetcher::handle_log_not_exist( const ObPartitionKey& pkey, const uint64_t next_log_id, ObLogStreamFetchLogResp& resp) diff --git a/src/clog/ob_external_leader_heartbeat_handler.h b/src/clog/ob_external_leader_heartbeat_handler.h index 980e5ce45..1dc6decf4 100644 --- a/src/clog/ob_external_leader_heartbeat_handler.h +++ b/src/clog/ob_external_leader_heartbeat_handler.h @@ -30,7 +30,7 @@ namespace logservice { * case request from leader, return * case request from follower, return * - * note: leader will process dounle check + * note: leader will process double check */ class ObExtLeaderHeartbeatHandler { diff --git a/src/clog/ob_external_log_service.cpp b/src/clog/ob_external_log_service.cpp index 41dc2fff6..f44a40875 100644 --- a/src/clog/ob_external_log_service.cpp +++ b/src/clog/ob_external_log_service.cpp @@ -95,7 +95,7 @@ int ObExtLogService::req_start_log_id_by_ts_with_breakpoint( } else if (OB_UNLIKELY(!clog_mgr_->is_scan_finished())) { resp.set_err(OB_SERVER_IS_INIT); EXTLOG_LOG(WARN, - "all clog and ilog file are not scan-finised, can not serve " + "all clog and ilog file are not scan-finished, can not serve " "req_start_log_id_by_ts_with_breakpoint RPC", K(req_msg), K(resp)); @@ -137,7 +137,7 @@ int ObExtLogService::fetch_log( } else if (OB_UNLIKELY(!clog_mgr_->is_scan_finished())) { resp.set_err(OB_SERVER_IS_INIT); EXTLOG_LOG(WARN, - "all clog and ilog file are not scan-finised, can not serve fetch_log RPC", + "all clog and ilog file are not scan-finished, can not serve fetch_log RPC", K(req), K(resp), K(send_ts), @@ -175,7 +175,7 @@ int ObExtLogService::archive_fetch_log(const ObPGKey& pg_key, const ObReadParam& } else if (OB_UNLIKELY(!clog_mgr_->is_scan_finished())) { ret = OB_EAGAIN; EXTLOG_LOG( - WARN, "all clog and ilog file are not scan-finised, can not serve fetch_log", K(pg_key), K(param), KR(ret)); + WARN, "all clog and ilog file are not scan-finished, can not serve fetch_log", K(pg_key), K(param), KR(ret)); } else { const int64_t start_ts = ObTimeUtility::current_time(); if (OB_FAIL(archive_log_fetcher_.fetch_log(pg_key, param, rbuf, res))) { diff --git a/src/clog/ob_file_id_cache.cpp b/src/clog/ob_file_id_cache.cpp index eed05ca70..80203b822 100644 --- a/src/clog/ob_file_id_cache.cpp +++ b/src/clog/ob_file_id_cache.cpp @@ -848,7 +848,7 @@ bool ObFileIdCachePurgeByFileId::need_wait(bool& need_print_error) const bool bool_ret = false; need_print_error = false; const file_id_t curr_max_file_id = file_id_cache_.get_curr_max_file_id(); - // This measn that ilog can be purged, but ilog index don't in file_id_cahce + // This means that ilog can be purged, but ilog index don't in file_id_cache if (OB_INVALID_FILE_ID == curr_max_file_id || curr_max_file_id < min_file_id_) { bool_ret = true; need_print_error = true; @@ -1018,7 +1018,7 @@ int ObFileIdCache::init(const int64_t server_seq, const common::ObAddr& addr, Ob } else if (OB_FAIL(map_.init(MAP_LABEL, MAP_TENANT_ID))) { CSR_LOG(WARN, "map_ init error", K(ret)); } else if (OB_FAIL(filter_map_.init("FAST_PG_FILTER", MAP_TENANT_ID))) { - CSR_LOG(WARN, "fliter_map_ init error", K(ret)); + CSR_LOG(WARN, "filter_map_ init error", K(ret)); } else { curr_max_file_id_ = OB_INVALID_FILE_ID; next_can_purge_log2file_timestamp_ = OB_INVALID_TIMESTAMP; @@ -1067,8 +1067,8 @@ void ObFileIdCache::destroy() // 1. OB_SUCCESS prev_item and next_item are both valid // 2. OB_ERR_OUT_OF_UPPER_BOUND prev_item valid, next_item invalid // 3. OB_ERR_OUT_OF_LOWER_BOUND prev_item invalid, next_item valid -// 4. OB_PARTITION_NOT_EXIST partiiton not exist, prev_item and next_item are both invalid -// 5. OB_NEED_RETRY need retrym prev_item and next_item are both invalid +// 4. OB_PARTITION_NOT_EXIST partition not exist, prev_item and next_item are both invalid +// 5. OB_NEED_RETRY need retry prev_item and next_item are both invalid // 6. Others int ObFileIdCache::locate(const ObPartitionKey& pkey, const int64_t target_value, const bool locate_by_log_id, Log2File& prev_item, Log2File& next_item) @@ -1325,7 +1325,7 @@ bool ObFileIdCache::ObUndoAppendFunctor::operator()(const ObPartitionKey& pkey, CSR_LOG(WARN, "list undo_append error", K(broken_file_id_), K(pkey), K(empty), KP(list)); } else if (empty) { if (OB_FAIL(dead_pkeys_.push_back(pkey))) { - CSR_LOG(WARN, "push pkey inito dead_pkeys error", K(ret), K(dead_pkeys_), K(pkey)); + CSR_LOG(WARN, "push pkey into dead_pkeys error", K(ret), K(dead_pkeys_), K(pkey)); } else { CSR_LOG(TRACE, "dead_pkey", K(pkey), K(broken_file_id_), KP(list)); } @@ -1544,7 +1544,7 @@ int ObFileIdCache::undo_append_(const file_id_t broken_file_id) WLockGuard wguard(rwlock_); if (OB_UNLIKELY(OB_INVALID_FILE_ID == broken_file_id)) { ret = OB_INVALID_ARGUMENT; - CSR_LOG(WARN, "ObFileIdCachel undo_append error", K(ret), K(broken_file_id)); + CSR_LOG(WARN, "ObFileIdCache undo_append error", K(ret), K(broken_file_id)); } else { ObUndoAppendFunctor undo_functor(broken_file_id); if (OB_FAIL(map_.for_each(undo_functor))) { diff --git a/src/clog/ob_file_id_cache.h b/src/clog/ob_file_id_cache.h index 9a52cb73e..bf5ca9e04 100644 --- a/src/clog/ob_file_id_cache.h +++ b/src/clog/ob_file_id_cache.h @@ -29,7 +29,7 @@ class ObIlogAccessor; // The InfoBlock of the ilog file records each partition_key and its min_log_id, max_log_id, // min_submit_timestamp, max_submit_timestamp in this ilog file, // -// For version after 2.1(include 2.1), it's only recore the start_offset of the first ilog of +// For version after 2.1(include 2.1), it's only record the start_offset of the first ilog of // this partition in the ilog file. // // For version before 2.1, the start_offset corresponds to the start_offset_index of the first diff --git a/src/clog/ob_ilog_cache.cpp b/src/clog/ob_ilog_cache.cpp index a7af3a468..f507167f4 100644 --- a/src/clog/ob_ilog_cache.cpp +++ b/src/clog/ob_ilog_cache.cpp @@ -124,7 +124,7 @@ int ObIlogCache::init(const ObIlogCacheConfig& config, ObIlogPerFileCacheBuilder ret = OB_INIT_TWICE; } else if (!config.is_valid() || NULL == pf_cache_builder) { ret = OB_INVALID_ARGUMENT; - CSR_LOG(WARN, "ivnalid config for ObIlogCache", K(ret), K(config), KP(pf_cache_builder)); + CSR_LOG(WARN, "invalid config for ObIlogCache", K(ret), K(config), KP(pf_cache_builder)); } else if (OB_FAIL(wrapper_allocator_.init(WRAPPER_ALLOC_SIZE, WRAPPER_ALLOCATOR_LABEL, WRAPPER_ALLOCATOR_TENANT_ID, @@ -438,7 +438,7 @@ int ObIlogCache::do_locate_by_timestamp_(const file_id_t file_id, const common:: if (OB_FAIL(force_wash())) { CSR_LOG(WARN, "force_wash error", K(ret)); } else { - ret = OB_NEED_RETRY; // memory sequeezed for new file now, retry + ret = OB_NEED_RETRY; // memory squeezed for new file now, retry } } } while (OB_NEED_RETRY == ret && ++retry_times < RETRY_COUNT_FOR_WAIT_READY); @@ -825,7 +825,7 @@ int ObIlogCache::wash_victim(const file_id_t victim_file_id) // Concurrency control // Steps: erase -> wait -> destroy // Note 1: Load ilog file is finished in prepare_cache_node. - // Note 2: Erasing victim_file_id from map immediately, the quere in flying will insert a new node into map. + // Note 2: Erasing victim_file_id from map immediately, the queue in flying will insert a new node into map. // the memory of two nodes and their per_file_cache are independent. EraseNodeFunctor erase_fn; if (OB_FAIL(node_map_.erase_if(victim_file_id, erase_fn))) { diff --git a/src/clog/ob_ilog_cache.h b/src/clog/ob_ilog_cache.h index e28586e63..28ff953f3 100644 --- a/src/clog/ob_ilog_cache.h +++ b/src/clog/ob_ilog_cache.h @@ -28,7 +28,7 @@ namespace clog { * essentially, it's an in-memory cache. * * The main data struct of ObIlogCache is a map, which the key - * is file_id_t(fild_id_t is a discriptor of one ilog file), + * is file_id_t(fild_id_t is a descriptor of one ilog file), * and the value is ObIlogPerFileCacheNode. * * Concurrency control: @@ -43,10 +43,10 @@ namespace clog { * it's need to backfill the status of ObIlogPerFileCacheNode into ready, * the node may be not exist, in this case, we destroy the object which has * been loaded. - * 2. Same as above, wash thread delete the placeholder node, there is may be a new placehodler node, + * 2. Same as above, wash thread delete the placeholder node, there is may be a new placeholder node, * at this time, the above loading has finished. To identify two different nodes, a monotonically * increasing sequence number is used to mark them - * 3. To prevent the node which being accessed to be destoryed, we use reference count to protect + * 3. To prevent the node which being accessed to be destroyed, we use reference count to protect * node, the initial reference count of each node which has inserted into hash_map is 1. */ @@ -75,7 +75,7 @@ struct ObIlogPerFileCacheWrapper { page_arena_.set_tenant_id(tenant_id); } - // Preloaded files, should give this file more time, avoid ealry wash + // Preloaded files, should give this file more time, avoid early wash void be_kind_to_preload() { const int64_t PRELOAD_KIND_INTERVAL = 90 * 1000 * 1000; // 90 second diff --git a/src/clog/ob_ilog_memstore.cpp b/src/clog/ob_ilog_memstore.cpp index 1a4925ea2..7db4e8584 100644 --- a/src/clog/ob_ilog_memstore.cpp +++ b/src/clog/ob_ilog_memstore.cpp @@ -126,7 +126,7 @@ int ObIlogMemstore::check_need_freeze( } if (OB_SUCCESS != ret) { - CSR_LOG(ERROR, "check_need_freeze return value upexpected", K(ret), K(partition_key), K(log_id)); + CSR_LOG(ERROR, "check_need_freeze return value unexpected", K(ret), K(partition_key), K(log_id)); } CSR_LOG(TRACE, "check_need_freeze", K(ret), K(partition_key), K(log_id), K(trigger_type)); return ret; diff --git a/src/clog/ob_ilog_per_file_cache.cpp b/src/clog/ob_ilog_per_file_cache.cpp index df04de07c..25cc24c2b 100644 --- a/src/clog/ob_ilog_per_file_cache.cpp +++ b/src/clog/ob_ilog_per_file_cache.cpp @@ -89,7 +89,7 @@ int ObIlogPerFileCache::query_cursor(const ObPartitionKey& pkey, const uint64_t OB_UNLIKELY(!result.is_valid())) { ret = OB_INVALID_ARGUMENT; CSR_LOG(ERROR, - "invald argument", + "invalid argument", K(ret), K(pkey), K(query_log_id), diff --git a/src/clog/ob_ilog_storage.cpp b/src/clog/ob_ilog_storage.cpp index da06b8bbb..d807ca9d5 100644 --- a/src/clog/ob_ilog_storage.cpp +++ b/src/clog/ob_ilog_storage.cpp @@ -688,7 +688,7 @@ void ObIlogStorage::ObIlogStorageTimerTask::purge_stale_file_() } else if (OB_FAIL(ilog_storage_->purge_stale_file())) { CSR_LOG(WARN, "ilog_storage_timer purge_stale_file failed", K(ret)); } else { - CSR_LOG(TRACE, "ilog_storage_timer pruge_stale_file success"); + CSR_LOG(TRACE, "ilog_storage_timer purge_stale_file success"); } } @@ -843,7 +843,7 @@ int ObIlogStorage::get_cursor_batch( if (OB_FAIL(get_cursor_from_file_(partition_key, query_log_id, result))) { // subsequent code will judge the error number, determines if need tot return error. CSR_LOG(TRACE, "get_cursor_from_file_ failed", K(ret), K(partition_key), K(query_log_id)); - // handle logs betweent ilog_store and memstore. + // handle logs between ilog_store and memstore. if (OB_ERR_OUT_OF_UPPER_BOUND == ret) { if (OB_SUCCESS == tmp_ret && query_log_id < min_log_id) { CSR_LOG(INFO, diff --git a/src/clog/ob_ilog_storage.h b/src/clog/ob_ilog_storage.h index c1761c192..64425e39e 100644 --- a/src/clog/ob_ilog_storage.h +++ b/src/clog/ob_ilog_storage.h @@ -111,7 +111,7 @@ public: // 1) OB_SUCCESS // 2) OB_ERR_OUT_OF_UPPER_BOUND // 3) OB_CURSOR_NOT_EXIST - // 4) OB_NEED_RETRY, query log for old version, if ilog file hasn't beed loadm, need caller retry + // 4) OB_NEED_RETRY, query log for old version, if ilog file hasn't been loaded, need caller retry int get_cursor_batch( const common::ObPartitionKey& partition_key, const uint64_t query_log_id, ObGetCursorResult& result); int get_cursor_batch_from_file( @@ -120,7 +120,7 @@ public: // 1) OB_SUCCESS // 2) OB_ERR_OUT_OF_UPPER_BOUND // 3) OB_CURSOR_NOT_EXIST - // 4) OB_NEED_RETRY, query log for old version, if ilog file hasn't beed loadm, need caller retry + // 4) OB_NEED_RETRY, query log for old version, if ilog file hasn't been loaded, need caller retry int get_cursor( const common::ObPartitionKey& partition_key, const uint64_t query_log_id, ObLogCursorExt& log_cursor_ext); int submit_cursor( diff --git a/src/clog/ob_ilog_store.cpp b/src/clog/ob_ilog_store.cpp index 4e000b162..b970f2c71 100644 --- a/src/clog/ob_ilog_store.cpp +++ b/src/clog/ob_ilog_store.cpp @@ -271,7 +271,7 @@ private: } } else if (entry_has_merged.max_log_id_ != entry_to_merge.min_log_id_ - 1) { // during merge, log in different memstore may be not continous, - // because of partition migrattion + // because of partition migration ret = OB_EAGAIN; CLOG_LOG( WARN, "insert_into_block failed because of not continous", K(ret), K(entry_to_merge), K(entry_has_merged)); @@ -968,7 +968,7 @@ void ObIlogStore::runTimerTask() // whatever the trigger_type is, need to dump memstore to disk } else if (OB_FAIL(build_and_write_file_(builder))) { CLOG_LOG(ERROR, "build_and_write_file_ failed", K(ret)); - // whatever the trigger_type is, need to update flused_ilog_id + // whatever the trigger_type is, need to update fused_ilog_id } else if (OB_FAIL(update_max_flushed_ilog_id_(builder.get_index_info_block_map()))) { CSR_LOG(ERROR, "update_max_flushed_ilog_id_ failed", K(ret)); } else if (OB_FAIL(handle_different_trigger_type_(memstore_after_merge, end_idx, free_memstore_array, builder))) { @@ -1199,9 +1199,9 @@ int ObIlogStore::get_merge_range_(int64_t& end_idx, bool& need_switch_file) need_switch_file = true; } else if (OB_UNLIKELY(NULL == memstore)) { ret = OB_ERR_UNEXPECTED; - CLOG_LOG(ERROR, "unexpect error becauese memstore is nullptr", K(ret)); + CLOG_LOG(ERROR, "unexpect error because memstore is nullptr", K(ret)); } else if (OB_FAIL(memstore->get_cursor_size(tmp_cursor_size))) { - CLOG_LOG(ERROR, "get_cusrsor_size failed", K(ret)); + CLOG_LOG(ERROR, "get_cursor_size failed", K(ret)); } else if (OB_FAIL(memstore->get_clog_size(tmp_clog_size))) { CLOG_LOG(ERROR, "get_clog_size failed", K(ret)); // Try to ensure the total size of each file does not exceed 32MB, @@ -1306,7 +1306,7 @@ int ObIlogStore::check_need_dump_(bool& need_dump, int64_t curr_memstore_seq) return ret; } -// 1. if reanme failed, it will kill observer +// 1. if rename failed, it will kill observer // 2. if push item to free_memstore_array failed, it will do same thing above // 3. if remove item from free_memstore_array failed, it will do same thing above int ObIlogStore::handle_different_trigger_type_(const FrozenMemstore& memstore_after_merge, const int64_t& end_idx, @@ -1320,7 +1320,7 @@ int ObIlogStore::handle_different_trigger_type_(const FrozenMemstore& memstore_a CLOG_LOG(ERROR, "ilog store not inited", K(ret)); } else if (!memstore_after_merge.is_valid()) { ret = OB_INVALID_ARGUMENT; - CLOG_LOG(ERROR, "invalid arguent", K(ret), K(memstore_after_merge)); + CLOG_LOG(ERROR, "invalid argument", K(ret), K(memstore_after_merge)); } else if (!need_merge_frozen_memstore_array_by_trigger_type_(trigger_type) && OB_FAIL(file_id_cache_->append(next_ilog_file_id_, builder.get_index_info_block_map()))) { CSR_LOG(ERROR, "file_id_cache_ append failed", K(ret), K(next_ilog_file_id_)); diff --git a/src/clog/ob_ilog_store.h b/src/clog/ob_ilog_store.h index c97fc299c..bbf37130c 100644 --- a/src/clog/ob_ilog_store.h +++ b/src/clog/ob_ilog_store.h @@ -115,7 +115,7 @@ private: const static int64_t DEFAULT_MEMSTORE_COUNT = 16; const static int64_t TIMER_TASK_INTERVAL = 1000; // PINNED_MEMORY_SIZE should set as ObIlogMemstore::CURSOR_SIZE_TRIGGER(32MB) - // however, in concurrent secenarios, it will causes that the size of + // however, in concurrent scenarios, it will causes that the size of // ObIlogMemstore will exceed than ObIlogMemstore::CURSOR_SIZE_TRIGGER. // therefore, set PINNED_MEMORY_SIZE as double ObIlogMemstore::CURSOR_SIZE_TRIGGER const static int64_t PINNED_MEMORY_SIZE = 2 * ObIlogMemstore::CURSOR_SIZE_TRIGGER; @@ -150,7 +150,7 @@ private: // merge all ObIlogMemstore in [0, end_idx] to merge_after_memstore // end_idx is the last index of frozen_memstore_array_ - // memstore_after_merge is the container to merge forzen_memstore_array_ + // memstore_after_merge is the container to merge frozen_memstore_array_ int merge_frozen_memstore_(int64_t& end_idx, FrozenMemstore& memstore_after_merge); int build_and_write_file_(ObIlogFileBuilder& builder); int check_need_dump_(bool& need_dump, int64_t curr_memstore_seq); @@ -161,10 +161,10 @@ private: // free_memstore_array_ records the memstore need to release memory // builder is used to write memstore_after_merge into file // 1) if trigger_type is OB_TIMER_TRIGGER_TYPE or OB_CLOG_SIZE_TRIGGER_TYPE, - // don't need apeend info_block into file_id_cache, free_memstore_array records the + // don't need append info_block into file_id_cache, free_memstore_array records the // memstore located in [0, end_idx). // 2) if trigger_type is OB_ILOG_NOT_CONTINOUS_TYPE or OB_MERGE_NEED_SWITCH_FILE_TRIGGER_TYPE, - // need append info_block into file_id_cache and swith ilog file, free_memstore_array + // need append info_block into file_id_cache and switch ilog file, free_memstore_array // records the memstore located in [0, end_idx] int handle_different_trigger_type_(const FrozenMemstore& memstore_after_merge, const int64_t& end_idx, IlogMemstoreArray& free_memstore_array, ObIlogFileBuilder& builder); diff --git a/src/clog/ob_info_block_handler.h b/src/clog/ob_info_block_handler.h index 78ec9db0e..de25b83e4 100644 --- a/src/clog/ob_info_block_handler.h +++ b/src/clog/ob_info_block_handler.h @@ -146,10 +146,10 @@ private: NeedFreezePartitionArray& partition_array, const common::ObPartitionKey& partition_key, const uint64_t log_id); private: - // adapt hashmap forech, used to traverse infoblock. + // adapt hashmap foreach, used to traverse infoblock. // 1. during the restart phase, log_scan_runnable will compare max_log_id which // is record in infoblock with last_replay_log_id which is record in base_storage_info, - // if last_replay_log_id is greator than max_log_id, means that the file needn't + // if last_replay_log_id is greater than max_log_id, means that the file needn't // to read. class CheckFileCanBeSkippedFunctor { public: @@ -322,7 +322,7 @@ private: TstampArray& max_log_tstamp_array_; }; - // InfoEntry loader, inclued: + // InfoEntry loader, included: // 1. min_log_id // 2. min_log_timestamp // 3. max_log_timestamp diff --git a/src/clog/ob_log_archive_and_restore_driver.cpp b/src/clog/ob_log_archive_and_restore_driver.cpp index a81c90e93..4ff37565b 100644 --- a/src/clog/ob_log_archive_and_restore_driver.cpp +++ b/src/clog/ob_log_archive_and_restore_driver.cpp @@ -82,7 +82,7 @@ void ObLogArchiveAndRestoreDriver::run1() lib::set_thread_name("LogArchiveDri"); ObCurTraceId::init(GCONF.self_addr_); state_driver_loop(); - CLOG_LOG(INFO, "ob_log_archvie_and_restore_driver will stop"); + CLOG_LOG(INFO, "ob_log_archive_and_restore_driver will stop"); } void ObLogArchiveAndRestoreDriver::state_driver_loop() diff --git a/src/clog/ob_log_cascading_mgr.cpp b/src/clog/ob_log_cascading_mgr.cpp index b24491edf..7afcf79ee 100644 --- a/src/clog/ob_log_cascading_mgr.cpp +++ b/src/clog/ob_log_cascading_mgr.cpp @@ -389,7 +389,7 @@ int ObLogCascadingMgr::process_reject_msg( if (server == parent_.get_server()) { if (state_mgr_->is_cluster_allow_vote() && ObReplicaTypeCheck::is_paxos_replica_V2(mm_->get_replica_type()) && server == state_mgr_->get_leader()) { - // paxos replica that colocates with strong leader won't reset parent, + // paxos replica that colocated with strong leader won't reset parent, // because maybe leader is not elected yet if (REACH_TIME_INTERVAL(5 * 1000 * 1000)) { CLOG_LOG(WARN, @@ -580,7 +580,7 @@ int ObLogCascadingMgr::primary_process_protect_mode_switch() ret = OB_ERR_UNEXPECTED; CLOG_LOG(ERROR, "sync_cluster_id returned by GCTX is invalid", K_(partition_key), K(sync_cluster_id), K(ret)); } else if (has_async_standby_child_(sync_cluster_id, dst_standby_child)) { - // if it is aysnc child, change it to sync child + // if it is async child, change it to sync child if (OB_FAIL(async_standby_children_.remove_server(dst_standby_child))) { CLOG_LOG(WARN, "async_standby_children_ remove server failed", K_(partition_key), K(ret), K(dst_standby_child)); } else { @@ -592,7 +592,7 @@ int ObLogCascadingMgr::primary_process_protect_mode_switch() } else { // reset sync_standby_child_ sync_standby_child_.reset(); - // need get sync stadnby_leader from location cache, it may returns -4023, just ignore + // need get sync standby_leader from location cache, it may returns -4023, just ignore int tmp_ret = OB_SUCCESS; if (OB_SUCCESS != (tmp_ret = leader_try_update_sync_standby_child_unlock_(true))) { CLOG_LOG(WARN, "leader_try_update_sync_standby_child_unlock_ failed", K_(partition_key), K(tmp_ret)); @@ -623,13 +623,13 @@ int ObLogCascadingMgr::leader_try_update_sync_standby_child_unlock_(const bool n CLOG_LOG(WARN, "self is not leader", K_(partition_key), K(ret)); } else if (!GCTX.need_sync_to_standby() || ObMultiClusterUtil::is_cluster_private_table(partition_key_.get_table_id())) { - // not sync mode or private talbe, skip + // not sync mode or private table, skip } else { int64_t sync_cluster_id = OB_INVALID_CLUSTER_ID; if (OB_FAIL(get_sync_standby_cluster_id(sync_cluster_id)) || OB_INVALID_CLUSTER_ID == sync_cluster_id) { CLOG_LOG(WARN, "get_sync_standby_cluster_id failed", K_(partition_key), K(ret)); } else { - // retrieve sync standby_leader from lcoation cache with renew + // retrieve sync standby_leader from location cache with renew bool need_renew = need_renew_loc; const int64_t now = ObTimeUtility::current_time(); if (need_renew && (OB_INVALID_TIMESTAMP == last_renew_standby_loc_time_ || @@ -747,13 +747,13 @@ int ObLogCascadingMgr::process_fetch_reg_server_req(const common::ObAddr& server int64_t assigned_parent_cluster_id = self_cluster_id; // rules that assigning parent for non-paxos replicas: - // if self is a follwer, try to become its parent Preferentially + // if self is a follower, try to become its parent Preferentially // if self is leader, try to allocate candidates from children // 0. is_need_force_register = true, leader need force add it to children if (LEADER == state_mgr_->get_role() || STANDBY_LEADER == state_mgr_->get_role()) { if (cluster_id == self_cluster_id && ObReplicaTypeCheck::is_paxos_replica_V2(replica_type) && !mm_->get_curr_member_list().contains(server)) { - // for rpelica that not in same cluster with leader, no need assing parent + // for replica that not in same cluster with leader, no need assing parent is_need_assign_parent = false; is_need_response = false; } else if (mm_->get_curr_member_list().contains(server)) { @@ -936,7 +936,7 @@ int ObLogCascadingMgr::process_fetch_reg_server_req(const common::ObAddr& server return ret; } -/* assgin parent response */ +/* assign parent response */ int ObLogCascadingMgr::process_fetch_reg_server_resp(const common::ObAddr& sender, const bool is_assign_parent_succeed, const ObCascadMemberList& candidate_list, const int32_t msg_type, const common::ObRegion& self_region) { @@ -956,7 +956,7 @@ int ObLogCascadingMgr::process_fetch_reg_server_resp(const common::ObAddr& sende // sender is not last_request_candidate_ CLOG_LOG(WARN, "sender is not last_request_candidate_", K_(partition_key), K(sender), K(last_request_candidate_)); } else if (is_assign_parent_succeed) { - // assign parent succeussfully + // assign parent successfully ObCascadMember new_parent; if (OB_FAIL(candidate_list.get_member_by_index(0, new_parent))) { CLOG_LOG(WARN, "candidate_list.get_server_by_index failed", K_(partition_key), K(ret), K(candidate_list)); @@ -982,7 +982,7 @@ int ObLogCascadingMgr::process_fetch_reg_server_resp(const common::ObAddr& sende CLOG_LOG(WARN, "request_replace_sick_child failed", K(ret), K_(partition_key), K(its_parent), K(sender)); } else { if (REACH_TIME_INTERVAL(1000 * 1000)) { - CLOG_LOG(INFO, "detect sick candidate, try to replcace it", K_(partition_key), K(its_parent), K(sender)); + CLOG_LOG(INFO, "detect sick candidate, try to replace it", K_(partition_key), K(its_parent), K(sender)); } last_request_candidate_ = its_parent.get_server(); need_request_next_level = false; @@ -1401,7 +1401,7 @@ int ObLogCascadingMgr::try_request_next_candidate_(const common::ObRegion& self_ } else if (candidate_server_list_.get_member_number() <= 0) { // candidate_list is already empty if (last_request_candidate_.is_valid()) { - // after request all candidates, but still failed, it need request leader to force becaming its child. + // after request all candidates, but still failed, it need request leader to force becoming its child. ObCascadMember cascad_leader; (void)state_mgr_->get_cascad_leader(cascad_leader); @@ -1486,7 +1486,7 @@ int ObLogCascadingMgr::fetch_register_server(const common::ObAddr& dst_server, c ret = OB_STATE_NOT_MATCH; if (REACH_TIME_INTERVAL(1000 * 1000)) { CLOG_LOG(WARN, - "non-private table in disabled state, cannot fetch_regitster_server from diff cluster server", + "non-private table in disabled state, cannot fetch_register_server from diff cluster server", K(ret), K_(partition_key)); } @@ -1617,7 +1617,7 @@ int ObLogCascadingMgr::check_parent_state(const int64_t now, const common::ObReg } } } else { - // request next cadidate succeed, update check time + // request next candidate succeed, update check time last_check_parent_time_ = now; } } diff --git a/src/clog/ob_log_common.h b/src/clog/ob_log_common.h index fade8c407..908706437 100644 --- a/src/clog/ob_log_common.h +++ b/src/clog/ob_log_common.h @@ -76,7 +76,7 @@ public: } else if (NULL == (val = new (std::nothrow) T())) { CLOG_LOG(WARN, "alloc value error", KP(val)); } else if (0 != (err = pthread_setspecific(key_, val))) { - CLOG_LOG(WARN, "pthead set specific error", K(err), K(key_)); + CLOG_LOG(WARN, "pthread set specific error", K(err), K(key_)); } if (0 != err) { release(val); diff --git a/src/clog/ob_log_direct_reader.cpp b/src/clog/ob_log_direct_reader.cpp index c89340234..e5688ceab 100644 --- a/src/clog/ob_log_direct_reader.cpp +++ b/src/clog/ob_log_direct_reader.cpp @@ -411,7 +411,7 @@ int64_t ObLogDirectReader::calc_read_size(const int64_t rbuf_len, const offset_t const int64_t size_limitted_by_file_size = limit_by_file_size(line_key_offset + try_read_size) - line_key_offset; // read size cannot exceed the length of the buff const int64_t unaligned_read_size = std::min(rbuf_len, size_limitted_by_file_size); - // avoid incomplate data in line cache + // avoid incompleted data in line cache const int64_t read_size = do_align_offset((offset_t)unaligned_read_size, CLOG_CACHE_SIZE); return read_size; } @@ -476,7 +476,7 @@ int ObLogDirectReader::put_into_kvcache(const common::ObAddr& addr, const int64_ return ret; } -// The buffser used to read is thread local, line_buf points to this buffer. +// The buffer used to read is thread local, line_buf points to this buffer. int ObLogDirectReader::read_disk_and_update_kvcache(const common::ObAddr& addr, const int64_t seq, const file_id_t want_file_id, const offset_t line_key_offset, ObReadBuf& read_buf, const char*& line_buf, ObReadCost& cost) @@ -906,7 +906,7 @@ int ObLogDirectReader::get_log_file_type(ObLogWritePoolType& file_type) const return ret; } -// read data from disk directlly +// read data from disk directly int ObLogDirectReader::read_data_direct_impl( const ObReadParam& param, ObReadBuf& rbuf, ObReadRes& res, ObReadCost& cost) { @@ -916,7 +916,7 @@ int ObLogDirectReader::read_data_direct_impl( ret = OB_NOT_INIT; CLOG_LOG(WARN, "direct read not init", K(ret), K(param)); } else if (OB_FAIL(is_valid_read_param(param, is_valid_param))) { - CLOG_LOG(WARN, "is_valid_read_param falied", K(ret), K(param), K(is_valid_param)); + CLOG_LOG(WARN, "is_valid_read_param failed", K(ret), K(param), K(is_valid_param)); } else if (OB_UNLIKELY(!is_valid_param) || OB_UNLIKELY(!rbuf.is_valid())) { ret = OB_INVALID_ARGUMENT; CLOG_LOG(WARN, "invalid read argument", K(ret), K(param), K(rbuf)); diff --git a/src/clog/ob_log_direct_reader.h b/src/clog/ob_log_direct_reader.h index 58e6852ea..cc06d1ba1 100644 --- a/src/clog/ob_log_direct_reader.h +++ b/src/clog/ob_log_direct_reader.h @@ -80,7 +80,7 @@ public: public: // Interface of read - // Read data from disk directlly + // Read data from disk directly // // Feature: // 1. rbuf is aligned by CLOG_DIO_ALIGN_SIZE diff --git a/src/clog/ob_log_engine.cpp b/src/clog/ob_log_engine.cpp index 69090bc80..153194cef 100644 --- a/src/clog/ob_log_engine.cpp +++ b/src/clog/ob_log_engine.cpp @@ -1585,7 +1585,7 @@ int ObLogEngine::prepare_response(const common::ObAddr& server, const int64_t ds K(self_cluster_id)); } else { CLOG_LOG(INFO, - "-->prepare_respone", + "-->prepare_response", K(partition_key), K(proposal_id), K(max_log_id), diff --git a/src/clog/ob_log_entry.h b/src/clog/ob_log_entry.h index 8fa8728b2..40180328c 100644 --- a/src/clog/ob_log_entry.h +++ b/src/clog/ob_log_entry.h @@ -160,7 +160,7 @@ private: file_id_t file_id_; offset_t offset_; int32_t size_; - // To facilitate compatibility processing, use the highest bit of submit_timestmap_ to indicate whether + // To facilitate compatibility processing, use the highest bit of submit_timestamp_ to indicate whether // batch_committed The remaining 63 bits are still used to represent timestamp information int64_t submit_timestamp_; int64_t accum_checksum_; diff --git a/src/clog/ob_log_entry_header.h b/src/clog/ob_log_entry_header.h index 9514443a5..7ced12f73 100644 --- a/src/clog/ob_log_entry_header.h +++ b/src/clog/ob_log_entry_header.h @@ -237,7 +237,7 @@ private: int64_t data_checksum_; common::ObVersion freeze_version_; - // The checksum of log header, acquirements: + // The checksum of log header, acquirement: // 1. Must locate in the last line of class declaration // 2. Must not exist virtual funtion // 3. Must keep the variable before this is 64-bit aligned diff --git a/src/clog/ob_log_external_executor_v2.cpp b/src/clog/ob_log_external_executor_v2.cpp index 0827b5154..10398aa80 100644 --- a/src/clog/ob_log_external_executor_v2.cpp +++ b/src/clog/ob_log_external_executor_v2.cpp @@ -636,7 +636,7 @@ int ObLogExternalExecutorWithBreakpoint::ts_handle_cold_pkeys_by_last_info( int64_t info_min_ts = OB_INVALID_TIMESTAMP; if (OB_ISNULL(log_engine_) || OB_ISNULL(search_status)) { ret = OB_ERR_UNEXPECTED; - EXTLOG_LOG(ERROR, "log_engine_ or search_satus is null", K(ret), KP(log_engine_), KP(search_status)); + EXTLOG_LOG(ERROR, "log_engine_ or search_status is null", K(ret), KP(log_engine_), KP(search_status)); } else { if (OB_FAIL(log_engine_->get_ilog_memstore_min_log_id_and_ts(pkey, info_min_log_id, info_min_ts))) { if (OB_PARTITION_NOT_EXIST == ret) { @@ -685,7 +685,7 @@ int ObLogExternalExecutorWithBreakpoint::id_handle_cold_pkeys_by_last_info( int64_t info_min_ts = OB_INVALID_TIMESTAMP; if (OB_ISNULL(log_engine_) || OB_ISNULL(search_status)) { ret = OB_ERR_UNEXPECTED; - EXTLOG_LOG(ERROR, "log_engine_ or search_satus is null", K(ret), KP(log_engine_), KP(search_status)); + EXTLOG_LOG(ERROR, "log_engine_ or search_status is null", K(ret), KP(log_engine_), KP(search_status)); } else { if (OB_FAIL(log_engine_->get_ilog_memstore_min_log_id_and_ts(pkey, info_min_log_id, info_min_ts))) { if (OB_PARTITION_NOT_EXIST == ret) { @@ -703,7 +703,7 @@ int ObLogExternalExecutorWithBreakpoint::id_handle_cold_pkeys_by_last_info( EXTLOG_LOG(TRACE, "get info entry success", K(pkey), K(info_min_log_id), K(info_min_ts)); if (start_log_id >= info_min_log_id) { search_status->search_by_id_.err_ = OB_SUCCESS; - // If log file is swithed, the return progress.max_file_id_ may be too small, which is safe + // If log file is switched, the return progress.max_file_id_ may be too small, which is safe search_status->search_by_id_.res_file_id_ = progress.max_file_id_; search_status->set_finished(); progress.finish_one(); diff --git a/src/clog/ob_log_external_rpc.cpp b/src/clog/ob_log_external_rpc.cpp index 96db38b94..1d8a151cf 100644 --- a/src/clog/ob_log_external_rpc.cpp +++ b/src/clog/ob_log_external_rpc.cpp @@ -678,7 +678,7 @@ int ObLogExternalFetchLogResponse::append_offline_partition(const ObPartitionKey OfflinePartition offline; if (!pkey.is_valid() || sync_ts <= 0) { ret = OB_INVALID_ARGUMENT; - EXTLOG_LOG(WARN, "append offline parittion error", K(ret), K(pkey), K(sync_ts)); + EXTLOG_LOG(WARN, "append offline partition error", K(ret), K(pkey), K(sync_ts)); } else { offline.pkey_ = pkey; offline.sync_ts_ = sync_ts; diff --git a/src/clog/ob_log_fetcher_impl.cpp b/src/clog/ob_log_fetcher_impl.cpp index a65c319b3..91e670a94 100644 --- a/src/clog/ob_log_fetcher_impl.cpp +++ b/src/clog/ob_log_fetcher_impl.cpp @@ -180,7 +180,7 @@ int ObLogFetcherImpl::read_uncompressed_data_from_line_cache_(file_id_t file_id, } else if (OB_UNLIKELY(uncompress_size != origin_size)) { ret = OB_ERR_UNEXPECTED; CLOG_LOG(WARN, - "data may be corruptted", + "data may be corrupted", K(uncompress_size), K(origin_size), K(file_id), diff --git a/src/clog/ob_log_line_cache.cpp b/src/clog/ob_log_line_cache.cpp index 12f1d7879..ba30fcdb3 100644 --- a/src/clog/ob_log_line_cache.cpp +++ b/src/clog/ob_log_line_cache.cpp @@ -167,7 +167,7 @@ int ObLogLineCache::handle_when_block_conflict_( LOG_WARN("do_wash_block_ fail", K(ret), K(block_id), K(expire_time), K(cur_tstamp)); } else { if (wash_succeed) { - // eliminated uccessfully + // eliminated successfully done = true; } else { // eliminated failed, wait @@ -308,7 +308,7 @@ int ObLogLineCache::get_line( // timeout reason = GetLineTimeoutReason::BLOCK_NOT_HIT_TIMEOUT; } else if (OB_ITEM_NOT_MATCH == ret) { - // block conflct, retry directly + // block conflict, retry directly ret = OB_SUCCESS; } else { LOG_WARN("handle_when_block_not_hit_ fail", K(ret), K(block_index), K(file_id), K(end_tstamp), K(block)); diff --git a/src/clog/ob_log_line_cache.h b/src/clog/ob_log_line_cache.h index e803a7d24..014548913 100644 --- a/src/clog/ob_log_line_cache.h +++ b/src/clog/ob_log_line_cache.h @@ -452,7 +452,7 @@ private: // FIXME: ObCond can only wake up one waiter, cond which can be broadcast should be used here common::ObCond block_wash_cond_; - // cached Line combing + // cached Line combine int64_t cached_line_count_ CACHE_ALIGNED; // Statistics diff --git a/src/clog/ob_log_membership_mgr_V2.cpp b/src/clog/ob_log_membership_mgr_V2.cpp index 47250d03e..245d4f2d7 100644 --- a/src/clog/ob_log_membership_mgr_V2.cpp +++ b/src/clog/ob_log_membership_mgr_V2.cpp @@ -533,7 +533,7 @@ int ObLogMembershipMgr::force_set_member_list(const common::ObMemberList& member int ObLogMembershipMgr::set_membership_info(const common::ObMemberList& member_list, const int64_t membership_timestamp, const uint64_t membership_log_id, const int64_t replica_num, const common::ObProposalID& ms_proposal_id) { - // Migrator guarantees the base_storage_info is from same cluster. + // Migratory guarantees the base_storage_info is from same cluster. int ret = OB_SUCCESS; if (IS_NOT_INIT) { ret = OB_NOT_INIT; @@ -987,7 +987,7 @@ int ObLogMembershipMgr::receive_recovery_log( int64_t pos = 0; if (IS_NOT_INIT) { ret = OB_NOT_INIT; - CLOG_LOG(WARN, "ObLogMembershioMgr is not inited", KR(ret), K_(partition_key), K(log_entry)); + CLOG_LOG(WARN, "ObLogMembershipMgr is not inited", KR(ret), K_(partition_key), K(log_entry)); } else if (OB_ISNULL(state_mgr_) || OB_ISNULL(sw_)) { ret = OB_ERR_UNEXPECTED; CLOG_LOG(WARN, "state_mgr_ is NULL or sw_ is NULL", KR(ret), K_(partition_key), K(log_entry)); @@ -1034,7 +1034,7 @@ int ObLogMembershipMgr::write_start_membership(const ObLogType& log_type) ret = OB_NOT_INIT; CLOG_LOG(ERROR, "ObLogMembershipMgr is not inited", K(ret), K(partition_key_)); } else if (OB_LOG_START_MEMBERSHIP == log_type) { - // To update memberhsip_log_id_ and other member, wlock is needed + // To update membership_log_id_ and other member, wlock is needed WLockGuard guard(lock_); if (!state_mgr_->can_submit_start_working_log()) { ret = OB_STATE_NOT_MATCH; @@ -1051,7 +1051,7 @@ int ObLogMembershipMgr::write_start_membership(const ObLogType& log_type) membership_log_id_ = log_id; } } else if (OB_LOG_RENEW_MEMBERSHIP == log_type) { - // To update memberhsip_log_id_ and other member, wlock is needed + // To update membership_log_id_ and other member, wlock is needed WLockGuard guard(lock_); // standby_leader writes start_working log // set renew_ms_log_id to max_log_id+1 @@ -1672,7 +1672,7 @@ void ObLogMembershipMgr::submit_success_cb_task(const ObLogType& log_type, const CLOG_LOG(WARN, "ObLogMembershipMgr is not inited", K_(partition_key), K(tmp_ret)); } else if (OB_ISNULL(state_mgr_) || OB_ISNULL(cb_engine_)) { tmp_ret = OB_INVALID_ARGUMENT; - CLOG_LOG(WARN, "invalid arugment", K_(partition_key), K(tmp_ret)); + CLOG_LOG(WARN, "invalid argument", K_(partition_key), K(tmp_ret)); } else if (OB_LOG_MEMBERSHIP == log_type || OB_LOG_START_MEMBERSHIP == log_type) { ObMembershipLog ms_log; if (OB_SUCCESS != (tmp_ret = ms_log.deserialize(log_buf, log_buf_len, pos))) { @@ -1776,7 +1776,7 @@ void ObLogMembershipMgr::reset_follower_pending_entry() CLOG_LOG(WARN, "ObLogMembershipMgr is not inited", K_(partition_key), K(ret)); } else if (OB_ISNULL(alloc_mgr_)) { ret = OB_INVALID_ARGUMENT; - CLOG_LOG(WARN, "invalid arugment", K_(partition_key), KP(alloc_mgr_)); + CLOG_LOG(WARN, "invalid argument", K_(partition_key), KP(alloc_mgr_)); } else { has_follower_pending_entry_ = false; char* prev_buff = const_cast(follower_pending_entry_.get_buf()); diff --git a/src/clog/ob_log_membership_task_mgr.cpp b/src/clog/ob_log_membership_task_mgr.cpp index 93b23c058..7965fca34 100644 --- a/src/clog/ob_log_membership_task_mgr.cpp +++ b/src/clog/ob_log_membership_task_mgr.cpp @@ -486,7 +486,7 @@ int ObLogMembershipTaskMgr::submit_renew_ms_log_(const ObRenewMembershipLog& ren } else { if (OB_FAIL(submit_slog_flush_task_(header.get_log_type(), log_id, renew_ms_log, server, cluster_id))) { // If the submission fails, set_log will not be executed. - // standby_leadera will retry, + // standby_leaders will retry, // follower will receive log again later. CLOG_LOG(WARN, "submit_slog_flush_task_ failed", K(ret), K_(partition_key), K(header)); } else if (OB_FAIL(log_task->set_log(header, buff, need_copy))) { diff --git a/src/clog/ob_log_reconfirm.cpp b/src/clog/ob_log_reconfirm.cpp index 1b66db28b..be482dc30 100644 --- a/src/clog/ob_log_reconfirm.cpp +++ b/src/clog/ob_log_reconfirm.cpp @@ -635,7 +635,7 @@ int ObLogReconfirm::try_filter_invalid_log_() if (OB_LOG_NOP == header->get_log_type()) { const ObProposalID curr_proposal_id = state_mgr_->get_proposal_id(); header->set_log_type(OB_LOG_TRUNCATE); // update log_type - header->set_epoch_id(curr_proposal_id.ts_); // updatge epoch_id + header->set_epoch_id(curr_proposal_id.ts_); // update epoch_id header->update_header_checksum(); // update header_checksum // advance leader_ts_ to filter subsequent logs leader_ts_ = header->get_epoch_id(); @@ -1376,7 +1376,7 @@ int ObLogReconfirm::receive_log(const ObLogEntry& log_entry, const ObAddr& serve const uint64_t range_start_id = log_info_array_.get_start_id(); const uint64_t range_end_id = log_info_array_.get_end_id(); if (START_WORKING == state_) { - CLOG_LOG(INFO, "reveive log in START_WORKING state, ignore", K_(state), K_(partition_key), K(log_id)); + CLOG_LOG(INFO, "receive log in START_WORKING state, ignore", K_(state), K_(partition_key), K(log_id)); } else if (state_ != RECONFIRMING) { ret = OB_STATE_NOT_MATCH; CLOG_LOG(WARN, "receive log in wrong state", K(ret), K_(state), K_(partition_key), K(server), K(log_id)); @@ -1490,7 +1490,7 @@ int ObLogReconfirm::generate_nop_log_(const uint64_t log_id, const int64_t idx) } else { ObLogEntryHeader header; ObLogEntry log_entry; - // set proposal_id to 0, ensure that if there is a valid log, it will be rewrited + // set proposal_id to 0, ensure that if there is a valid log, it will be rewritten // set epoch_id_ to 0, it will be filtered out later ObProposalID invalid_proposal_id; const bool is_trans_log = false; diff --git a/src/clog/ob_log_restore_mgr.cpp b/src/clog/ob_log_restore_mgr.cpp index 0af9cf18a..01af1107e 100644 --- a/src/clog/ob_log_restore_mgr.cpp +++ b/src/clog/ob_log_restore_mgr.cpp @@ -87,7 +87,7 @@ int ObLogRestoreMgr::leader_takeover_() if (!is_inited_) { ret = OB_NOT_INIT; } else if (RESTORE_LEADER == role_) { - CLOG_LOG(WARN, "self is already resore leader", K(ret), K_(partition_key), K_(role)); + CLOG_LOG(WARN, "self is already restore leader", K(ret), K_(partition_key), K_(role)); } else { role_ = RESTORE_LEADER; restore_leader_ = self_; diff --git a/src/clog/ob_log_sliding_window.cpp b/src/clog/ob_log_sliding_window.cpp index 73b200581..eb479a81f 100644 --- a/src/clog/ob_log_sliding_window.cpp +++ b/src/clog/ob_log_sliding_window.cpp @@ -630,7 +630,7 @@ int ObLogSlidingWindow::alloc_log_id_ts_(const int64_t base_timestamp, uint64_t& if (OB_SUCCESS == ret && NULL != aggre_buffer_ && state_mgr_->is_leader_active()) { if (log_id < aggre_buffer_start_id_) { ret = OB_ERR_UNEXPECTED; - CLOG_LOG(ERROR, "alloc invalue log_id", K(log_id), K(aggre_buffer_start_id_)); + CLOG_LOG(ERROR, "alloc invalid log_id", K(log_id), K(aggre_buffer_start_id_)); } else { if (AGGRE_BUFFER_FLAG != tmp_offset) { ret = fill_aggre_buffer_(log_id - 1, tmp_offset, NULL, 0, 0, NULL); @@ -1384,7 +1384,7 @@ int ObLogSlidingWindow::submit_to_sliding_window_(const ObLogEntryHeader& header // Rely on this forwarding to trigger re-collection of ack standby_need_send_follower = true; } - // standby leadre replies ack to primary leader + // standby leader replies ack to primary leader if (log_task->is_majority_finished()) { if (OB_FAIL(send_standby_log_ack_(server, cluster_id, log_id, proposal_id))) { CLOG_LOG(WARN, @@ -1689,7 +1689,7 @@ int ObLogSlidingWindow::submit_confirmed_info_( } // confirmed log may be slide out during reconfirm if (is_leader && OB_ERROR_OUT_OF_RANGE == ret) { - CLOG_LOG(INFO, "log task slide out while submnit confirm info", K(ret), K_(partition_key), K(log_id)); + CLOG_LOG(INFO, "log task slide out while submit confirm info", K(ret), K_(partition_key), K(log_id)); ret = OB_SUCCESS; } return ret; @@ -3121,7 +3121,7 @@ bool ObLogSlidingWindow::is_freeze_log_(const char* log_buf, const int64_t log_b CLOG_LOG(WARN, "deserialize failed", K(ret), K_(partition_key)); } else { bool_ret = storage::ObStorageLogTypeChecker::is_freeze_log(log_type); - CLOG_LOG(DEBUG, "is freee log", K(ret), K_(partition_key), K(log_type)); + CLOG_LOG(DEBUG, "is free log", K(ret), K_(partition_key), K(log_type)); } return bool_ret; } @@ -3303,7 +3303,7 @@ int ObLogSlidingWindow::try_submit_replay_task_(const uint64_t log_id, const ObL log_buf_len = log_task.get_log_buf_len(); } else { ObLogEntry tmp_entry; - // here we use alloc_buf instead of ObReadBufGuard because allcating may not be need where + // here we use alloc_buf instead of ObReadBufGuard because allocating may not be need where // submit_log_body exists if (OB_FAIL(ObILogDirectReader::alloc_buf(ObModIds::OB_LOG_DIRECT_READER_CACHE_ID, rbuf))) { CLOG_LOG(WARN, "failed to alloc read_buf", K_(partition_key), K(log_id), K(log_task), K(ret)); @@ -3329,7 +3329,7 @@ int ObLogSlidingWindow::try_submit_replay_task_(const uint64_t log_id, const ObL } else if (OB_LOG_START_MEMBERSHIP == header_log_type) { need_replay = true; CLOG_LOG(TRACE, "submit replay success", K(ret), K_(partition_key), K(log_id)); - // new primary cluster leader rely on start_woring callback to flush member_list to pg_meta + // new primary cluster leader rely on start_wrong callback to flush member_list to pg_meta if (!ObMultiClusterUtil::is_cluster_private_table(partition_key_.get_table_id()) && OB_SUCCESS != (tmp_ret = try_submit_mc_success_cb_( header_log_type, log_id, log_buf, log_buf_len, log_task.get_proposal_id()))) { @@ -3486,7 +3486,7 @@ bool ObLogSlidingWindow::is_standby_leader_need_fetch_log_(const uint64_t start_ } else if (OB_INVALID_ID == start_log_id) { CLOG_LOG(WARN, "invalid argument", K_(partition_key), K(start_log_id)); } else if (STANDBY_LEADER != state_mgr_->get_role()) { - // not stadnby_leader, skip + // not standby_leader, skip } else { ObLogTask* log_task = NULL; const int64_t* ref = NULL; @@ -3594,7 +3594,7 @@ int ObLogSlidingWindow::follower_check_need_rebuild_(const uint64_t start_log_id int64_t dst_cluster_id = OB_INVALID_CLUSTER_ID; if (restore_mgr_->is_archive_restoring_log()) { - // folloer fetch log from restore_leader during physical restoring + // follower fetch log from restore_leader during physical restoring dst_server = restore_mgr_->get_restore_leader(); dst_cluster_id = state_mgr_->get_self_cluster_id(); } else { @@ -4647,7 +4647,7 @@ int ObLogSlidingWindow::resubmit_log(const ObLogInfo& log_info, ObISubmitLogCb* CLOG_LOG(WARN, "ObLogSlidingWindow is not inited", K(ret), K(partition_key_)); } else if (!log_info.is_valid() || OB_ISNULL(cb)) { ret = OB_INVALID_ARGUMENT; - CLOG_LOG(WARN, "invalid argumetns", K(ret), K(partition_key_), K(log_info), KP(cb)); + CLOG_LOG(WARN, "invalid arguments", K(ret), K(partition_key_), K(log_info), KP(cb)); } else if (OB_FAIL(resubmit_log_(log_info, cb))) { CLOG_LOG(WARN, "resubmit_log_ failed", K(ret), K(partition_key_), K(log_info)); } diff --git a/src/clog/ob_log_sliding_window.h b/src/clog/ob_log_sliding_window.h index 04faeadf1..48dcbf2f3 100644 --- a/src/clog/ob_log_sliding_window.h +++ b/src/clog/ob_log_sliding_window.h @@ -671,7 +671,7 @@ private: mutable int64_t fetch_log_warn_time_; mutable int64_t update_log_task_log_time_; mutable int64_t sync_replica_reset_fetch_state_time_; - // When calculating start_service_time during restart, it is necessary to filter out the partitons that have not + // When calculating start_service_time during restart, it is necessary to filter out the partitions that have not // updated next_replay_log_id_info in a period of time Such partition may have been deleted, or it may take a long // time to execute rebuild, which will affect the recovery time of the system; int64_t last_update_next_replay_log_id_info_ts_; diff --git a/src/clog/ob_log_state_mgr.cpp b/src/clog/ob_log_state_mgr.cpp index 4f0f6738a..89d8c071f 100644 --- a/src/clog/ob_log_state_mgr.cpp +++ b/src/clog/ob_log_state_mgr.cpp @@ -509,7 +509,7 @@ bool ObLogStateMgr::can_receive_log(const common::ObProposalID& proposal_id_in_r // non-private replica cannot receive log from a different cluster. if (REACH_TIME_INTERVAL(100 * 1000)) { CLOG_LOG(INFO, - "cannot receive_log from diff clulster in disabled state", + "cannot receive_log from diff cluster in disabled state", K(partition_key_), K(cluster_id), "self_cluster_id", @@ -820,7 +820,7 @@ int ObLogStateMgr::switch_state(bool& need_retry) need_next_loop = true; // 1) reconfirm or 2) fetch log from leader } } else { - // skip check leader during phsyical restore + // skip check leader during physical restore need_next_loop = false; } } else if (is_leader_reconfirm_() || is_standby_leader_reconfirm_()) { @@ -835,7 +835,7 @@ int ObLogStateMgr::switch_state(bool& need_retry) } else if (is_reconfirm_not_eagain_(ret)) { if (OB_SUCC(ret)) { ret = reconfirm_to_taking_over_(); - need_next_loop = true; // next loop whill check whether taking_over is done + need_next_loop = true; // next loop will check whether taking_over is done } else { ret = reconfirm_to_follower_active_(); } @@ -1112,9 +1112,9 @@ int ObLogStateMgr::handle_prepare_rqst( is_leader_changed = true; } if (!ObMultiClusterUtil::is_cluster_private_table(partition_key_.get_table_id()) && GCTX.is_standby_cluster()) { - // standby replcia need maintain prepared_primary_leader_, because when primary cluster is doing reconfirm, + // standby replica need maintain prepared_primary_leader_, because when primary cluster is doing reconfirm, // standby_leader may still does't know current primary_leader, so it cannot reply standby_ack to primary. - // Then priamry leader's reconfirm maybe slowed down, but standby_leader can send ack to + // Then primary leader's reconfirm maybe slowed down, but standby_leader can send ack to // prepared_primary_leader_ to avoid this bad case. ObCascadMember new_leader_member(new_leader, cluster_id); prepared_primary_leader_ = new_leader_member; @@ -1735,7 +1735,7 @@ int ObLogStateMgr::leader_active_to_revoking_() CLOG_LOG(ERROR, "clean sliding window failed", K_(partition_key), K(ret)); } else { reset_status_(); - CLOG_LOG(INFO, "standby_leader swtich to REVOKING state", K_(partition_key)); + CLOG_LOG(INFO, "standby_leader switch to REVOKING state", K_(partition_key)); } } else if (LEADER == role_) { if (OB_FAIL(sw_->leader_revoke())) { @@ -2154,7 +2154,7 @@ bool ObLogStateMgr::leader_active_need_switch_(bool& is_error) is_error = true; } else { // state_changed is false, check cluster type and status - // if primary cluster switches to standby,clog need do role chagne: leader->follower->standby_leader + // if primary cluster switches to standby,clog need do role change: leader->follower->standby_leader if (!ObMultiClusterUtil::is_cluster_private_table(partition_key_.get_table_id()) && GCTX.is_in_standby_active_state()) { state_changed = true; @@ -2230,7 +2230,7 @@ void ObLogStateMgr::primary_leader_check_start_log_state_( if (!GCTX.need_sync_to_standby() && GCTX.is_in_max_availability_mode() && log_task->is_local_majority_flushed()) { // primary leader in max_availability mode, already degraded to max_perf level - // start log reach majority, need swtich leader to self + // start log reach majority, need switch leader to self need_switch_leader_to_self = true; CLOG_LOG(INFO, "start log_task reach majority, primary leader need swtich to self", @@ -3381,7 +3381,7 @@ int ObLogStateMgr::standby_leader_check_protection_level_() } else if (max_confirmed_log_id >= standby_sync_start_id_) { standby_protection_level_ = MAXIMUM_PROTECTION_LEVEL; CLOG_LOG(INFO, - "swith protection_level to max_protection", + "switch protection_level to max_protection", K_(partition_key), K_(standby_protection_level), K_(standby_sync_start_id), diff --git a/src/clog/ob_log_type.cpp b/src/clog/ob_log_type.cpp index 424b9c70a..2d08e1ccd 100644 --- a/src/clog/ob_log_type.cpp +++ b/src/clog/ob_log_type.cpp @@ -117,7 +117,7 @@ int64_t ObMembershipLog::to_string(char* buf, const int64_t buf_len) const { int64_t pos = 0; databuff_printf(buf, buf_len, pos, "replica_num:%ld,", replica_num_); - databuff_printf(buf, buf_len, pos, "timetamp:%ld,", timestamp_); + databuff_printf(buf, buf_len, pos, "timestamp:%ld,", timestamp_); databuff_printf(buf, buf_len, pos, "member_list:%s,", to_cstring(&member_list_)); databuff_printf(buf, buf_len, pos, "prev_member_list:%s,", to_cstring(&prev_member_list_)); databuff_printf(buf, buf_len, pos, "type:%ld", type_); diff --git a/src/clog/ob_partition_log_packet_handler.cpp b/src/clog/ob_partition_log_packet_handler.cpp index c6630b4c1..6d9535b50 100644 --- a/src/clog/ob_partition_log_packet_handler.cpp +++ b/src/clog/ob_partition_log_packet_handler.cpp @@ -82,7 +82,7 @@ int ObPartitionLogPacketHandler::handle_single_request(ObLogReqContext& ctx) ObILogEngine* log_engine = NULL; if (OB_ISNULL(clog_mgr_) || (OB_ISNULL(log_engine = clog_mgr_->get_log_engine()))) { ret = OB_INVALID_ARGUMENT; - CLOG_LOG(WARN, "invalid arugment", KR(ret), KP(clog_mgr_), KP(log_engine), K(ctx)); + CLOG_LOG(WARN, "invalid argument", KR(ret), KP(clog_mgr_), KP(log_engine), K(ctx)); } else { ret = receive_log(log_service, log_engine, ctx, type); } diff --git a/src/clog/ob_partition_log_service.cpp b/src/clog/ob_partition_log_service.cpp index 156592b27..72c029470 100644 --- a/src/clog/ob_partition_log_service.cpp +++ b/src/clog/ob_partition_log_service.cpp @@ -1202,7 +1202,7 @@ int ObPartitionLogService::check_and_set_restore_progress() CLOG_LOG(WARN, "failed to check_if_all_log_replayed", K(ret), K_(partition_key)); } else if (!has_replayed) { } else { - // check whether achived offline_log + // check whether archived offline_log if (!restore_mgr_.has_fetched_enough_log()) { uint64_t offline_log_id = OB_INVALID_ID; if (OB_FAIL(partition_service_->get_offline_log_id(partition_key_, offline_log_id))) { @@ -1737,7 +1737,7 @@ int ObPartitionLogService::receive_archive_log(const ObLogEntry& log_entry, cons "receive_archive_log in unexpected state", K_(partition_key), K(ret), - "is_archive_resotring", + "is_archive_restoring", restore_mgr_.is_archive_restoring(), "role", restore_mgr_.get_role(), @@ -1939,7 +1939,7 @@ int ObPartitionLogService::ack_log(const ObAddr& server, const uint64_t log_id, } ret = OB_STATE_NOT_MATCH; } else if (!is_in_curr_member_list) { - // if not paxos memeber, record ts and skip majority count + // if not paxos member, record ts and skip majority count } else if (LEADER == state_mgr_.get_role() || STANDBY_LEADER == state_mgr_.get_role()) { // only leader need to count majority, other parent skip CLOG_LOG(DEBUG, "ack_log", K_(partition_key), K(server), K(log_id)); @@ -2119,7 +2119,7 @@ int ObPartitionLogService::ack_renew_ms_log( CLOG_LOG(WARN, "majority cb failed", K_(partition_key), K(ret), K(log_id)); } else { } - CLOG_LOG(INFO, "ack_renew_ms_log fnished", K_(partition_key), K(server), K(log_id), K(ms_proposal_id), K(majority)); + CLOG_LOG(INFO, "ack_renew_ms_log finished", K_(partition_key), K(server), K(log_id), K(ms_proposal_id), K(majority)); } return ret; @@ -3174,7 +3174,7 @@ int ObPartitionLogService::handle_query_sync_start_id_req( } else { ObCascadMember sync_child = cascading_mgr_.get_sync_standby_child(); if (!sync_child.is_valid() || sync_child.get_server() != server) { - // update sync_starndby_child + // update sync_standby_child (void)cascading_mgr_.update_sync_standby_child(server, cluster_id); } const uint64_t max_log_id = sw_.get_max_log_id(); @@ -3265,7 +3265,7 @@ int ObPartitionLogService::primary_process_protect_mode_switch() ret = OB_NOT_INIT; } else if (!GCTX.is_primary_cluster() || ObMultiClusterUtil::is_cluster_private_table(partition_key_.get_table_id())) { - // skip primary or private raplica + // skip primary or private replica } else { common::ObTimeGuard timeguard("primary_protect_mode_switch", 1000 * 1000); // need use wlock to protect role @@ -3863,7 +3863,7 @@ int ObPartitionLogService::on_get_election_priority(election::ObElectionPriority bool is_standby_restore_finished = true; if (GCTX.can_be_parent_cluster() && !ObMultiClusterUtil::is_cluster_private_table(partition_key_.get_table_id()) && restore_mgr_.is_standby_restore_state()) { - // restoring replicas cannot be striong leader, + // restoring replicas cannot be strong leader, // because its last_submit_ts maybe invalid, which will lead to reconfirm failure is_standby_restore_finished = false; } @@ -4107,7 +4107,7 @@ void ObPartitionLogService::destroy() reconfirm_.reset(); log_engine_ = NULL; replay_engine_ = NULL; - // partition_service_ is a global signleton obj, no need set NULL + // partition_service_ is a global singleton obj, no need set NULL // partition_service_ = NULL; if (mm_.is_inited()) { mm_.destroy(); @@ -4359,7 +4359,7 @@ int ObPartitionLogService::is_log_sync_with_leader(bool& is_sync) const int ObPartitionLogService::is_log_sync_with_primary(const int64_t switchover_epoch, bool& is_sync) const { - // caller guarantees self is non-private talbe + // caller guarantees self is non-private table int ret = OB_SUCCESS; int64_t local_switchover_epoch = OB_INVALID_TIMESTAMP; uint64_t leader_max_log_id = OB_INVALID_ID; @@ -5940,7 +5940,7 @@ int ObPartitionLogService::leader_update_next_replay_log_ts_under_lock() if (!ObMultiClusterUtil::is_cluster_private_table(partition_key_.get_table_id())) { if (GCTX.is_primary_cluster() || GCTX.is_in_flashback_state() || GCTX.is_in_cleanup_state()) { // non-private leader only in flashback/cleanup state can advance next_log_ts - // it cannot do this in swithing state, which may lead conflict with new primary cluster + // it cannot do this in switching state, which may lead conflict with new primary cluster is_cluster_status_allow_update = true; } else { is_cluster_status_allow_update = false; @@ -6102,7 +6102,7 @@ int ObPartitionLogService::notify_log_missing( RLockGuard guard(lock_); const common::ObReplicaType replica_type = mm_.get_replica_type(); if (!restore_mgr_.is_standby_restore_state()) { - CLOG_LOG(INFO, "self is not in restore state, igore msg", K_(partition_key), K(src_server)); + CLOG_LOG(INFO, "self is not in restore state, ignore msg", K_(partition_key), K(src_server)); } else if (FOLLOWER != state_mgr_.get_role()) { CLOG_LOG(WARN, "self is not follower, igore msg", K_(partition_key), K(src_server)); } else if (ObReplicaTypeCheck::is_paxos_replica_V2(replica_type) && !is_in_member_list) { @@ -6690,7 +6690,7 @@ int ObPartitionLogService::check_is_normal_partition(bool& is_normal_partition) return ret; } -//==================== batch chagne member begin ==================== +//==================== batch change member begin ==================== int ObPartitionLogService::pre_change_member(const int64_t quorum, const bool is_add_member, int64_t& mc_timestamp, ObMemberList& member_list, ObProposalID& proposal_id) { @@ -7046,7 +7046,7 @@ int ObPartitionLogService::leader_send_max_log_info() { RLockGuard guard(lock_); if (!state_mgr_.is_leader_active() || state_mgr_.is_offline()) { - // self is follwer or offline, skip + // self is follower or offline, skip is_online_leader = false; } else { is_online_leader = true; diff --git a/src/clog/ob_partition_log_service.h b/src/clog/ob_partition_log_service.h index 84bc3b5ce..bda3ae1cc 100644 --- a/src/clog/ob_partition_log_service.h +++ b/src/clog/ob_partition_log_service.h @@ -226,7 +226,7 @@ public: storage::ObPartitionService* partition_service, ObILogCallbackEngine* cb_engine, common::ObILogAllocator* alloc_mgr, ObLogEventScheduler* event_scheduler, const common::ObAddr& self, const common::ObVersion& data_version, const common::ObPartitionKey& parition_key, - const common::ObReplicaType replica_type, const common::ObReplicaProperty replia_property, + const common::ObReplicaType replica_type, const common::ObReplicaProperty replica_property, const common::ObBaseStorageInfo& base_storage_info, const int16_t archive_restore_state, const bool need_skip_mlist_check, ObRemoteLogQueryEngine* remote_log_query_engine, archive::ObArchiveMgr* archive_mgr, archive::ObArchiveRestoreEngine* archive_restore_engine, @@ -470,7 +470,7 @@ public: virtual int check_if_start_log_task_empty(bool& is_empty) = 0; virtual bool has_valid_member_list() const = 0; virtual int get_last_archived_log_id( - const int64_t incarnartion, const int64_t archive_round, uint64_t& last_archived_log_id) = 0; + const int64_t incarnation, const int64_t archive_round, uint64_t& last_archived_log_id) = 0; virtual int process_check_rebuild_req( const common::ObAddr& server, const uint64_t start_log_id, const int64_t cluster_id) = 0; virtual void get_max_majority_log(uint64_t& log_id, int64_t& log_ts) const = 0; @@ -731,7 +731,7 @@ public: virtual int set_member_list(const ObMemberList& member_list, const int64_t replica_num, const common::ObAddr& assigned_leader, const int64_t lease_start) override; int get_last_archived_log_id( - const int64_t incarnartion, const int64_t archive_round, uint64_t& last_archived_log_id) override; + const int64_t incarnation, const int64_t archive_round, uint64_t& last_archived_log_id) override; virtual int try_freeze_aggre_buffer() override; int set_archive_restore_state(const int16_t archive_restore_state) override; /*return values: diff --git a/src/clog/ob_raw_entry_iterator.h b/src/clog/ob_raw_entry_iterator.h index e9e05738a..46b93651e 100644 --- a/src/clog/ob_raw_entry_iterator.h +++ b/src/clog/ob_raw_entry_iterator.h @@ -89,7 +89,7 @@ inline int parse_log_item_type(const char* buf, const int64_t len, ObCLogItemTyp // 3. Only read one file(any file), read from offset equal zero, file trailer is valid; // 4. Only read one file(last file), read from any offset, file trailer is valid; // -// Regardless of Whethter the offset is zero, the implementation can ensure that the offset must correspond +// Regardless of Whether the offset is zero, the implementation can ensure that the offset must correspond // to a valid block header. // // When tailer is valid, we can confirm that the end of the file is read by direct_reader returning @@ -143,7 +143,7 @@ private: // When timestamp in block header is less than last_block_ts and exceeds CHECK_LAST_BLOCK_TS_INTERVAL, // considered ITER_END. // This is mainly to prevent clock rollback. The 1.4x version used ObTimeUtility::current_time to get - // the timestamp for block header, if clock jumps, may cause iterate file failuer. + // the timestamp for block header, if clock jumps, may cause iterate file failure. // // We used ObClockGenerator::getClock to ensure that the monotonic increase of the clock. // @@ -348,7 +348,7 @@ int ObRawEntryIterator::handle_block_(const ObLogBlockMetaV2& m // and the block header1 will write into next file. so, the timestamp between two consecutive files // is out of ordered. // - // Fixed the problem by ingored InfoBlock header when need record last_block_ts + // Fixed the problem by ignored InfoBlock header when need record last_block_ts if (OB_INFO_BLOCK != type) { last_block_ts_ = meta.get_timestamp(); } diff --git a/src/clog/ob_remote_log_query_engine.cpp b/src/clog/ob_remote_log_query_engine.cpp index ca24d52e6..d719de047 100644 --- a/src/clog/ob_remote_log_query_engine.cpp +++ b/src/clog/ob_remote_log_query_engine.cpp @@ -298,7 +298,7 @@ int ObRemoteLogQueryEngine::get_addr_array_( CLOG_LOG(WARN, "execute sql failed", K(sql), K(ret)); } else if (NULL == (result = res.get_result())) { ret = OB_ERR_UNEXPECTED; - CLOG_LOG(WARN, "fail to get reuslt", K(ret)); + CLOG_LOG(WARN, "fail to get result", K(ret)); } else { while (OB_SUCC(ret) && OB_SUCC(result->next())) { int64_t tmp_real_str_len = 0; diff --git a/src/clog/ob_remote_log_query_engine.h b/src/clog/ob_remote_log_query_engine.h index b44749640..af5929149 100644 --- a/src/clog/ob_remote_log_query_engine.h +++ b/src/clog/ob_remote_log_query_engine.h @@ -199,7 +199,7 @@ private: private: bool is_inited_; bool is_running_; - // Query __all_clog_hisotry_info + // Query __all_clog_history_info common::ObMySQLProxy* sql_proxy_; // Provide reading remote log ObILogEngine* log_engine_;