Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ if(FALSE AND ENABLE_DEBUG_LOG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_DEBUG_LOG")
endif()

if (ENABLE_SANITY)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_SANITY")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_SANITY")
endif()

if (OB_BUILD_PACKAGE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOB_BUILD_PACKAGE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOB_BUILD_PACKAGE")
Expand Down
3 changes: 0 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@ function build
# automatic determination of packaging type
build_package "$@"
;;
xsanity)
do_build "$@" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOB_USE_LLD=$LLD_OPTION -DENABLE_SANITY=ON -DOB_ENABLE_MCMODEL=ON
;;
*)
BUILD_ARGS=(debug "${BUILD_ARGS[@]}")
build
Expand Down
4 changes: 1 addition & 3 deletions cmake/module_check/module_layers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ close_modules/shared_storage/storage/shared_storage/ob_ss_fd_cache_struct.h 2 @
# micro-block format-version helper pure constants header (35 lines zero include), logically marked L2
src/storage/ob_micro_block_format_version_helper.h 2
# pl object id micro-utility pure header (depends only on lib+share rc), logically marked L2
src/pl/ob_pl_object_id_util.h 2
# pl integer pure enum (zero deps), logically marked L2
src/pl/ob_pl_integer_type.h 2
# local session variable value container (105 lines, depends only on lib+common+share sysvar types), schema embedded by value, logically marked L2
Expand All @@ -91,13 +90,12 @@ src/sql/engine/ob_batch_rows.h 2
# generic timing wheel (zero upper-layer deps, misfiled under storage/tx), logically marked L2
src/storage/tx/ob_time_wheel.h 2
# RS job-type pure enum, logically marked L2
src/rootserver/ob_rs_job_type.h 2
# log-file spec pure struct, logically marked L2
src/storage/blocksstable/ob_log_file_spec.h 2
# expression basic function-pointer table (pure fn ptr struct, depends only on share/datum+common), logically marked L2
src/sql/engine/expr/ob_expr_basic_funcs.h 2
# MTL bridge template helper (125 lines, depends only on lib+share rc; twinned with tenant_base framework), logically marked L2
src/observer/omt/ob_tenant_mtl_helper.h 2
src/observer/omt/ob_server_module_lifecycle.h 2
# macro-block handle (depends only on lib+share io+macro_id[L2]), io calibration held by value, logically marked L2
src/storage/blocksstable/ob_macro_block_handle.h 2
# lob diff pure value struct (zero deps), delta lob serialization vocabulary, logically marked L2
Expand Down
8 changes: 4 additions & 4 deletions cmake/script/merge_extra
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def check_data_and_format(data, var):

common_ordered_dict = OrderedDict()
for key in common_item:
if key not in ['cluster','tenant']:
if key not in ['cluster','runtime']:
print("[merge_extra][ERROR] extra 文件字段数据不合预期, 请检查输入文件")
exit(ERROR_CODE.COMMON_ERROR)
next_common_data = common_item[key]
Expand Down Expand Up @@ -177,8 +177,8 @@ def format_json(data, indent=2):
json_str = json.dumps(data, indent=indent, separators=(',', ': '), ensure_ascii=False)
# 动态生成缩进
indent_str = " " * (indent + 4) # 缩进 = 父级缩进 + 4 个空格
# 替换 "tenant": [] 为 "tenant": [\n]
json_str = json_str.replace('"tenant": []', '"tenant": [\n{}]'.format(indent_str))
# Preserve the expanded formatting of an empty runtime list.
json_str = json_str.replace('"runtime": []', '"runtime": [\n{}]'.format(indent_str))
json_str = json_str.replace('"cluster": []', '"cluster": [\n{}]'.format(indent_str))
return json_str

Expand Down Expand Up @@ -215,7 +215,7 @@ def merge_scenario(default_scenario, extra_scenario, var):
extra_params = extra_scenario.get('parameters', {})
merged_params = {}

# 处理cluster和tenant的合并
# Merge cluster and runtime parameter groups.
for param_type in default_params:
default_list = default_params.get(param_type, [])
extra_list = extra_params.get(param_type, [])
Expand Down
23 changes: 0 additions & 23 deletions deps/oblib/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,29 +132,6 @@ if (OB_USE_CLANG)
-Wno-vla ${VLA_WARN_FLAG})
endif()
target_compile_options(oblib_base_without_pass INTERFACE ${OBLIB_COMPILE_DEFINITIONS})
if (ENABLE_SANITY)
target_compile_options(oblib_pass
INTERFACE
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-fpass-plugin=${DEVTOOLS_DIR}/lib64/libsanitypass.so>"
-fno-builtin-memset
-fno-builtin-bzero
-fno-builtin-memcpy
-fno-builtin-memmove
-fno-builtin-memcmp
-fno-builtin-strlen
-fno-builtin-strnlen
-fno-builtin-strcpy
-fno-builtin-strncpy
-fno-builtin-strcmp
-fno-builtin-strncmp
-fno-builtin-strcasecmp
-fno-builtin-strncasecmp
-fno-builtin-vsprintf
-fno-builtin-vsnprintf
-fno-builtin-sprintf
-fno-builtin-snprintf
)
endif()
else()
target_compile_options(oblib_base_without_pass
INTERFACE
Expand Down
6 changes: 1 addition & 5 deletions deps/oblib/src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ ob_set_subtarget(oblib_common common
ob_accuracy.cpp
ob_field.cpp
ob_file_common_header.cpp
ob_member.cpp
ob_member_list.ipp
ob_learner_list.ipp
ob_range.cpp
ob_record_header.cpp
ob_role.cpp
Expand All @@ -16,9 +13,8 @@ ob_set_subtarget(oblib_common common
ob_string_buf.ipp
ob_tablet_id.cpp
ob_timeout_ctx.cpp
ob_zone_type.cpp
ob_version_def.cpp
ob_tenant_data_version_mgr.cpp
ob_data_version_mgr.cpp
)

ob_set_subtarget(oblib_common common_mixed
Expand Down
17 changes: 5 additions & 12 deletions deps/oblib/src/common/cell/ob_cell_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,13 @@ int ObCellWriter::write_text(const ObObj &obj, const enum ObObjType store_type,
{
int ret = OB_SUCCESS;
CellMeta meta;
ObLength max_length = 0;
if (old_text_format()) {
max_length = ObAccuracy::MAX_ACCURACY_OLD[obj.get_type()].get_length();
} else {
max_length = ObAccuracy::MAX_ACCURACY[obj.get_type()].get_length();
}
const ObLength max_length = ObAccuracy::MAX_ACCURACY[obj.get_type()].get_length();

meta.type_ = CellMeta::SF_MASK_TYPE & static_cast<uint8_t>(store_type);
if (CS_TYPE_UTF8MB4_GENERAL_CI == obj.get_collation_type()) {
meta.attr_ = old_text_format() ? TEXT_VARCHAR_NO_COLL : TEXT_SCALE_NO_COLL;
meta.attr_ = TEXT_SCALE_NO_COLL;
} else {
meta.attr_ = old_text_format() ? TEXT_VARCHAR_COLL : TEXT_SCALE_COLL;
meta.attr_ = TEXT_SCALE_COLL;
}

if (OB_SUCC(ret)) {
Expand All @@ -180,7 +175,7 @@ int ObCellWriter::write_text(const ObObj &obj, const enum ObObjType store_type,
}
}
}
if (OB_SUCC(ret) && !old_text_format()) {
if (OB_SUCC(ret)) {
ObLobScale lob_scale(obj.get_scale());
if (obj.has_lob_header()) {
lob_scale.set_has_lob_header();
Expand Down Expand Up @@ -309,12 +304,11 @@ ObCellWriter::ObCellWriter()
last_append_pos_(0),
cell_cnt_(0),
store_type_(SPARSE),
old_text_format_(false),
is_inited_(false)
{
}

int ObCellWriter::init(char *buf, int64_t size, const ObCompactStoreType store_type, const bool old_text_format)
int ObCellWriter::init(char *buf, int64_t size, const ObCompactStoreType store_type)
{
int ret = OB_SUCCESS;
if (is_inited_) {
Expand All @@ -332,7 +326,6 @@ int ObCellWriter::init(char *buf, int64_t size, const ObCompactStoreType store_t
pos_ = 0;
cell_cnt_ = 0;
store_type_ = store_type;
old_text_format_ = old_text_format;
is_inited_ = true;
}
return ret;
Expand Down
5 changes: 1 addition & 4 deletions deps/oblib/src/common/cell/ob_cell_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,12 @@ class ObCellWriter
public:
ObCellWriter();
virtual ~ObCellWriter() {}
int init(char *buf, int64_t size, const ObCompactStoreType store_type, const bool old_text_format = false);
int init(char *buf, int64_t size, const ObCompactStoreType store_type);
int append(uint64_t column_id, const ObObj &obj, ObObj *clone_obj = NULL);
int append(const ObObj &obj);
int extend_buf(char *buf, int64_t size);
int revert_buf(char *buf, int64_t size);
void reuse() { pos_ = 0; last_append_pos_ = 0; cell_cnt_ = 0; }
void reset_text_format(const bool old_text_format) { old_text_format_ = old_text_format; }
void set_store_type(const ObCompactStoreType store_type) { store_type_ = store_type; }
int row_finish();
inline int64_t get_cell_cnt() { return cell_cnt_; }
Expand All @@ -110,7 +109,6 @@ class ObCellWriter
inline int write_ext(const int64_t ext_value);
inline int write_decimal_int(const ObObj &obj, ObObj *clone_obj);
inline int get_int_byte(int64_t int_value);
inline bool old_text_format () const { return old_text_format_; }
private:
char *buf_;
int64_t buf_size_;
Expand All @@ -121,7 +119,6 @@ class ObCellWriter
int64_t last_append_pos_;
int64_t cell_cnt_;
ObCompactStoreType store_type_;
bool old_text_format_;
bool is_inited_;
};
}//end namespace common
Expand Down
18 changes: 0 additions & 18 deletions deps/oblib/src/common/log/ob_log_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,11 @@ enum LogCommand
OB_RT_MS_REGIST = 402,
OB_RT_SERVER_DOWN = 403,
OB_RT_CS_LOAD_REPORT = 404,
OB_RT_CS_MIGRATE_DONE = 405,
OB_RT_CS_START_SWITCH_ROOT_TABLE = 406,
OB_RT_START_REPORT = 407,
OB_RT_REPORT_TABLETS = 408,
OB_RT_ADD_NEW_TABLET = 409,
OB_RT_CREATE_TABLE_DONE = 410,
OB_RT_BEGIN_BALANCE = 411,
OB_RT_BALANCE_DONE = 412,
OB_RT_US_MEM_FRZEEING = 413,
OB_RT_US_MEM_FROZEN = 414,
OB_RT_CS_START_MERGEING = 415,
Expand All @@ -65,32 +62,25 @@ enum LogCommand
OB_RT_SYNC_FROZEN_VERSION = 421,
OB_RT_SET_UPS_LIST = 422,
OB_RT_SET_CLIENT_CONFIG = 423,
OB_RT_REMOVE_REPLICA = 424,
OB_RT_SYNC_FROZEN_VERSION_AND_TIME = 425,
OB_RT_REMOVE_TABLE = 426,
OB_RT_SYNC_FIRST_META_ROW = 427,
OB_RT_BATCH_ADD_NEW_TABLET = 428,
OB_RT_GOT_CONFIG_VERSION = 429,
OB_RT_CS_DELETE_REPLICAS = 430,
OB_RT_SET_BROADCAST_FROZEN_VERSION = 431,
OB_RT_LMS_REGIST = 432,
OB_RT_SET_LAST_MERGED_VERSION = 433,


//// ChunkServer ... 600 - 799 ////
OB_LOG_CS_DAILY_MERGE = 600, //Daily consolidation
OB_LOG_CS_MIGRATE_PARTITION = 601, //Migrate tablet
OB_LOG_CS_MERGE_PARTITION = 604, //Merge tablet
OB_LOG_CS_DEL_PARTITION = 605, //Delete tablet
OB_LOG_CS_DEL_TABLE = 606, //Delete table
OB_LOG_CS_CREATE_PARTITION = 607, //Create tablet
OB_LOG_CS_DISK_MAINTAIN = 608, //Disk maintenance
OB_LOG_CS_NORMAL_MACRO_BLOCK_META = 609, //Write a single macro block meta
OB_LOG_CS_DISK_BALANCE = 610,

OB_LOG_CS_MERGE_MACRO_BLOCK_META = 611, //merge macro block meta
OB_LOG_CS_BALANCE_MACRO_BLOCK_META = 612, //balance macro block meta
OB_LOG_CS_MIGRATE_MACRO_BLOCK_META = 613, //migrate macro block meta

OB_LOG_CS_SCHEMA_MACRO_BLOCK_META = 614, //schema macro block meta
OB_LOG_CS_COMPRESSOR_MACRO_BLOCK_META = 615, //compressor macro block meta
Expand All @@ -101,15 +91,13 @@ enum LogCommand
OB_LOG_CS_REVERT_PARTITION = 620, //revert a partition to a specified version
OB_LOG_CS_MINOR_MERGE = 621, //Dump minor version merge

OB_LOG_CS_MIGRATE_MACRO_BLOCK = 622, //Write a single macro block in the migration tablet
OB_LOG_CS_CREATE_PARTITION_STORAGE = 623,
OB_LOG_CS_DEL_PARTITION_STORAGE = 624,

OB_LOG_ADD_SSTABLE = 625,
OB_LOG_TABLE_MGR = 626,
OB_LOG_UPDATE_PARTITION_META = 627,
OB_LOG_PARTITION_DROP_INDEX = 628,
OB_LOG_SET_REPLICA_TYPE = 629,

OB_LOG_SET_REFERENCE_TABLES = 632,
OB_LOG_REMOVE_OLD_TABLE = 633,
Expand All @@ -120,14 +108,10 @@ enum LogCommand
OB_LOG_WRITE_REPORT_STATUS = 638,
OB_LOG_UPDATE_STORAGE_INFO_AFTER_RELEASE_MEMTABLE = 639,
OB_LOG_SET_RESTORE_FLAG = 640,
OB_LOG_SET_MIGRATE_STATUS = 641,
OB_LOG_CLEAR_SSTABLES_AFTER_REPLAY_POINT = 642,
OB_LOG_WRITE_TENANT_CONFIG = 643,
OB_LOG_CS_CREATE_PARTITION_GROUP = 644,
OB_LOG_SET_MEMBER_LIST = 645,
OB_LOG_SET_PARTITION_RECOVER_POINT = 646,
OB_LOG_UPDATE_PG_SUPER_BLOCK = 647,
OB_LOG_UPDATE_TENANT_FILE_INFO = 648,
OB_LOG_BATCH_REPLACE_MINOR_SSTABLE = 649,
OB_LOG_SET_PG_LAST_RESTORE_LOG_ID = 650,
OB_LOG_BATCH_REPLACE_STORE_MAP = 651,
Expand All @@ -136,8 +120,6 @@ enum LogCommand
OB_LOG_ADD_RECOVERY_POINT_DATA = 654,
OB_LOG_REMOVE_RECOVERY_POINT_DATA = 655,
OB_LOG_UPDATE_BLOCK_MGR = 656,
// 657 was the removed external-CDC DDL barrier state. Do not reuse.
OB_PG_LOG_ARCHIVE_PERSIST = 658,
OB_UPDATE_STORAGE_SCHEMA = 659,

// ls 680 - 700
Expand Down
1 change: 0 additions & 1 deletion deps/oblib/src/common/mysqlclient/ob_isql_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class ObISQLClient

// FIXME baihua: replace 'const char *' with 'const ObString &'
// execute query and return data result
virtual int read(ReadResult &res, const int64_t cluster_id, const char *sql) = 0;
virtual int read(ReadResult &res, const char *sql) { return this->read(res, sql, 0); }
virtual int read(ReadResult &res, const char *sql, const int32_t group_id) = 0;

Expand Down
12 changes: 2 additions & 10 deletions deps/oblib/src/common/mysqlclient/ob_isql_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,9 @@ class ObISQLConnection

// sql execute interface
virtual int execute_read(const ObString &sql,
ObISQLClient::ReadResult &res, bool is_user_sql = false,
const common::ObAddr *sql_exec_addr = nullptr) = 0;
virtual int execute_read(const int64_t cluster_id, const ObString &sql,
ObISQLClient::ReadResult &res, bool is_user_sql = false,
const common::ObAddr *sql_exec_addr = nullptr) = 0;
ObISQLClient::ReadResult &res, bool is_user_sql = false) = 0;
virtual int execute_write(const ObString &sql,
int64_t &affected_rows, bool is_user_sql = false,
const common::ObAddr *sql_exec_addr = nullptr) = 0;
int64_t &affected_rows, bool is_user_sql = false) = 0;
virtual int execute_proc() { return OB_NOT_SUPPORTED; }
virtual int execute_proc(ObIAllocator &allocator,
ParamStore &params,
Expand Down Expand Up @@ -154,7 +149,6 @@ class ObISQLConnection
virtual int get_session_variable(const ObString &name, int64_t &val) = 0;
virtual int set_session_variable(const ObString &name, int64_t val) = 0;
virtual int set_session_variable(const ObString &name, const ObString &val) = 0;

virtual int execute(ObIExecutor &executor)
{
UNUSED(executor);
Expand All @@ -169,10 +163,8 @@ class ObISQLConnection
virtual int set_tz_info_wrap(const ObTimeZoneInfoWrap &tz_info_wrap) { UNUSED(tz_info_wrap); return OB_NOT_SUPPORTED; }
virtual void set_nls_formats(const ObString *nls_formats) { UNUSED(nls_formats); }
virtual void set_is_load_data_exec(bool v) { UNUSED(v); }
virtual void set_force_remote_exec(bool v) { UNUSED(v); }
virtual void set_use_external_session(bool v) { UNUSED(v); }
virtual void set_ob_enable_pl_cache(bool v) { UNUSED(v); }
virtual int64_t get_cluster_id() const { return common::OB_INVALID_ID; }
virtual void set_user_timeout(int64_t user_timeout) { UNUSED(user_timeout); }
virtual int64_t get_user_timeout() const { return 0; }
void set_usable(bool flag) { usable_ = flag; }
Expand Down
Loading
Loading