From cad8d585efc9f37e3f50726ec789aeaa0b8de3e3 Mon Sep 17 00:00:00 2001 From: co63oc Date: Fri, 13 Sep 2024 10:38:06 +0800 Subject: [PATCH] Fix typo (#2119) --- cmake/Env.cmake | 6 +++--- deps/oblib/src/lib/function/ob_function.h | 6 +++--- deps/oblib/src/lib/future/ob_future.h | 4 ++-- deps/oblib/src/lib/geo/ob_geo_cache_polygon.cpp | 4 ++-- deps/oblib/src/lib/geo/ob_geo_func_transform.cpp | 4 ++-- .../ob_plugin_vector_index_serialize.cpp | 14 +++++++------- .../ob_plugin_vector_index_service.cpp | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cmake/Env.cmake b/cmake/Env.cmake index c4b400a99..9a9d4eeb0 100644 --- a/cmake/Env.cmake +++ b/cmake/Env.cmake @@ -35,7 +35,7 @@ ob_define(ENABLE_PERF_MODE OFF) # begin of unity build config ob_define(OB_MAX_UNITY_BATCH_SIZE 30) -# the global switch of unity build, defualt is 'ON' +# the global switch of unity build, default is 'ON' ob_define(OB_ENABLE_UNITY ON) ob_define(OB_BUILD_OPENSOURCE ON) @@ -48,7 +48,7 @@ ob_define(OB_DISABLE_PIE OFF) if(WITH_COVERAGE) # -ftest-coverage to generate .gcno file # -fprofile-arcs to generate .gcda file - # -DDBUILD_COVERAGE marco use to mark 'coverage build type' and to handle some speical case + # -DDBUILD_COVERAGE marco use to mark 'coverage build type' and to handle some special case set(CMAKE_COVERAGE_COMPILE_OPTIONS -ftest-coverage -fprofile-arcs -Xclang -coverage-version=408R -DBUILD_COVERAGE) set(CMAKE_COVERAGE_EXE_LINKER_OPTIONS "-ftest-coverage -fprofile-arcs") @@ -114,7 +114,7 @@ if(OB_BUILD_CLOSE_MODULES) # share storage ob_define(OB_BUILD_SHARED_STORAGE ON) - # oralce + # oracle ob_define(OB_BUILD_ORACLE_PARSER ON) ob_define(OB_BUILD_ORACLE_PL ON) # dblink diff --git a/deps/oblib/src/lib/function/ob_function.h b/deps/oblib/src/lib/function/ob_function.h index 4decf5919..a328126b1 100644 --- a/deps/oblib/src/lib/function/ob_function.h +++ b/deps/oblib/src/lib/function/ob_function.h @@ -67,7 +67,7 @@ * call stored callable object, make sure ObFunction is valid before call this. * * - CAUTION: - * + DO check is_valid() after ObFuntion contructed, cause store big callable object may alloc + * + DO check is_valid() after ObFunction constructed, cause store big callable object may alloc * memory, set ObFunction to a invalid state if alloc memory failed. * + MAKE SURE ObFunction is valid before call it, or will CRASH. * @@ -234,7 +234,7 @@ public: } // normal constructor // ObFunction is a callable class also, so enable_if(SFINAE) condition is needed here, - // to making ObFunction copy and move constructor avaliable + // to making ObFunction copy and move constructor available template ::type, ObFunction>::value && @@ -312,7 +312,7 @@ public: int ret = OB_SUCCESS; if ((&allocator_ == &rhs.allocator_) && !is_local_obj_() && !rhs.is_local_obj_()) { // same allocator, both self and rhs are big obj - // just swap pointer, rhs will destory and destruct this->base_ + // just swap pointer, rhs will destroy and destruct this->base_ Abstract *temp = base_; base_ = rhs.base_; rhs.base_ = temp; diff --git a/deps/oblib/src/lib/future/ob_future.h b/deps/oblib/src/lib/future/ob_future.h index 734aa3391..f8aef26e3 100644 --- a/deps/oblib/src/lib/future/ob_future.h +++ b/deps/oblib/src/lib/future/ob_future.h @@ -281,7 +281,7 @@ protected: CHECK_INITED(); int ret = OB_SUCCESS; if (OB_FAIL(ObFutureBaseBase::wait())) { - OCCAM_LOG(WARN, "something wrong happend while waiting", K(ret)); + OCCAM_LOG(WARN, "something wrong happened while waiting", K(ret)); } else { ptr = &(data_shared_ptr_->data_); } @@ -400,7 +400,7 @@ protected: CHECK_INITED(); int ret = OB_SUCCESS; if (OB_FAIL(ObFutureBaseBase::wait())) { - OCCAM_LOG(WARN, "something wrong happend while waiting", K(ret)); + OCCAM_LOG(WARN, "something wrong happened while waiting", K(ret)); } return ret; } diff --git a/deps/oblib/src/lib/geo/ob_geo_cache_polygon.cpp b/deps/oblib/src/lib/geo/ob_geo_cache_polygon.cpp index c1414ae3c..d7fa2d6ce 100644 --- a/deps/oblib/src/lib/geo/ob_geo_cache_polygon.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_cache_polygon.cpp @@ -505,7 +505,7 @@ int ObCachedGeoPolygon::inner_eval_contains(ObGeometry& geo, ObGeoEvalCtx& gis_c return ret; } -// check if CachedPolygon catains geo +// check if CachedPolygon contains geo int ObCachedGeoPolygon::contains(ObGeometry& geo, ObGeoEvalCtx& gis_context, bool &res) { int ret = OB_SUCCESS; @@ -530,7 +530,7 @@ int ObCachedGeoPolygon::contains(ObGeometry& geo, ObGeoEvalCtx& gis_context, boo return ret; } -// check if CachedPolygon catains geo +// check if CachedPolygon contains geo int ObCachedGeoPolygon::cover(ObGeometry& geo, ObGeoEvalCtx& gis_context, bool &res) { int ret = OB_SUCCESS; diff --git a/deps/oblib/src/lib/geo/ob_geo_func_transform.cpp b/deps/oblib/src/lib/geo/ob_geo_func_transform.cpp index 7b9e489f9..820d26ab6 100644 --- a/deps/oblib/src/lib/geo/ob_geo_func_transform.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_func_transform.cpp @@ -76,7 +76,7 @@ private: common::ObIAllocator *alloc = context.get_allocator(); if (OB_ISNULL(alloc)) { ret = OB_ERR_NULL_VALUE; - LOG_WARN("unexpected null alloactor for transform functor", K(ret)); + LOG_WARN("unexpected null allocator for transform functor", K(ret)); } else if (OB_ISNULL(dest_geo = OB_NEWx(GeometryResType, alloc))) { ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("fail to create geo by type", K(ret)); @@ -104,7 +104,7 @@ private: common::ObIAllocator *alloc = context.get_allocator(); if (OB_ISNULL(alloc)) { ret = OB_ERR_NULL_VALUE; - LOG_WARN("unexpected null alloactor for transform functor", K(ret)); + LOG_WARN("unexpected null allocator for transform functor", K(ret)); } else if (OB_ISNULL(dest_geo = OB_NEWx(GCOutType, alloc, 0, *alloc))) { ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("failed to create geometry collection", K(ret)); diff --git a/src/share/vector_index/ob_plugin_vector_index_serialize.cpp b/src/share/vector_index/ob_plugin_vector_index_serialize.cpp index f11df503d..dd29329f8 100644 --- a/src/share/vector_index/ob_plugin_vector_index_serialize.cpp +++ b/src/share/vector_index/ob_plugin_vector_index_serialize.cpp @@ -237,7 +237,7 @@ int ObHNSWDeserializeCallback::operator()(char*& data, const int64_t data_size, ObDatum data_datum; ObHNSWDeserializeCallback::CbParam ¶m = static_cast(cb_param); ObTableScanIterator *row_iter = static_cast(param.iter_); - ObIAllocator *alloactor = param.allocator_; + ObIAllocator *allocator = param.allocator_; ObTextStringIter *&str_iter = param.str_iter_; ObTextStringIterState state; ObString src_block_data; @@ -259,18 +259,18 @@ int ObHNSWDeserializeCallback::operator()(char*& data, const int64_t data_size, // current lob is end, need to switch to next lob // release current str iter str_iter->~ObTextStringIter(); - alloactor->free(str_iter); + allocator->free(str_iter); str_iter = nullptr; - alloactor->reuse(); + allocator->reuse(); } else { ret = (str_iter->get_inner_ret() != OB_SUCCESS) ? str_iter->get_inner_ret() : OB_INVALID_DATA; LOG_WARN("iter state invalid", K(ret), K(state), KPC(str_iter)); // return error, release current str iter str_iter->~ObTextStringIter(); - alloactor->free(str_iter); + allocator->free(str_iter); str_iter = nullptr; - alloactor->reuse(); + allocator->reuse(); } } if (OB_SUCC(ret) && OB_ISNULL(str_iter)) { @@ -284,10 +284,10 @@ int ObHNSWDeserializeCallback::operator()(char*& data, const int64_t data_size, key_datum = row->storage_datums_[0]; data_datum = row->storage_datums_[1]; LOG_INFO("[vec index debug] show key and data for vsag deserialize", K(key_datum), K(data_datum)); - if (OB_ISNULL(str_iter = OB_NEWx(ObTextStringIter, alloactor, ObLongTextType, CS_TYPE_BINARY, data_datum.get_string(), true))) { + if (OB_ISNULL(str_iter = OB_NEWx(ObTextStringIter, allocator, ObLongTextType, CS_TYPE_BINARY, data_datum.get_string(), true))) { ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("fail to new ObTextStringIter", KR(ret)); - } else if (OB_FAIL(str_iter->init(0, NULL, alloactor))) { + } else if (OB_FAIL(str_iter->init(0, NULL, allocator))) { LOG_WARN("init lob str iter failed ", K(ret)); } } diff --git a/src/share/vector_index/ob_plugin_vector_index_service.cpp b/src/share/vector_index/ob_plugin_vector_index_service.cpp index a3c194367..0d894d08e 100644 --- a/src/share/vector_index/ob_plugin_vector_index_service.cpp +++ b/src/share/vector_index/ob_plugin_vector_index_service.cpp @@ -29,7 +29,7 @@ ObPluginVectorIndexMgr::~ObPluginVectorIndexMgr() void ObPluginVectorIndexMgr::destroy() { if (IS_INIT) { - LOG_INFO("LS Vector Index Mgr destory", K(ls_id_)); + LOG_INFO("LS Vector Index Mgr destroy", K(ls_id_)); is_inited_ = false; need_check_ = false; ls_id_.reset();