Skip to content

Commit

Permalink
合并 423 最新代码
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixin.lm committed Feb 1, 2024
1 parent 6599462 commit aca5aea
Show file tree
Hide file tree
Showing 667 changed files with 59,733 additions and 38,186 deletions.
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ function do_config()
./configure --with-gcc-version=9.3.0 --with-coverage=no --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no --with-release --with-so
echo -e "\033[31m ===build so version=== \033[0m"
;;
xerrsim)
# configure for error injection
./configure --with-gcc-version=9.3.0 --with-coverage=no --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no --with-errsim=yes ${MINIDUMP_OPTION} ${ELX_OPTION}
echo -e "\033[31m ===build errsim version=== \033[0m"
;;
*)
# configure for release
./configure --with-gcc-version=9.3.0 --with-coverage=no --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no --with-release
Expand Down
18 changes: 16 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
AC_INIT([OceanBase],
[4.2.1.0],
[4.2.3.0],
[wgs13579@gmail.com],
[obproxy-ce],
[http://oceanbase.taobao.org/])

obapi_version="4.2.1.0"
obapi_version="4.2.3.0"
AC_SUBST(obapi_version)

AC_DISABLE_STATIC
Expand Down Expand Up @@ -287,6 +287,20 @@
[dlink_observer=false])
AM_CONDITIONAL([DLINK_OBSERVER], [test x$dlink_observer = xtrue])

AC_ARG_WITH([errsim],
AS_HELP_STRING([--with-errsim],
[whether use error inject (default is NO)]),
[
if test "$withval" = "yes"; then
enable_errsim=yes
AM_CXXFLAGS="${AM_CXXFLAGS} -DERRSIM"
fi
],
[
enable_errsim=no
]
)

dnl build_version.mk related:
dnl see whether git is installed
AC_PATH_PROG(svnversioncommand, git)
Expand Down
2 changes: 1 addition & 1 deletion gen-tag.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
version="4.2.1.0"
version="4.2.3.0"
if [ "$1" = "odp-test" ]
then
echo `git log -1 --pretty=format:${version}-%h`
Expand Down
4 changes: 3 additions & 1 deletion src/common/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ common/expression/ob_expr_string_buf.h\
common/expression/ob_expr_util.cpp\
common/expression/ob_expr_util.h\
common/expression/ob_expr_regexp_context.h\
common/expression/ob_expr_regexp_context.cpp
common/expression/ob_expr_regexp_context.cpp\
common/ob_datum_cast.h\
common/ob_datum_cast.cpp
56 changes: 28 additions & 28 deletions src/common/cache/ob_kv_storecache.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,13 @@ int ObKVCache<Key, Value>::init(const char *cache_name, const int64_t priority)
int ret = OB_SUCCESS;
if (OB_UNLIKELY(inited_)) {
ret = OB_INIT_TWICE;
COMMON_LOG(WARN, "The ObKVCache has been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCache has been inited, ", K(ret));
} else if (OB_UNLIKELY(NULL == cache_name)
|| OB_UNLIKELY(priority <= 0)) {
ret = OB_INVALID_ARGUMENT;
COMMON_LOG(WARN, "Invalid argument, ", KP(cache_name), K(priority), K(ret));
COMMON_LOG(WDIAG, "Invalid argument, ", KP(cache_name), K(priority), K(ret));
} else if (OB_FAIL(ObKVGlobalCache::get_instance().register_cache(cache_name, priority, cache_id_))) {
COMMON_LOG(WARN, "Fail to register cache, ", K(ret));
COMMON_LOG(WDIAG, "Fail to register cache, ", K(ret));
} else {
inited_ = true;
}
Expand All @@ -629,12 +629,12 @@ int ObKVCache<Key, Value>::set_priority(const int64_t priority)
int ret = OB_SUCCESS;
if (OB_UNLIKELY(!inited_)) {
ret = OB_NOT_INIT;
COMMON_LOG(WARN, "The ObKVCache has not been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCache has not been inited, ", K(ret));
} else if (OB_UNLIKELY(priority <= 0)) {
ret = OB_INVALID_ARGUMENT;
COMMON_LOG(WARN, "Invalid argument, ", K(priority), K(ret));
COMMON_LOG(WDIAG, "Invalid argument, ", K(priority), K(ret));
} else if (OB_FAIL(ObKVGlobalCache::get_instance().set_priority(cache_id_, priority))) {
COMMON_LOG(WARN, "Fail to set priority, ", K(ret));
COMMON_LOG(WDIAG, "Fail to set priority, ", K(ret));
}
return ret;
}
Expand Down Expand Up @@ -721,9 +721,9 @@ int ObKVCache<Key, Value>::get_iterator(ObKVCacheIterator &iter)
int ret = OB_SUCCESS;
if (OB_UNLIKELY(!inited_)) {
ret = OB_NOT_INIT;
COMMON_LOG(WARN, "The ObKVCache has not been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCache has not been inited, ", K(ret));
} else if (OB_FAIL(iter.init(cache_id_, &ObKVGlobalCache::get_instance().map_))) {
COMMON_LOG(WARN, "Fail to init ObKVCacheIterator, ", K(ret));
COMMON_LOG(WDIAG, "Fail to init ObKVCacheIterator, ", K(ret));
}
return ret;
}
Expand All @@ -736,11 +736,11 @@ int ObKVCache<Key, Value>::put(const Key &key, const Value &value, bool overwrit
const ObIKVCacheValue *pvalue = NULL;
if (OB_UNLIKELY(!inited_)) {
ret = OB_NOT_INIT;
COMMON_LOG(WARN, "The ObKVCache has not been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCache has not been inited, ", K(ret));
} else if (OB_FAIL(ObKVGlobalCache::get_instance().put(cache_id_, key, value, pvalue,
handle.mb_handle_, overwrite))) {
if (OB_ENTRY_EXIST != ret) {
COMMON_LOG(WARN, "Fail to put kv to ObKVGlobalCache, ", K_(cache_id), K(ret));
COMMON_LOG(WDIAG, "Fail to put kv to ObKVGlobalCache, ", K_(cache_id), K(ret));
}
} else {
handle.reset();
Expand All @@ -762,10 +762,10 @@ int ObKVCache<Key, Value>::put_and_fetch(
handle.reset();
if (OB_UNLIKELY(!inited_)) {
ret = OB_NOT_INIT;
COMMON_LOG(WARN, "The ObKVCache has not been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCache has not been inited, ", K(ret));
} else if (OB_FAIL(ObKVGlobalCache::get_instance().put(cache_id_, key, value,
tmp, handle.mb_handle_, overwrite))) {
COMMON_LOG(WARN, "Fail to put kv to ObKVGlobalCache, ", K_(cache_id), K(ret));
COMMON_LOG(WDIAG, "Fail to put kv to ObKVGlobalCache, ", K_(cache_id), K(ret));
} else {
pvalue = reinterpret_cast<const Value*>(tmp);
}
Expand All @@ -779,12 +779,12 @@ int ObKVCache<Key, Value>::get(const Key &key, const Value *&pvalue, ObKVCacheHa
const ObIKVCacheValue *value = NULL;
if (OB_UNLIKELY(!inited_)) {
ret = OB_NOT_INIT;
COMMON_LOG(WARN, "The ObKVCache has not been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCache has not been inited, ", K(ret));
} else {
handle.reset();
if (OB_FAIL(ObKVGlobalCache::get_instance().get(cache_id_, key, value, handle.mb_handle_))) {
if (OB_ENTRY_NOT_EXIST != ret) {
COMMON_LOG(WARN, "Fail to get value from ObKVGlobalCache, ", K(ret));
COMMON_LOG(WDIAG, "Fail to get value from ObKVGlobalCache, ", K(ret));
}
} else {
pvalue = reinterpret_cast<const Value*> (value);
Expand All @@ -799,9 +799,9 @@ int ObKVCache<Key, Value>::erase(const Key &key)
int ret = OB_SUCCESS;
if (OB_UNLIKELY(!inited_)) {
ret = OB_NOT_INIT;
COMMON_LOG(WARN, "The ObKVCache has not been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCache has not been inited, ", K(ret));
} else if (OB_FAIL(ObKVGlobalCache::get_instance().erase(cache_id_, key))) {
COMMON_LOG(WARN, "Fail to erase key from ObKVGlobalCache, ", K_(cache_id), K(ret));
COMMON_LOG(WDIAG, "Fail to erase key from ObKVGlobalCache, ", K_(cache_id), K(ret));
}
return ret;
}
Expand All @@ -813,21 +813,21 @@ int ObKVCache<Key, Value>::alloc(const Key &key, const Value &value,
int ret = OB_SUCCESS;
if (OB_UNLIKELY(!inited_)) {
ret = OB_NOT_INIT;
COMMON_LOG(WARN, "The ObKVCache has not been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCache has not been inited, ", K(ret));
} else {
ObKVCachePair *tmp_pair = NULL;
ObKVMemBlockHandle *mb_handle = NULL;
ObKVCacheInstKey inst_key(cache_id_, key.get_tenant_id());
ObKVCacheInstHandle inst_handle;

if (OB_FAIL(ObKVGlobalCache::get_instance().insts_.get_cache_inst(inst_key, inst_handle))) {
COMMON_LOG(WARN, "Fail to get cache inst, ", K(ret));
COMMON_LOG(WDIAG, "Fail to get cache inst, ", K(ret));
} else if (NULL == inst_handle.get_inst()) {
ret = OB_ERR_UNEXPECTED;
COMMON_LOG(WARN, "The inst is NULL, ", K(ret));
COMMON_LOG(WDIAG, "The inst is NULL, ", K(ret));
} else if (OB_FAIL(ObKVGlobalCache::get_instance().store_.store(*inst_handle.get_inst(),
key, value, tmp_pair, mb_handle))) {
COMMON_LOG(WARN, "Fail to store kvpair, ", K(ret));
COMMON_LOG(WDIAG, "Fail to store kvpair, ", K(ret));
} else {
handle.reset();
handle.mb_handle_ = mb_handle;
Expand All @@ -843,25 +843,25 @@ int ObKVCache<Key, Value>::put(ObKVCachePair *kvpair, ObKVCacheHandle &handle, b
int ret = OB_SUCCESS;
if (OB_UNLIKELY(!inited_)) {
ret = OB_NOT_INIT;
COMMON_LOG(WARN, "The ObKVCache has not been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCache has not been inited, ", K(ret));
} else if (OB_UNLIKELY(NULL == kvpair)
|| OB_UNLIKELY(NULL == kvpair->key_)
|| OB_UNLIKELY(NULL == kvpair->value_)
|| OB_UNLIKELY(!handle.is_valid())) {
ret = OB_INVALID_ARGUMENT;
COMMON_LOG(WARN, "Invalid argument, ", KP(kvpair), K(handle), K(ret));
COMMON_LOG(WDIAG, "Invalid argument, ", KP(kvpair), K(handle), K(ret));
} else {
ObKVCacheInstKey inst_key(cache_id_, kvpair->key_->get_tenant_id());
ObKVCacheInstHandle inst_handle;
if (OB_FAIL(ObKVGlobalCache::get_instance().insts_.get_cache_inst(inst_key, inst_handle))) {
COMMON_LOG(WARN, "Fail to get inst, ", K(ret));
COMMON_LOG(WDIAG, "Fail to get inst, ", K(ret));
} else if (NULL == inst_handle.get_inst()) {
ret = OB_ERR_UNEXPECTED;
COMMON_LOG(WARN, "The inst is NULL, ", K(ret));
COMMON_LOG(WDIAG, "The inst is NULL, ", K(ret));
} else if (OB_FAIL(ObKVGlobalCache::get_instance().map_.put(*inst_handle.get_inst(),
*kvpair->key_, kvpair, handle.mb_handle_, overwrite))) {
if (OB_ENTRY_EXIST != ret) {
COMMON_LOG(WARN, "Fail to put kvpair to map, ", K(ret));
COMMON_LOG(WDIAG, "Fail to put kvpair to map, ", K(ret));
}
}
}
Expand All @@ -881,7 +881,7 @@ int ObKVCacheIterator::get_next_kvpair(
ObKVCacheMap::Node node;
if (OB_UNLIKELY(!is_inited_)) {
ret = OB_NOT_INIT;
COMMON_LOG(WARN, "The ObKVCacheIterator has not been inited, ", K(ret));
COMMON_LOG(WDIAG, "The ObKVCacheIterator has not been inited, ", K(ret));
} else {
while (OB_SUCC(ret)) {
if (pos_ >= map_->bucket_num_ && handle_list_.empty()) {
Expand All @@ -895,10 +895,10 @@ int ObKVCacheIterator::get_next_kvpair(
if (pos_ >= map_->bucket_num_) {
ret = OB_ITER_END;
} else if (OB_FAIL(map_->multi_get(cache_id_, pos_++, handle_list_))) {
COMMON_LOG(WARN, "Fail to multi get from map, ", K(ret));
COMMON_LOG(WDIAG, "Fail to multi get from map, ", K(ret));
}
} else {
COMMON_LOG(WARN, "Unexpected error, ", K(ret));
COMMON_LOG(WDIAG, "Unexpected error, ", K(ret));
}
}
}
Expand Down
Loading

0 comments on commit aca5aea

Please sign in to comment.