[4.1] add tablet_change_scn to __all_virtual_ls_info
This commit is contained in:
@ -185,6 +185,10 @@ int ObAllVirtualLSInfo::process_curr_tenant(ObNewRow *&row)
|
|||||||
// rebuild_seq
|
// rebuild_seq
|
||||||
cur_row_.cells_[i].set_int(ls_info.rebuild_seq_);
|
cur_row_.cells_[i].set_int(ls_info.rebuild_seq_);
|
||||||
break;
|
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:
|
default:
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
SERVER_LOG(WARN, "invalid col_id", K(ret), K(col_id));
|
SERVER_LOG(WARN, "invalid col_id", K(ret), K(col_id));
|
||||||
|
|||||||
@ -9372,6 +9372,21 @@ int ObInnerTableSchema::all_virtual_ls_info_schema(ObTableSchema &table_schema)
|
|||||||
false, //is_nullable
|
false, //is_nullable
|
||||||
false); //is_autoincrement
|
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)) {
|
if (OB_SUCC(ret)) {
|
||||||
table_schema.get_part_option().set_part_num(1);
|
table_schema.get_part_option().set_part_num(1);
|
||||||
table_schema.set_part_level(PARTITION_LEVEL_ONE);
|
table_schema.set_part_level(PARTITION_LEVEL_ONE);
|
||||||
|
|||||||
@ -10510,6 +10510,7 @@ def_table_schema(
|
|||||||
('checkpoint_lsn', 'uint'),
|
('checkpoint_lsn', 'uint'),
|
||||||
('migrate_status', 'int'),
|
('migrate_status', 'int'),
|
||||||
('rebuild_seq', 'int'),
|
('rebuild_seq', 'int'),
|
||||||
|
('tablet_change_checkpoint_scn_', 'uint'),
|
||||||
],
|
],
|
||||||
partition_columns = ['svr_ip', 'svr_port'],
|
partition_columns = ['svr_ip', 'svr_port'],
|
||||||
vtable_route_policy = 'distributed',
|
vtable_route_policy = 'distributed',
|
||||||
|
|||||||
@ -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_scn_ = ls_meta_.get_clog_checkpoint_scn();
|
||||||
ls_info.checkpoint_lsn_ = ls_meta_.get_clog_base_lsn().val_;
|
ls_info.checkpoint_lsn_ = ls_meta_.get_clog_base_lsn().val_;
|
||||||
ls_info.rebuild_seq_ = ls_meta_.get_rebuild_seq();
|
ls_info.rebuild_seq_ = ls_meta_.get_rebuild_seq();
|
||||||
|
ls_info.tablet_change_checkpoint_scn_ = ls_meta_.get_tablet_change_checkpoint_scn();
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,6 +87,7 @@ struct ObLSVTInfo
|
|||||||
//TODO SCN
|
//TODO SCN
|
||||||
int64_t checkpoint_lsn_;
|
int64_t checkpoint_lsn_;
|
||||||
int64_t rebuild_seq_;
|
int64_t rebuild_seq_;
|
||||||
|
share::SCN tablet_change_checkpoint_scn_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 诊断虚表统计信息
|
// 诊断虚表统计信息
|
||||||
|
|||||||
Reference in New Issue
Block a user