diff --git a/src/observer/virtual_table/ob_all_virtual_ls_info.cpp b/src/observer/virtual_table/ob_all_virtual_ls_info.cpp index 4435810e91..54cfcbc0bf 100644 --- a/src/observer/virtual_table/ob_all_virtual_ls_info.cpp +++ b/src/observer/virtual_table/ob_all_virtual_ls_info.cpp @@ -185,6 +185,10 @@ int ObAllVirtualLSInfo::process_curr_tenant(ObNewRow *&row) // rebuild_seq cur_row_.cells_[i].set_int(ls_info.rebuild_seq_); break; + case OB_APP_MIN_COLUMN_ID + 13: + // clog_checkpoint_ts + cur_row_.cells_[i].set_uint64(!ls_info.tablet_change_checkpoint_scn_.is_valid() ? 0 : ls_info.tablet_change_checkpoint_scn_.get_val_for_tx()); + break; default: ret = OB_ERR_UNEXPECTED; SERVER_LOG(WARN, "invalid col_id", K(ret), K(col_id)); diff --git a/src/share/inner_table/ob_inner_table_schema.12251_12300.cpp b/src/share/inner_table/ob_inner_table_schema.12251_12300.cpp index ed52ddc96a..069b83a927 100644 --- a/src/share/inner_table/ob_inner_table_schema.12251_12300.cpp +++ b/src/share/inner_table/ob_inner_table_schema.12251_12300.cpp @@ -9372,6 +9372,21 @@ int ObInnerTableSchema::all_virtual_ls_info_schema(ObTableSchema &table_schema) false, //is_nullable false); //is_autoincrement } + + if (OB_SUCC(ret)) { + ADD_COLUMN_SCHEMA("tablet_change_checkpoint_scn_", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObUInt64Type, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(uint64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false); //is_autoincrement + } if (OB_SUCC(ret)) { table_schema.get_part_option().set_part_num(1); table_schema.set_part_level(PARTITION_LEVEL_ONE); diff --git a/src/share/inner_table/ob_inner_table_schema_def.py b/src/share/inner_table/ob_inner_table_schema_def.py index cb4f2737eb..0e54e58e63 100644 --- a/src/share/inner_table/ob_inner_table_schema_def.py +++ b/src/share/inner_table/ob_inner_table_schema_def.py @@ -10510,6 +10510,7 @@ def_table_schema( ('checkpoint_lsn', 'uint'), ('migrate_status', 'int'), ('rebuild_seq', 'int'), + ('tablet_change_checkpoint_scn_', 'uint'), ], partition_columns = ['svr_ip', 'svr_port'], vtable_route_policy = 'distributed', diff --git a/src/storage/ls/ob_ls.cpp b/src/storage/ls/ob_ls.cpp index 4b1ee639fe..f42cf28935 100644 --- a/src/storage/ls/ob_ls.cpp +++ b/src/storage/ls/ob_ls.cpp @@ -1044,6 +1044,7 @@ int ObLS::get_ls_info(ObLSVTInfo &ls_info) ls_info.checkpoint_scn_ = ls_meta_.get_clog_checkpoint_scn(); ls_info.checkpoint_lsn_ = ls_meta_.get_clog_base_lsn().val_; ls_info.rebuild_seq_ = ls_meta_.get_rebuild_seq(); + ls_info.tablet_change_checkpoint_scn_ = ls_meta_.get_tablet_change_checkpoint_scn(); } return ret; } diff --git a/src/storage/ls/ob_ls.h b/src/storage/ls/ob_ls.h index ac85e073ce..87136e555e 100644 --- a/src/storage/ls/ob_ls.h +++ b/src/storage/ls/ob_ls.h @@ -87,6 +87,7 @@ struct ObLSVTInfo //TODO SCN int64_t checkpoint_lsn_; int64_t rebuild_seq_; + share::SCN tablet_change_checkpoint_scn_; }; // 诊断虚表统计信息