From 3c94f4fbc96af8b72a8e880c80d1059ac6ac3b5d Mon Sep 17 00:00:00 2001 From: 884244693 <884244693@qq.com> Date: Thu, 19 Dec 2024 11:14:46 +0000 Subject: [PATCH] [vector index] rpc OB_SCHEDULE_OFFLINE_DDL_TASK place holder --- deps/oblib/src/rpc/obrpc/ob_rpc_packet_list.h | 1 + src/share/ob_rpc_struct.cpp | 8 +++++- src/share/ob_rpc_struct.h | 27 ++++++++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/deps/oblib/src/rpc/obrpc/ob_rpc_packet_list.h b/deps/oblib/src/rpc/obrpc/ob_rpc_packet_list.h index 6baa93f4a..5c1b7786e 100644 --- a/deps/oblib/src/rpc/obrpc/ob_rpc_packet_list.h +++ b/deps/oblib/src/rpc/obrpc/ob_rpc_packet_list.h @@ -1007,6 +1007,7 @@ PCODE_DEF(OB_UPDATE_TENANT_QUICK_RESTORE, 0x142C) PCODE_DEF(OB_BACKUP_FUSE_TABLET_META, 0x142D) PCODE_DEF(OB_NOTIFY_LS_RESTORE_FINISH, 0x142E) PCODE_DEF(OB_NOTIFY_START_ARCHIVE, 0x142F) +// PCODE_DEF(OB_SCHEDULE_OFFLINE_DDL_TASK, 0x1430) // backup and restore end 0x14ff // logservice diff --git a/src/share/ob_rpc_struct.cpp b/src/share/ob_rpc_struct.cpp index f54f6765d..78d2ed99d 100644 --- a/src/share/ob_rpc_struct.cpp +++ b/src/share/ob_rpc_struct.cpp @@ -3489,7 +3489,13 @@ OB_SERIALIZE_MEMBER((ObCreateIndexArg, ObIndexArg), index_cgs_, vidx_refresh_info_, is_rebuild_index_, - is_index_scope_specified_); + is_index_scope_specified_, + is_offline_rebuild_); + +OB_SERIALIZE_MEMBER((ObIndexOfflineDdlArg, ObDDLArg), + arg_, + task_id_, + sub_task_trace_id_); int ObCreateAuxIndexArg::assign(const ObCreateAuxIndexArg &other) { diff --git a/src/share/ob_rpc_struct.h b/src/share/ob_rpc_struct.h index 964fbad03..2fcc10379 100644 --- a/src/share/ob_rpc_struct.h +++ b/src/share/ob_rpc_struct.h @@ -2798,7 +2798,8 @@ public: index_cgs_(), vidx_refresh_info_(), is_rebuild_index_(false), - is_index_scope_specified_(false) + is_index_scope_specified_(false), + is_offline_rebuild_(false) { index_action_type_ = ADD_INDEX; index_using_type_ = share::schema::USING_BTREE; @@ -2833,6 +2834,7 @@ public: vidx_refresh_info_.reset(); is_rebuild_index_ = false; is_index_scope_specified_ = false; + is_offline_rebuild_ = false; } void set_index_action_type(const IndexActionType type) { index_action_type_ = type; } bool is_valid() const; @@ -2873,6 +2875,7 @@ public: vidx_refresh_info_ = other.vidx_refresh_info_; is_rebuild_index_ = other.is_rebuild_index_; is_index_scope_specified_ = other.is_index_scope_specified_; + is_offline_rebuild_ = other.is_offline_rebuild_; } return ret; } @@ -2944,6 +2947,28 @@ public: share::schema::ObVectorIndexRefreshInfo vidx_refresh_info_; bool is_rebuild_index_; bool is_index_scope_specified_; + bool is_offline_rebuild_; +}; + +struct ObIndexOfflineDdlArg : ObDDLArg +{ + OB_UNIS_VERSION_V(1); +public: + ObIndexOfflineDdlArg() {} + ObIndexOfflineDdlArg(const ObCreateIndexArg &arg, int64_t task_id, int32_t sub_task_trace_id) + : arg_(), + task_id_(task_id), + sub_task_trace_id_(sub_task_trace_id) + { + exec_tenant_id_ = arg.tenant_id_;; + arg_.assign(arg); + } + ~ObIndexOfflineDdlArg() {} + +public: + ObCreateIndexArg arg_; + int64_t task_id_; + int32_t sub_task_trace_id_; }; struct ObCreateAuxIndexArg : public ObDDLArg