Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
19ceaea
Merge branch 'issue/2025092600111207812' into 'master'
Sep 29, 2025
df32d41
Merge branch 'task/2025091600110986351' into 'master'
Sep 29, 2025
306bfa7
Merge branch 'issue/2025082800110698735' into 'master'
Sep 30, 2025
0b9c801
Merge branch 'issue/2025092500111170534' into 'master'
Sep 30, 2025
305208d
Merge branch 'task/2025091100110920568' into 'master'
Oct 9, 2025
6fdddbc
Merge branch 'issue/2025092900111258377' into 'master'
Oct 9, 2025
b4e63ff
Merge branch 'task/2025081800110494683' into 'master'
Oct 10, 2025
096424b
Merge branch 'task/2025101000111341927' into 'master'
Oct 10, 2025
3b1b811
Merge branch 'task/2025101000111343567' into 'master'
Oct 11, 2025
d8e5004
Merge branch 'task/2025101000111344858' into 'master'
Oct 11, 2025
bf7ed08
Merge branch 'ai_search_patch' into 'master'
Oct 13, 2025
340927c
Merge branch 'task/2025082800110709764' into 'master'
Oct 13, 2025
902a1c3
Merge branch 'issue/2025092500111170534' into 'master'
Oct 13, 2025
ebd4ad1
Merge branch 'issue/2025101300111392859' into 'master'
Oct 13, 2025
fd16e24
Merge branch 'task/2025101300111394838' into 'master'
Oct 14, 2025
8bfbfb2
Merge branch 'issue/2025082900110725664' into 'master'
Oct 15, 2025
b9f6b40
Merge branch 'issue/2025101100111361469' into 'master'
Oct 16, 2025
c3116b8
Merge branch 'issue/2025101100111358780' into 'master'
Oct 16, 2025
e2b63fb
Merge branch 'issue/2025101100111366010' into 'master'
Oct 16, 2025
44f14b4
Merge branch 'task/2025101300111396445' into 'master'
Oct 16, 2025
c005fcf
Merge branch 'task/2025101300111395312' into 'master'
Oct 16, 2025
104e4ec
Merge branch 'issue/2025101500111432475' into 'master'
Oct 16, 2025
b7b3fe9
Merge branch 'task/2025080600110338342' into 'master'
Oct 16, 2025
dae7ca2
Merge branch 'task/2025101500111437890' into 'master'
Oct 16, 2025
ee8e88c
Merge branch 'task/2025072500110135659' into 'master'
Oct 16, 2025
ded0fd8
Merge branch 'task/2025101300111385790' into 'master'
Oct 16, 2025
0192147
Merge branch 'task/2025090900110870926' into 'master'
Oct 16, 2025
bcd0fea
Merge branch 'issue/2025101600111450659' into 'master'
Oct 16, 2025
a7d1758
Merge branch 'task/2025101000111354456' into 'master'
Oct 17, 2025
73ee29b
Merge branch 'task/2025100900111334201' into 'master'
Oct 17, 2025
a2ecec7
Merge branch 'issue/2025092600111204200' into 'master'
Oct 20, 2025
cccd754
Merge branch 'issue/2025101400111409730' into 'master'
Oct 20, 2025
aa62085
Merge branch 'issue/2025101700111469918' into 'master'
Oct 20, 2025
357662f
Merge branch 'issue/2025101700111470672' into 'master'
Oct 20, 2025
8445426
Merge branch 'issue/2025101500111428385' into 'master'
Oct 20, 2025
e0c69ab
Merge branch 'issue/2025102000111509148' into 'master'
Oct 21, 2025
f9307e2
Merge branch 'task/2025101700111470960' into 'master'
Oct 21, 2025
c205264
Merge branch 'memory_limit' into 'master'
Oct 21, 2025
6ddde78
Bump protobuf from 3.18.0 to 4.25.8 in /tools/upgrade
dependabot[bot] Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
.pydevproject
.review/
.vscode/
.cursor/
/.obdev
/.settings/
BROWSE
Expand Down Expand Up @@ -255,6 +256,7 @@ tools/deploy/single.yaml
tools/deploy/tpchobp_test.yaml
tools/deploy/bmsqlobp_test.yaml
tools/deploy/oci_test.yaml
tools/deploy/mirror_create
tools/log_parser/slog_parser
tools/log_tool/log_statistics
tools/log_tool/log_tool
Expand Down Expand Up @@ -314,13 +316,11 @@ tools/deploy/single-with-proxy.yaml
tools/deploy/single.yaml
tools/docker/standalone/boot
tools/docker/standalone/init_store_for_fast_start.py
tools/systemd/profile/oceanbase-service.sh
tools/systemd/profile/pre_install.sh
tools/systemd/profile/post_install.sh
tools/systemd/profile/pre_uninstall.sh
tools/systemd/profile/post_uninstall.sh
tools/systemd/profile/telemetry.sh
tools/systemd/profile/oceanbase.service
tools/systemd/profile/preinst
tools/systemd/profile/postinst
tools/systemd/profile/prerm
Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cmake_minimum_required(VERSION 3.20)
include(cmake/Utils.cmake)
include(cmake/Env.cmake)

project("OceanBase_CE"
VERSION 4.3.5.3
DESCRIPTION "OceanBase distributed database system"
HOMEPAGE_URL "https://open.oceanbase.com/"
project("OceanBase"
VERSION 1.0.0.0
DESCRIPTION "OceanBase Lite database system"
HOMEPAGE_URL "https://open.oceanbase.com"
LANGUAGES CXX C ASM)
message(STATUS "open source build enabled")


if(ENABLE_COMPILE_DLL_MODE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMPILE_DLL_MODE")
Expand Down
389 changes: 201 additions & 188 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cmake/DEB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ endif()

set(CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
set(CPACK_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_PACKAGE_CONTACT "${OceanBase_CE_HOMEPAGE_URL}")
set(CPACK_PACKAGE_CONTACT "${OceanBase_HOMEPAGE_URL}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "OceanBase")
set(CPACK_DEBIAN_PACKAGE_SECTION "database")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "Optional")
Expand Down
8 changes: 7 additions & 1 deletion cmake/Env.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ endif()
if(BUILD_CDC_ONLY)
add_definitions(-DOB_BUILD_CDC_DISABLE_VSAG)
else()
add_definitions(-DENABLE_INITIAL_EXEC_TLS_MODEL)
if(NOT BUILD_EMBED_MODE)
add_definitions(-DENABLE_INITIAL_EXEC_TLS_MODEL)
endif()
endif()

if(BUILD_EMBED_MODE)
add_definitions(-DOB_BUILD_EMBED_MODE)
endif()

set(OB_OBJCOPY_BIN "${DEVTOOLS_DIR}/bin/objcopy")
Expand Down
44 changes: 11 additions & 33 deletions cmake/Pack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@ set(CPACK_PACKAGE_VENDOR "OceanBase Inc.")
set(CPACK_PACKAGE_DESCRIPTION "OceanBase is a distributed relational database")
set(CPACK_COMPONENTS_ALL server sql-parser)

set(CPACK_PACKAGE_NAME "oceanbase-ce")
set(CPACK_PACKAGE_VERSION "${OceanBase_CE_VERSION}")
set(CPACK_PACKAGE_VERSION_MAJOR "${OceanBase_CE_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${OceanBase_CE_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${OceanBase_CE_VERSION_PATCH}")
set(CPACK_PACKAGE_NAME "oceanbase-lite")
set(CPACK_PACKAGE_VERSION "${OceanBase_VERSION}")
set(CPACK_PACKAGE_VERSION_MAJOR "${OceanBase_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${OceanBase_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${OceanBase_VERSION_PATCH}")

## TIPS
#
# - PATH is relative to the **ROOT directory** of project other than the cmake directory.

set(BITCODE_TO_ELF_LIST "")

# systemd define on package
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/systemd/profile/oceanbase-service.sh.template
${CMAKE_CURRENT_SOURCE_DIR}/tools/systemd/profile/oceanbase-service.sh
@ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/systemd/profile/telemetry.sh.template
${CMAKE_CURRENT_SOURCE_DIR}/tools/systemd/profile/telemetry.sh
@ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/systemd/profile/oceanbase.service.template
${CMAKE_CURRENT_SOURCE_DIR}/tools/systemd/profile/oceanbase.service
@ONLY)

set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
"/usr" "/usr/lib" "/usr/lib/systemd" "/usr/lib/systemd/system" "/usr/libexec" "/etc"
)

## server - Install to proper directory structure

Expand Down Expand Up @@ -57,20 +54,12 @@ install(PROGRAMS
COMPONENT server)

install(PROGRAMS
tools/systemd/profile/oceanbase-service.sh
tools/systemd/profile/oceanbase_systemd_pre
tools/systemd/profile/oceanbase_systemd_start
tools/systemd/profile/telemetry.sh
DESTINATION usr/libexec/oceanbase/scripts
COMPONENT server)

# Install post/pre install scripts
install(PROGRAMS
tools/systemd/profile/post_install.sh
tools/systemd/profile/post_uninstall.sh
tools/systemd/profile/pre_install.sh
tools/systemd/profile/pre_uninstall.sh
DESTINATION usr/libexec/oceanbase/scripts
COMPONENT server)

# Install configuration files to /etc/oceanbase
set(INSTALL_EXTRA_FILES "")

Expand All @@ -85,7 +74,6 @@ install(FILES
tools/upgrade/deps_compat.yml
${CMAKE_BINARY_DIR}/src/share/ob_system_variable_init.json
${INSTALL_EXTRA_FILES}
${CMAKE_BINARY_DIR}/ob_all_available_parameters.json
tools/systemd/profile/oceanbase.cnf
tools/systemd/profile/oceanbase-pre.json
tools/systemd/profile/telemetry-pre.json
Expand Down Expand Up @@ -166,16 +154,6 @@ install(FILES
DESTINATION usr/include
COMPONENT sql-parser)

## oceanbase-libs
list(APPEND CPACK_COMPONENTS_ALL libs)
install(PROGRAMS
deps/3rd/usr/local/oceanbase/deps/devel/lib/libaio.so.1
deps/3rd/usr/local/oceanbase/deps/devel/lib/libaio.so.1.0.1
deps/3rd/usr/local/oceanbase/deps/devel/lib/libaio.so
DESTINATION usr/libexec/oceanbase/lib
COMPONENT libs
)

if(OB_BUILD_OBADMIN)
## oceanbase-utils
list(APPEND CPACK_COMPONENTS_ALL utils)
Expand Down
12 changes: 5 additions & 7 deletions cmake/RPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (OB_DISABLE_LSE)
message(STATUS "CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}")
endif()

set(CPACK_RPM_PACKAGE_URL "${OceanBase_CE_HOMEPAGE_URL}")
set(CPACK_RPM_PACKAGE_URL "${OceanBase_HOMEPAGE_URL}")
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
## set relocation path install prefix for each component
set(CPACK_RPM_DEVEL_PACKAGE_PREFIX /usr)
Expand All @@ -36,9 +36,7 @@ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr")

set(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_RPM_PACKAGE_LICENSE "Mulan PubL v2.")
set(CPACK_RPM_DEFAULT_USER "admin")
set(CPACK_RPM_DEFAULT_GROUP "admin")
set(CPACK_RPM_PACKAGE_LICENSE "Apache 2.0")
if (NOT BUILD_CDC_ONLY OR OB_BUILD_STANDALONE)
set(DEBUG_INSTALL_POST "mv $RPM_BUILD_ROOT/../server/usr/bin/obshell %{_builddir}/obshell; %{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} %{_builddir}/%{?buildsubdir}; mv %{_builddir}/obshell $RPM_BUILD_ROOT/../server/usr/bin/obshell; %{nil}")
else()
Expand All @@ -52,13 +50,13 @@ set(CPACK_RPM_SPEC_MORE_DEFINE
%undefine __brp_mangle_shebangs
%global __requires_exclude ^\(/bin/bash\|/usr/bin/\.*\)$
%define __debug_install_post ${DEBUG_INSTALL_POST}
%if \\\"%name\\\" != \\\"oceanbase-ce-sql-parser\\\" && \\\"%name\\\" != \\\"oceanbase-sql-parser\\\"
%if \\\"%name\\\" != \\\"oceanbase-lite-sql-parser\\\" && \\\"%name\\\" != \\\"oceanbase-sql-parser\\\"
%debug_package
%endif
")

# systemd define on rpm
set(CPACK_RPM_SERVER_PACKAGE_REQUIRES "oceanbase-ce-libs = ${CPACK_PACKAGE_VERSION}, systemd")
set(CPACK_RPM_SERVER_PACKAGE_REQUIRES "libaio, systemd")

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/systemd/profile/pre_install.sh.template
${CMAKE_CURRENT_SOURCE_DIR}/tools/systemd/profile/pre_install.sh
Expand Down Expand Up @@ -92,7 +90,7 @@ install(FILES
if (BUILD_CDC_ONLY)
message(STATUS "oceanbase build cdc only")
set(CPACK_COMPONENTS_ALL cdc)
set(CPACK_PACKAGE_NAME "oceanbase-ce-cdc")
set(CPACK_PACKAGE_NAME "oceanbase-lite-cdc")
else()
add_custom_target(bitcode_to_elf ALL
DEPENDS ${BITCODE_TO_ELF_LIST})
Expand Down
2 changes: 1 addition & 1 deletion deps/easy/src/include/easy_atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <sched.h>

/**
* 原子操作
* atomic operation
*/

EASY_CPP_START
Expand Down
2 changes: 1 addition & 1 deletion deps/easy/src/include/easy_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define EASY_DEFINE_H_

/**
* 定义一些编译参数
* Define some compile parameters
*/

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion deps/easy/src/include/easy_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define EASY_LIST_H_

/**
* 列表,参考kernel上的list.h
* list, reference kernel's list.h
*/
#include "easy_define.h"

Expand Down
5 changes: 2 additions & 3 deletions deps/easy/src/io/easy_baseth_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "easy_define.h"

/**
* base pthread线程池
* base pthread thread pool
*/

EASY_CPP_START
Expand All @@ -15,8 +15,7 @@ EASY_CPP_START
for((th) = (typeof(*(th))*)&(tp)->data[offset]; \
(char*)(th) < (tp)->last; \
th = (typeof(*th)*)(((char*)th) + (tp)->member_size))

// 第n个
// the nth
static inline void *easy_thread_pool_index(easy_thread_pool_t *tp, int n)
{
if (n < 0 || n >= tp->thread_count)
Expand Down
8 changes: 3 additions & 5 deletions deps/easy/src/io/easy_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
#include "io/easy_log.h"
#include "io/easy_summary.h"
/**
* IO文件头
* IO file header
*/

EASY_CPP_START

// 接口函数
// interface function
///////////////////////////////////////////////////////////////////////////////////////////////////
// easy_io_t
extern easy_io_t *easy_eio_create(easy_io_t *eio, int io_thread_count);
Expand Down Expand Up @@ -192,8 +191,7 @@ extern int easy_ssl_client_authenticate(easy_ssl_t *ssl, SSL *conn, const void *
#define easy_io_dispatch(addr,s) easy_client_dispatch(&easy_io_var,addr,s)
#define easy_io_send(addr,s) easy_client_send(&easy_io_var,addr,s);
#endif

// 变量
// variable
extern __thread easy_baseth_t *easy_baseth_self;
extern easy_io_t easy_io_var;
extern struct easy_tx_session_pool_t global_tx_session_pool;
Expand Down
35 changes: 12 additions & 23 deletions deps/easy/src/io/easy_io_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <openssl/crypto.h>

/**
* IO结构定义
* IO structure definition
*/

EASY_CPP_START
Expand Down Expand Up @@ -213,9 +213,7 @@ struct easy_io_handler_pt {
//otherthan create ssl connection_t after connect succ

};


// 处理IO的线程
// Thread for handling IO
struct easy_io_thread_t {
EASY_BASETH_DEFINE

Expand All @@ -242,8 +240,7 @@ struct easy_io_thread_t {
easy_atomic32_t tx_conn_count;
easy_atomic32_t rx_conn_count;
};

// 处理任务的线程
// The thread processing the task
struct easy_request_thread_t {
EASY_BASETH_DEFINE

Expand All @@ -255,8 +252,7 @@ struct easy_request_thread_t {
easy_request_process_pt *process;
void *args;
};

// 保存client
// save client
struct easy_client_t {
easy_addr_t addr;
easy_connection_t *c;
Expand Down Expand Up @@ -332,8 +328,7 @@ struct easy_ratelimitor_t {
void *update_s2r_map_cb_args;
easy_region_ratelimitor_t region_rlmtrs[RL_MAX_REGION_COUNT];
};

// 对应一个SOCKET连接
// Corresponds to a SOCKET connection
struct easy_connection_t {
#ifdef EASY_DEBUG_MAGIC
uint64_t magic;
Expand Down Expand Up @@ -415,7 +410,7 @@ struct easy_connection_t {
};

// Todo: add response size, ratelimit and bg/fg flags.
// ipacket放进来的包, opacket及出去的包
// ipacket incoming packet, opacket outgoing packet
struct easy_request_t {
#ifdef EASY_DEBUG_DOING
uint64_t uuid;
Expand Down Expand Up @@ -485,8 +480,7 @@ struct easy_message_session_t {
#endif
EASY_MESSAGE_SESSION_HEADER(list_node);
};

// 用于接收, 一个或多个easy_request_t
// Used to receive, one or more easy_request_t
struct easy_message_t {
#ifdef EASY_DEBUG_MAGIC
uint64_t magic;
Expand All @@ -503,8 +497,7 @@ struct easy_message_t {
void *user_data;
int enable_trace;
};

//用于统计流量rt信息
// Used for statistics of traffic rt information
struct easy_summary_t {
int max_fd;
ev_tstamp time;
Expand All @@ -520,8 +513,7 @@ struct easy_summary_node_t {
uint64_t in_byte, out_byte;
ev_tstamp rt_total;
};

// 用于发送, 只带一个easy_request_t
// Used for sending, only with one easy_request_t
struct easy_session_t {
#ifdef EASY_DEBUG_MAGIC
uint64_t magic;
Expand Down Expand Up @@ -565,8 +557,7 @@ struct easy_tx_session_pool_t {
easy_atomic_t session_total_count;
easy_atomic_t session_avail;
};

// 监听列表
// listen list
#define EASY_LISTEN_HEADER \
int fd; \
int8_t cur, old; \
Expand All @@ -593,8 +584,7 @@ struct easy_listen_t {
easy_listen_t *next;
ev_io read_watcher[0];
};

// 用于统计处理速度
// Used for statistics processing speed
struct easy_io_stat_t {
int64_t last_cnt;
ev_tstamp last_time;
Expand All @@ -603,8 +593,7 @@ struct easy_io_stat_t {
easy_io_stat_process_pt *process;
easy_io_t *eio;
};

// easy_io对象
// easy_io object
struct easy_io_t {
easy_pool_t *pool;
easy_list_t eio_list_node;
Expand Down
Loading
Loading