Skip to content

Commit

Permalink
New features
Browse files Browse the repository at this point in the history
1. Support for multiple-cluster Proxyro passwords
2. Support for rich client capabilities
3. Support for specifying Server IP routing
4. Support for the Latin1 character set
5. Support for transparently passing connection attributes with special prefixes
6. Support for distributed transaction routing
7. Support for MySQL binlog
8. Support for read-write separation and transaction splitting
9. Support for mapping VIPs to Cluster/Tenant through means other than MetaDB
10. Support for global-level weak-read and read-only configuration parameters
11. Support for GIS, JSON data types
12. Support for IPv6
13. Support for accurately routing access to the sys tenant OceanBase library in QA Mode
14. Support for ROWID routing under PS
15. Support for multi-column partition key routing
16. Support for obtaining column default value routing
17. Support for calculating expressions such as nvl, sysdate, mod,  to_char, and substr
18. Support for is null and is not null routing
19. Support for XA Start statement hold
20. 【OB Sharding】Support for rolling upgrades
21. 【OB Sharding】Support for SHOW TOPOLOGY syntax
22. 【OB Sharding】Added hint support for session stickiness: route to the previous non-scan-all statement shard
23. 【OB Sharding】Support for information_schema.partitions and information_schema.coulmns
24. 【OB Sharding】Support for SQL-level timeout control
25. 【OB Sharding】Single-shard support for SQL syntax: batch update, batch delete, batch insert

Improvements
1. RTO optimization, less than 8S
2. OB 2.0 protocol optimization, reducing synchronous statements
3. OBProxy actively disconnects and sends Error packets to the client
4. Supports global-level PS cache
5. client_sock_option_flag_out default value is changed from 2 to 3
6. obproxy_error.log will print OBServer TraceId
7. Memory optimization, including connection memory and PS memory
8. RTO probe optimization, considering it normal when receiving Handshake packets
9. The default character encoding in HandShake packets is changed to 46
10. New enable_binlog_service configuration item, default false, indicating whether to enable binlog function
11. 【OB Sharding】Log optimization
12. 【OB Sharding】insert/update/delete statements support multi-table syntax
13. 【OB Sharding】scan_all optimization
14. 【OB Sharding】Black screen DDL optimization

Bug fixes
1. Fixed Core issue when accessing partitioned tables with RowID
2. Fixed issue where deleting text ps under Client 2.0 protocol does not return anything
3. Fixed issue where executing text ps under Client 2.0 protocol, then executing sql normally causes "requestId mismatch" error
4. Fixed issue where erroneous format of err packet in internal SQL causes client to hang
5. Fixed issue where enabling v2 protocol causes "4016" error and disconnection
6. Fixed issue where enabling "enable_ob_protocol_v2_with_client=true" causes disconnection during secondary sql routing
7. Fixed issue where connection id mismatch causes proxy disconnection
8. Fixed issue where enabling compression protocol causes disconnection
9. Fixed issue where using COM_CHANGE_USER command with username not in user_name@tenant_name format causes inability to use
10. Fixed issue where date type is inaccurately routed in certain scenarios
11. Fixed Core issue caused by abnormal to_timestamp parameter
12. Fixed Core issue caused by executing anonymous blocks in ODC
13. Fixed remote routing issue with to_date function
14. Fixed routing inaccuracy issue with timestamp with local time zone type list partitioning under Oracle mode
15. Fixed Core issue caused by some keywords not having pointers set
16. Fixed issue where detection optimization causes inability to whiteness
17. Fixed issue where SSL configuration retrieval fails
18. Fixed issue where enabling CPU resource isolation on public cloud causes inability to connect to cluster
19. Fixed issue where using int form for vid configuration does not take effect
20. Fixed issue with substr() causing index out of bounds
21. Fixed partition calculation error with range partitioning under "where c1 >20" condition
22. Fixed issue where type conversion fails and causes inability to route when there are NULL values in list and list column partitioning
23. Fixed Core issue introduced by global PS
24. Fixed issue where autocommit flag in OK packet returned by set autocommit=0 is still 1
25. Fixed issue where some fields in RespResult are not initialized in constructor, causing abnormal disconnection when used
26. Fixed issue where XA_START hold&sync PS 2-in-1 protocol supports complex parameter types
27. Fixed issue where XA_START hold&sync synchronous process cannot accept multiple OB20 packets
28. Fixed obproxy Core issue at oceanbase::obproxy::proxy::ObProxyExprCalculator::calc_partition_id_with_rowid_str
29. Fixed obproxy Core issue at oceanbase::obproxy::proxy::ObProto20Utils::analyze_compressed_packet_header
30. Fixed obproxy Core issue where old database saved in proxy session is used, causing obproxy core at oceanbase::common::ObLogger::log_message_kv
31. Fixed obproxy Core dump at oceanbase::obproxy::proxy::ObMysqlSM::setup_error_transfer
32. Fixed obproxy binary Core dump at obproxy/obutils/ob_proxy_sql_parser.cpp:890
33. Fixed obproxy Core dump at oceanbase::obproxy::proxy::ObMysqlSM::tunnel_handler_response_transfered
34. Fixed Core issue with oceanbase::obproxy::proxy::ObMysqlTransact::is_internal_request
35. Fixed odp Core issue with expression mod() calculation at oceanbase::obproxy::opsql::ObProxyExprMod::calc
36. Fixed obproxy Core issue at oceanbase::obproxy::proxy::ObMysqlVCTable::cleanup_entry
37. Fixed obproxy Core issue at oceanbase::obproxy::proxy::ObMysqlTransact::is_internal_request
38. Fixed Core issue at oceanbase::obproxy::proxy::ObProxyPartMgr::get_first_part at obproxy/proxy/route/obproxy_part_mgr.cpp
39. Fixed obproxy core issue at ObCongestionEntry::to_string in obproxy/obutils/ob_congestion_entry.cpp
40. Fixed a disconnect issue when executing insert statement with "binary" keyword in the "values" clause in OB Sharding
41. Fixed an issue in OB Sharding where the "case when" condition in the "where" clause is incorrectly identified as a sharding parameter
42. Fixed a core issue in OB Sharding when using unsupported expressions in the "order by" or "group by" clause
  • Loading branch information
guangshu.wgs committed Mar 22, 2023
1 parent 0706902 commit bacd5fa
Show file tree
Hide file tree
Showing 320 changed files with 31,363 additions and 19,430 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ obproxy-tmp*
src/.DS_Store
unittest/.DS_Store
ob_proxy_parser.output
.vscode/*
rpm/.dep_create
deps/3rd/home
deps/3rd/var
deps/3rd/usr
Expand Down
3 changes: 2 additions & 1 deletion .secignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
http://www.quicklz.com/)
http://www.goof.com/pcg/marc/liblzf.html)
http://www.fastlz.org/
http://stackoverflow.com/a/32095106/646947
http://stackoverflow.com/*
https://stackoverflow.com/*
http://fastcompression.blogspot.com/p/lz4.html
https://groups.google.com/forum/#
https://github.com/mcmilk/zstdmt
Expand Down
12 changes: 6 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ function do_config()
./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 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"
;;
xso)
# configure for obproxy_so
./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"
;;
*)
# 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 Expand Up @@ -121,7 +121,7 @@ function do_rpm()
cd ${TMP_DIR}/BUILD

echo "[BUILD] make rpms..._prefix=${PREFIX} spec_file=${SPEC_FILE}"
rpmbuild --define "_topdir ${TMP_DIR}" --define "NAME ${PACKAGE}" --define "VERSION ${VERSION}" --define "_prefix ${PREFIX}" --define "RELEASE ${RELEASE}" -ba ${TOPDIR}/deps/3rd/${SPEC_FILE} || exit 2
rpmbuild --define "_topdir ${TMP_DIR}" --define "NAME ${PACKAGE}" --define "VERSION ${VERSION}" --define "_prefix ${PREFIX}" --define "RELEASE ${RELEASE}" --define "rpm_path ${TOPDIR}" -ba ${TOPDIR}/deps/3rd/${SPEC_FILE} || exit 2
echo "[BUILD] make rpms done."

cd ${TOPDIR}
Expand Down
49 changes: 26 additions & 23 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
AC_INIT([OceanBase],
[4.0.0],
[4.1.0.0],
[[email protected]],
[obproxy-ce],
[http://oceanbase.taobao.org/])

obapi_version="4.0.0"
obapi_version="4.1.0.0"
AC_SUBST(obapi_version)

AC_DISABLE_STATIC
Expand All @@ -26,12 +26,12 @@
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 -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"
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 -fno-omit-frame-pointer"
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"
;;
* )
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=core2 -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=core2 -Wno-psabi -Wno-sign-compare -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=core2 -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 -fno-omit-frame-pointer"
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=core2 -Wno-psabi -Wno-sign-compare"
;;
esac
fi
Expand All @@ -41,6 +41,26 @@
]
)

AC_ARG_WITH([so],
AS_HELP_STRING([--with-so],
[with so support (default is NO)]),
[
if test "$withval" = "yes"; then
support_so=yes
AM_CXXFLAGS="${AM_CXXFLAGS} -fPIC"
AM_CFLAGS="${AM_CFLAGS} -fPIC"
fi
],
[support_so=no]
)

AM_CONDITIONAL([HAVE_SO], test x$support_so = xyes )

if test "$support_so" == "no"; then
AM_CXXFLAGS="${AM_CXXFLAGS} -fuse-ld=lld -ffunction-sections -Wl,--no-warn-symbol-ordering,--symbol-ordering-file,${ac_abs_confdir}/hotfuncs.txt"
AM_CFLAGS="${AM_CFLAGS} -fuse-ld=lld -ffunction-sections -Wl,--no-warn-symbol-ordering,--symbol-ordering-file,${ac_abs_confdir}/hotfuncs.txt"
fi

#check gcc version, add -Wno-ignored-qualifiers flag for gcc version greater than 4.3.0
GCC_VERSION=`$CC -dumpfullversion -dumpversion`
if test $? -eq 0; then
Expand Down Expand Up @@ -101,23 +121,6 @@
],
[])

AC_ARG_WITH([perf],
AS_HELP_STRING([--with-perf],
[with perf (default is NO)]),
[
if test "$withval" = "yes"; then
# The following parameters are options for using gperftools,
# currently not using tcmalloc
# test_perf=yes
# AM_CXXFLAGS="${AM_CXXFLAGS} -D__NEED_PERF__"
# AM_LDFLAGS="${AM_LDFLAGS} -lprofiler"
AM_CXXFLAGS="${AM_CXXFLAGS} -fno-omit-frame-pointer"
AM_CFLAGS="${AM_CFLAGS} -fno-omit-frame-pointer"
fi
],
[with_perf=no]
)

AC_ARG_WITH([asan],
AS_HELP_STRING([--with-asan],
[with asan (default is NO)]),
Expand Down
24 changes: 22 additions & 2 deletions deps/3rd/obproxy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,29 @@ OceanBase Database Proxy
%setup

%build
./configure CXX=${CXX} CC=${CC} --with-gcc-version=9.3.0 RELEASEID=%{RELEASE} --prefix=%{_prefix} --with-test-case=no --with-release=yes --with-tblib-root=/opt/csr/common --with-easy-root=/usr --with-easy-lib-path=/usr/lib64 --with-svnfile --enable-shared=default --enable-silent-rules
mkdir -p unittest
mkdir -p lib
cp ${TOOLS_DIR}/lib64/libstdc++.so.6.0.28 lib/libstdc++.so.6

#./configure CXX=${CXX} CC=${CC} --with-gcc-version=9.3.0 --with-so --prefix=%{_prefix} --with-test-case=no --with-release=yes --with-tblib-root=/opt/csr/common --with-easy-root=/usr --with-easy-lib-path=/usr/lib64 --with-svnfile --enable-shared=default --enable-silent-rules
CPU_CORES=`grep -c ^processor /proc/cpuinfo`
MAKE_ARGS="-j $CPU_CORES"
#make $MAKE_ARGS
#cp src/obproxy/.libs/libobproxy_so.so.0.0.0 lib/libobproxy_so.so

#make distclean >/dev/null 2>&1
#find . -path ./tools/codestyle/astyle/build -prune -o -path ./doc -prune -o -name Makefile -exec rm -f {} \;
#find . -name .deps -prune -exec rm -rf {} \;

./configure CXX=${CXX} CC=${CC} --with-gcc-version=9.3.0 RELEASEID=%{RELEASE} --prefix=%{_prefix} --with-test-case=no --with-release=yes --with-tblib-root=/opt/csr/common --with-easy-root=/usr --with-easy-lib-path=/usr/lib64 --with-svnfile --enable-shared=default --enable-silent-rules
mkdir -p unittest
make $MAKE_ARGS

%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT%{install_dir}/bin
mkdir -p $RPM_BUILD_ROOT%{install_dir}/lib
cp src/obproxy/obproxy $RPM_BUILD_ROOT%{install_dir}/bin
cp -r lib/* $RPM_BUILD_ROOT%{install_dir}/lib
cp script/deploy/obproxyd.sh $RPM_BUILD_ROOT%{install_dir}/bin

%clean
Expand All @@ -54,12 +67,19 @@ rm -rf $RPM_BUILD_ROOT
%dir %{install_dir}/bin
%{install_dir}/bin/obproxy
%{install_dir}/bin/obproxyd.sh
%{install_dir}/lib/libstdc++.so.6

%pre
rm -rf %{install_dir}/log
rm -rf %{install_dir}/bin
rm -rf %{install_dir}/etc
rm -rf %{install_dir}/.conf
rm -rf /u01/obproxy/lib
mkdir -p /u01/obproxy/lib

%post
chown -R admin:admin %{install_dir}
ln -s %{install_dir}/lib/libobproxy_so.so /u01/obproxy/lib/libobproxy_so.so.0
ln -s %{install_dir}/lib/libobproxy_so.so /u01/obproxy/lib/libobproxy_so.so
ln -s %{install_dir}/lib/libprotobuf.so.18 /u01/obproxy/lib/libprotobuf.so.18
ln -s %{install_dir}/lib/libstdc++.so.6 /u01/obproxy/lib/libstdc++.so.6
21 changes: 0 additions & 21 deletions deps/easy/src/io/easy_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1601,14 +1601,6 @@ static int easy_ssl_dhparam(easy_ssl_ctx_t *ssl, char *file)
DH *dh;
BIO *bio;

/*
* -----BEGIN DH PARAMETERS-----
* MIGHAoGBALu8LcrYRnSQfEP89YDpz9vZWKP1aLQtSwju1OsPs1BMbAMCducQgAxc
* y7qokiYUxb7spWWl/fHSh6K8BJvmd4Bg6RqSp1fjBI9osHb302zI8pul34HcLKcl
* 7OZicMyaUDXYzs7vnqAnSmOrHlj6/UmI0PZdFGdX2gcd8EXP4WubAgEC
* -----END DH PARAMETERS-----
*/

static unsigned char dh1024_p[] = {
0xBB, 0xBC, 0x2D, 0xCA, 0xD8, 0x46, 0x74, 0x90, 0x7C, 0x43, 0xFC, 0xF5,
0x80, 0xE9, 0xCF, 0xDB, 0xD9, 0x58, 0xA3, 0xF5, 0x68, 0xB4, 0x2D, 0x4B,
Expand Down Expand Up @@ -1677,19 +1669,6 @@ static int easy_ssl_dhparam_mysql(easy_ssl_ctx_t *ssl)
{
DH *dh;

/*
Diffie-Hellman key.
Generated using: >openssl dhparam -5 -C 2048
-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEAil36wGZ2TmH6ysA3V1xtP4MKofXx5n88xq/aiybmGnReZMviCPEJ
46+7VCktl/RZ5iaDH1XNG1dVQmznt9pu2G3usU+k1/VB4bQL4ZgW4u0Wzxh9PyXD
glm99I9Xyj4Z5PVE4MyAsxCRGA1kWQpD9/zKAegUBPLNqSo886Uqg9hmn8ksyU9E
BV5eAEciCuawh6V0O+Sj/C3cSfLhgA0GcXp3OqlmcDu6jS5gWjn3LdP1U0duVxMB
h/neTSCSvtce4CAMYMjKNVh9P1nu+2d9ZH2Od2xhRIqMTfAS1KTqF3VmSWzPFCjG
mjxx/bg6bOOjpgZapvB6ABWlWmRmAAWFtwIBBQ==
-----END DH PARAMETERS-----
*/
static unsigned char dh2048_p[]=
{
0x8A, 0x5D, 0xFA, 0xC0, 0x66, 0x76, 0x4E, 0x61, 0xFA, 0xCA, 0xC0, 0x37,
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 @@
4.0.0
4.1.0.0
48 changes: 32 additions & 16 deletions src/common/cache/ob_kv_storecache.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ enum ObKVCachePolicy
struct ObKVCacheConfig
{
public:
ObKVCacheConfig();
void reset();
/* this function is defined for c driver client compile */
ObKVCacheConfig() {};
/* this function is defined for c driver client compile */
void reset() {};
bool is_valid_;
int64_t priority_;
char cache_name_[MAX_CACHE_NAME_LENGTH];
Expand Down Expand Up @@ -267,9 +269,12 @@ class ObKVCacheInstMap;
class ObKVCacheInstHandle
{
public:
ObKVCacheInstHandle();
virtual ~ObKVCacheInstHandle();
void reset();
/* this function is defined for c driver client compile */
ObKVCacheInstHandle() {};
/* this function is defined for c driver client compile */
virtual ~ObKVCacheInstHandle() {};
/* this function is defined for c driver client compile */
void reset() {};
inline ObKVCacheInst *get_inst() { return inst_; }
private:
friend class ObKVCacheInstMap;
Expand All @@ -291,8 +296,10 @@ struct ObKVCacheInfo
class ObKVCacheInstMap
{
public:
ObKVCacheInstMap();
virtual ~ObKVCacheInstMap();
/* this function is defined for c driver client compile */
ObKVCacheInstMap() {};
/* this function is defined for c driver client compile */
virtual ~ObKVCacheInstMap() {};
int init(const int64_t max_entry_cnt, const ObKVCacheConfig *configs);
void destroy();
int get_cache_inst(
Expand All @@ -319,8 +326,10 @@ class ObKVCacheInstMap
class ObKVCacheStore
{
public:
ObKVCacheStore();
virtual ~ObKVCacheStore();
/* this function is defined for c driver client compile */
ObKVCacheStore() {};
/* this function is defined for c driver client compile */
virtual ~ObKVCacheStore() {};
int init(ObKVCacheInstMap &insts, const int64_t max_cache_size, const int64_t block_size);
void destroy();
int set_priority(const int64_t cache_id, const int64_t old_priority, const int64_t new_priority);
Expand Down Expand Up @@ -394,8 +403,10 @@ class ObKVCacheStore
class ObKVCacheMap
{
public:
ObKVCacheMap();
virtual ~ObKVCacheMap();
/* this function is defined for c driver client compile */
ObKVCacheMap() {};
/* this function is defined for c driver client compile */
virtual ~ObKVCacheMap() {};
int init(const int64_t bucket_num, ObKVCacheStore *store);
void destroy();
int erase_all();
Expand Down Expand Up @@ -452,19 +463,23 @@ class ObKVCacheHandle;
class ObKVGlobalCache
{
public:
static ObKVGlobalCache &get_instance();
/* this function is defined for c driver client compile */
static ObKVGlobalCache &get_instance() {return *(new ObKVGlobalCache());};
int init(const int64_t bucket_num = DEFAULT_BUCKET_NUM,
const int64_t max_cache_size = DEFAULT_MAX_CACHE_SIZE,
const int64_t block_size = common::OB_MALLOC_BIG_BLOCK_SIZE);
void destroy();
void reload_priority();
/* this function is defined for c driver client compile */
void reload_priority() {};
int get_tenant_cache_info(const uint64_t tenant_id, ObIArray<ObKVCacheInfo> &infos);
int get_all_cache_info(ObIArray<ObKVCacheInfo> &infos);
private:
template<class Key, class Value> friend class ObKVCache;
friend class ObKVCacheHandle;
ObKVGlobalCache();
virtual ~ObKVGlobalCache();
/* this function is defined for c driver client compile */
ObKVGlobalCache() {}
/* this function is defined for c driver client compile */
virtual ~ObKVGlobalCache() {}
int register_cache(const char *cache_name, const int64_t priority, int64_t &cache_id);
void deregister_cache(const int64_t cache_id);
int set_priority(const int64_t cache_id, const int64_t priority);
Expand All @@ -482,7 +497,8 @@ class ObKVGlobalCache
ObKVMemBlockHandle *&mb_handle);
int erase(const int64_t cache_id, const ObIKVCacheKey &key);
void revert(ObKVMemBlockHandle *mb_handle);
void wash();
/* this function is defined for c driver client compile */
void wash() {};
private:
static const int64_t DEFAULT_BUCKET_NUM = 10000000L;
static const int64_t DEFAULT_MAX_CACHE_SIZE = 1024L * 1024L * 1024L * 1024L; //1T
Expand Down
9 changes: 6 additions & 3 deletions src/common/mysql_proxy/ob_isql_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ class ObISQLClient
public:
friend class ObISQLClient;

ReadResult();
virtual ~ReadResult();
/* this function is defined for c driver client compile */
ReadResult() {}
/* this function is defined for c driver client compile */
virtual ~ReadResult() {}

sqlclient::ObMySQLResult *mysql_result();
/* this function is defined for c driver client compile */
sqlclient::ObMySQLResult *mysql_result() {return nullptr;}
// FIXME : remove
sqlclient::ObMySQLResult *get_result() { return mysql_result(); }

Expand Down
Loading

0 comments on commit bacd5fa

Please sign in to comment.