Skip to content

Commit

Permalink
New features
Browse files Browse the repository at this point in the history
1. Support session information synchronization mechanism
2. Support public cloud shared proxy CPU resource tenant isolation
3. Support random routing
4. Support specifying ip routing
5. Support to configure tenant isolation
6. Support OB_MYSQL_COM_STMT_RESET
7. Support Primary Zone routing
8. Fast fail-fast for request probes is supported. POC use only
9. Support text PS
10. Support OB_MYSQL_COM_RESET_CONNECTION
11. Support connection string ClusterId custom separator
12. Support non-Alibaba cloud environment, use remote ip as virtual ip
13. 【OB Sharding】Support SHOW INDEX FROM statement
14. 【OB Sharding】Support truncate syntax
15. 【OB Sharding】Support SHOW FULL TABLES statement
16. 【OB Sharding】SHOW KEYS FROM statement
17. 【OB Sharding】Support SHOW FULL COLUMNS statement
18. 【OB Sharding】When the scan_all switch is false, union and union
     all are supported;
19. 【OB Sharding】When the scan_all switch is true, union all is
     supported
20. 【OB Sharding】show table, show index, etc. support like syntax
21. 【OB Sharding】Limited support for subqueries
22. 【OB Sharding】Support to adjust the memory limit according to the
     container memory size
23. Turn off the default parameter for fast-fail request probes. Off by
    default
24. Adjust the whitelist policy, no longer use the client_ip sent by the
    client, and directly use the tcp peer IP

Improvements
1. Add max_used_connections to reduce log printing when client
   connection is disconnected
2. locality changes support all_dummy refresh
3. Intercept configuration table multi-row insertion
4. Compatible with MySQL 8.0, HandleShake Capability adds multi related
   value
5. Optimize partially duplicated logs

Bug fixes
1. Fix the memory problem caused by accessing internal tables and
   abnormally obtaining partition information
2. Fixed OB_MYSQL_COM_STMT_EXECUTE protocol, ref_cursor reported error
   fetch out of sequence under function
3. Fix the issue that the enable_client_ip_checkout parameter does not
   take effect when there is a connect attr parameter
4. Fix the Sharding scenario, the select table name of the sub-database
   and sub-table is case-sensitive, resulting in an error report
5. Fix the Sharding scenario, the select of sub-database and sub-table
   will be intercepted and unsupported syntax problem
6. Fixed an issue where a single SQL was sent multiple times, causing
   the SQL to take more than 40ms
7. Fix performance issues introduced by random partitions
8. Fix the problem of disconnection of changUser command under normal
   protocol
9. Fixed the problem that file systems such as xfs cannot accurately
   determine whether it is a directory using the readdir system call
10. Fix the problem that rslist startup fails more than 3 times and does
    not fall back to the original rslist
11. Fixed inaccurate sql routing caused by text PS escape symbols
12. Fix name super long text PS, prepare stage odp core
13. Fix text PS case insensitivity
14. Fix the error Unknown prepared statement handle when executing the
    text PS large request
15. Fix text PS date type route as partition key, text ps parameter
    routing is not allowed
16. Fix text PS trigger pl routing is not allowed
17. Fix text PS name contains illegal characters, execute error 1243
18. Fix the problem that user, value, etc. are used as keywords in
    lexical analysis
19. Fixed the problem that SSL cannot be used for the link between
    Client and Proxy
20. 【OB Sharding】Fixed that the hint with partition key cannot
    calculate the partition key when inserting
21. 【OB Sharding】Fixed that if the partition key is after the 64th
    column in the insert statement, it will report that it cannot be
    calculated
22. 【OB Sharding】Fix the problem of disconnection of sequence query
23. 【OB Sharding】Fix the core caused by not supporting sum(case when)
     in the function
24. When hot restart, if the old connection receives the COM_PING
    command, the old Proxy will actively disconnect the connection
25. 【OBSharding】 Fix the syntax parsing problem of delete and update
  • Loading branch information
wgs13579 authored and guangshu.wgs committed Oct 28, 2022
1 parent 02b7301 commit 9d5c90e
Show file tree
Hide file tree
Showing 344 changed files with 103,267 additions and 13,410 deletions.
9 changes: 7 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,20 @@ function do_config()
echo -e "\033[31m ===build debug version=== \033[0m"
;;
xgcov)
# configure for release
# configure for gcov
./configure --with-gcc-version=9.3.0 --with-coverage=yes --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no
echo -e "\033[31m ===build gcov version=== \033[0m"
;;
xperf)
# configure for release
# configure for perf
./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-perf
echo -e "\033[31m ===build perf version=== \033[0m"
;;
xasan)
# configure for asan
./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-asan
echo -e "\033[31m ===build asan 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: 15 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
AC_INIT([OceanBase],
[3.2.3.5],
[4.0.0],
[[email protected]],
[obproxy-ce],
[http://oceanbase.taobao.org/])

obapi_version="3.2.3.5"
obapi_version="4.0.0"
AC_SUBST(obapi_version)

AC_DISABLE_STATIC
Expand All @@ -26,7 +26,7 @@
if test "$withval" = "yes"; then
case "$host_cpu" in
*aarch64* )
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -Wno-unused-parameter -Wformat -Wno-conversion -Wno-deprecated -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security -finline-functions -fno-strict-aliasing -mtune=generic -Wno-psabi -Wno-sign-compare -Wno-class-memaccess -Wno-deprecated-copy -Wno-ignored-qualifiers -Wno-aligned-new -Wno-format-truncation -Wno-literal-suffix -Wno-format-overflow -Wno-stringop-truncation -Wno-memset-elt-size -Wno-cast-function-type -Wno-address-of-packed-member -fuse-ld=lld -ffunction-sections -Wl,--no-warn-symbol-ordering,--symbol-ordering-file,${ac_abs_confdir}/hotfuncs.txt"
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -Wno-unused-parameter -Wformat -Wno-conversion -Wno-deprecated -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security -finline-functions -fno-strict-aliasing -mtune=generic -march=armv8-a+crc -Wno-psabi -Wno-sign-compare -Wno-class-memaccess -Wno-deprecated-copy -Wno-ignored-qualifiers -Wno-aligned-new -Wno-format-truncation -Wno-literal-suffix -Wno-format-overflow -Wno-stringop-truncation -Wno-memset-elt-size -Wno-cast-function-type -Wno-address-of-packed-member -fuse-ld=lld -ffunction-sections -Wl,--no-warn-symbol-ordering,--symbol-ordering-file,${ac_abs_confdir}/hotfuncs.txt"
AM_CFLAGS="-g -O2 -D_OB_VERSION=1000 -DCOMPATIBLE -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -finline-functions -fno-strict-aliasing -Wall -mtune=generic -Wno-psabi -Wno-sign-compare -fuse-ld=lld -ffunction-sections -Wl,--no-warn-symbol-ordering,--symbol-ordering-file,${ac_abs_confdir}/hotfuncs.txt"
;;
* )
Expand Down Expand Up @@ -118,6 +118,18 @@
[with_perf=no]
)

AC_ARG_WITH([asan],
AS_HELP_STRING([--with-asan],
[with asan (default is NO)]),
[
if test "$withval" = "yes"; then
AM_CXXFLAGS="${AM_CXXFLAGS} -fsanitize=address -fstack-protector-strong -fno-optimize-sibling-calls -fno-omit-frame-pointer -static-libasan -fno-var-tracking-assignments -fno-optimize-sibling-calls -fno-inline -DUSING_ASAN"
AM_CFLAGS="${AM_CFLAGS} -fsanitize=address -fstack-protector-strong -fno-optimize-sibling-calls -fno-omit-frame-pointer -static-libasan -fno-var-tracking-assignments -fno-optimize-sibling-calls -fno-inline -DUSING_ASAN"
fi
],
[with_asan=no]
)

AC_ARG_WITH([5u-support],
AS_HELP_STRING([--with-5u-support],
[with 5u support (default is NO)]),
Expand Down
2 changes: 1 addition & 1 deletion rpm/obproxy-ce-VER.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.3.5
4.0.0
2 changes: 1 addition & 1 deletion script/deploy/obproxyd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function check_opt()
OBPROXY_OPT_LOCAL="${OBPROXY_OPT_LOCAL},$OBPROXY_EXTRA_OPT"
fi

OBPROXY_OPT_LOCAL=",enable_cached_server=true,enable_get_rslist_remote=true,monitor_stat_dump_interval=1s,enable_qos=true,enable_standby=false,query_digest_time_threshold=2ms,monitor_cost_ms_unit=true,enable_strict_kernel_release=false,enable_proxy_scramble=true,work_thread_num=$WORK_THREAD_NUM,proxy_mem_limited='2G',log_dir_size_threshold=10G${OBPROXY_OPT_LOCAL}"
OBPROXY_OPT_LOCAL=",server_detect_mode=0,enable_primary_zone=false,enable_cached_server=true,enable_get_rslist_remote=true,monitor_stat_dump_interval=1s,enable_qos=true,enable_standby=false,query_digest_time_threshold=2ms,monitor_cost_ms_unit=true,enable_strict_kernel_release=false,enable_proxy_scramble=true,work_thread_num=$WORK_THREAD_NUM,proxy_mem_limited='2G',log_dir_size_threshold=10G${OBPROXY_OPT_LOCAL}"
}

# change to the path where this script locates.
Expand Down
12 changes: 10 additions & 2 deletions src/common/ob_obj_cast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4125,9 +4125,17 @@ int obj_accuracy_check(ObCastCtx &cast_ctx,
const ObObj *&res_obj)
{
int ret = OB_SUCCESS;
bool valid_accuracy = true;
ObObjType type = obj.get_type();
if (ob_is_number_tc(type) || ob_is_double_tc(type) || ob_is_float_tc(type)) {
if (accuracy.precision_ == -1 || accuracy.scale_ == -1) {
valid_accuracy = false; // invalid accuracy
}
}

if (accuracy.is_valid()) {
LOG_DEBUG("obj_accuracy_check before", K(obj), K(accuracy), K(cs_type));
LOG_DEBUG("obj_accuracy_check before", K(obj), K(accuracy), K(cs_type), K(valid_accuracy));

if (valid_accuracy && accuracy.is_valid()) {
switch (obj.get_type_class()) {
case ObFloatTC: {
ret = float_range_check(cast_ctx, accuracy, obj, buf_obj, res_obj, cast_ctx.cast_mode_);
Expand Down
3 changes: 3 additions & 0 deletions src/common/obsm_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ int ObSMUtils::get_ob_type(ObObjType &ob_type, EMySQLFieldType mysql_type)
case OB_MYSQL_TYPE_COMPLEX:
ob_type = ObExtendType;
break;
case OB_MYSQL_TYPE_OB_UROWID:
ob_type = ObURowIDType;
break;
default:
_OB_LOG(WARN, "unsupport MySQL type %d", mysql_type);
ret = OB_OBJ_TYPE_ERROR;
Expand Down
13 changes: 13 additions & 0 deletions src/lib/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@ lib/charset/ob_charset.cpp\
lib/charset/ob_ctype.h\
lib/charset/ob_ctype.c\
lib/charset/ob_ctype_utf8.c\
lib/charset/ob_ctype_gb18030.cc\
lib/charset/ob_ctype_gbk.c\
lib/charset/ob_ctype_utf16.c\
lib/charset/ob_ctype_uca.c\
lib/charset/ob_ctype_mb.c\
lib/charset/ob_ctype_bin.c\
lib/charset/ob_ctype_simple.c\
lib/charset/ob_mysql_global.h\
lib/charset/ob_config.h\
lib/charset/ob_dtoa.h\
lib/charset/ob_dtoa.c\
lib/charset/ob_uctype.h\
Expand Down Expand Up @@ -207,6 +213,10 @@ lib/utility/ob_template_utils.h\
lib/utility/serialization.h\
lib/utility/ob_unify_serialize.h\
lib/utility/ob_serialization_helper.h\
lib/utility/ob_2_0_full_link_trace_util.h\
lib/utility/ob_2_0_full_link_trace_util.cpp\
lib/utility/ob_2_0_full_link_trace_info.h\
lib/utility/ob_2_0_full_link_trace_info.cpp\
lib/net/ob_addr.h\
lib/net/ob_addr.cpp\
lib/net/tbnetutil.cpp\
Expand All @@ -226,6 +236,9 @@ lib/stat/ob_stat_template.h\
lib/stat/ob_di_list.h\
lib/stat/ob_di_tls.h\
lib/trace/ob_trace_event.h\
lib/trace/ob_trace.h\
lib/trace/ob_trace.cpp\
lib/trace/ob_trace_def.h\
lib/profile/ob_trace_id.h\
lib/wait_event/ob_wait_class.h\
lib/wait_event/ob_wait_event.h\
Expand Down
4 changes: 4 additions & 0 deletions src/lib/alloc/malloc_hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ using namespace oceanbase::lib;

EXTERN_C_BEGIN

#ifndef USING_ASAN

extern void *__libc_malloc(size_t size);
extern void __libc_free(void *ptr);
extern void *__libc_realloc(void *ptr, size_t size);
Expand Down Expand Up @@ -290,4 +292,6 @@ int posix_memalign(void **memptr, size_t alignment, size_t size)
return err;
}

#endif

EXTERN_C_END
1 change: 1 addition & 0 deletions src/lib/allocator/ob_malloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "lib/thread_local/ob_tsi_factory.h"
#include "lib/utility/utility.h"
#include <algorithm>
#include "obutils/ob_proxy_config.h"
#ifdef __OB_MTRACE__
#include <execinfo.h>
#endif
Expand Down
1 change: 1 addition & 0 deletions src/lib/allocator/ob_mod_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ MOD_ITEM_DEF(OB_PROXY_QOS)
MOD_ITEM_DEF(OB_PROXY_SSL_RELATED)
MOD_ITEM_DEF(OB_PROXY_CONFIG_TABLE)
MOD_ITEM_DEF(OB_PROMETHEUS_RELATED)
MOD_ITEM_DEF(OB_PROXY_SESS_SYNC)

//mergeservermodules
MOD_ITEM_DEF(OB_MS_CELL_ARRAY)
Expand Down
Loading

0 comments on commit 9d5c90e

Please sign in to comment.