add tenant_id to __all_balance_task_helper

This commit is contained in:
maosy
2023-07-10 12:17:27 +00:00
committed by ob-robot
parent 335db9ca4d
commit 803cbbd1f9
3 changed files with 19 additions and 2 deletions

View File

@ -252,6 +252,7 @@ int ObBalanceTaskHelperTableOperator::fill_dml_spliter(share::ObDMLSqlSplicer &d
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
if (OB_FAIL(dml.add_column("operation_type", ls_balance_task.get_task_op().to_str())) if (OB_FAIL(dml.add_column("operation_type", ls_balance_task.get_task_op().to_str()))
|| OB_FAIL(dml.add_column("tenant_id", ls_balance_task.get_tenant_id()))
|| OB_FAIL(dml.add_column("operation_scn", ls_balance_task.get_operation_scn().get_val_for_inner_table_field())) || OB_FAIL(dml.add_column("operation_scn", ls_balance_task.get_operation_scn().get_val_for_inner_table_field()))
|| OB_FAIL(dml.add_column("src_ls", ls_balance_task.get_src_ls().id())) || OB_FAIL(dml.add_column("src_ls", ls_balance_task.get_src_ls().id()))
|| OB_FAIL(dml.add_column("dest_ls", ls_balance_task.get_dest_ls().id())) || OB_FAIL(dml.add_column("dest_ls", ls_balance_task.get_dest_ls().id()))

View File

@ -752,7 +752,7 @@ int ObInnerTableSchema::all_balance_task_helper_schema(ObTableSchema &table_sche
table_schema.set_rowkey_split_pos(0); table_schema.set_rowkey_split_pos(0);
table_schema.set_is_use_bloomfilter(false); table_schema.set_is_use_bloomfilter(false);
table_schema.set_progressive_merge_num(0); table_schema.set_progressive_merge_num(0);
table_schema.set_rowkey_column_num(1); table_schema.set_rowkey_column_num(2);
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK); table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
table_schema.set_table_type(SYSTEM_TABLE); table_schema.set_table_type(SYSTEM_TABLE);
table_schema.set_index_type(INDEX_TYPE_IS_NOT); table_schema.set_index_type(INDEX_TYPE_IS_NOT);
@ -820,11 +820,26 @@ int ObInnerTableSchema::all_balance_task_helper_schema(ObTableSchema &table_sche
} }
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("operation_scn", //column_name ADD_COLUMN_SCHEMA("tenant_id", //column_name
++column_id, //column_id ++column_id, //column_id
1, //rowkey_id 1, //rowkey_id
0, //index_id 0, //index_id
0, //part_key_pos 0, //part_key_pos
ObIntType, //column_type
CS_TYPE_INVALID, //column_collation_type
sizeof(int64_t), //column_length
-1, //column_precision
-1, //column_scale
false, //is_nullable
false); //is_autoincrement
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("operation_scn", //column_name
++column_id, //column_id
2, //rowkey_id
0, //index_id
0, //part_key_pos
ObUInt64Type, //column_type ObUInt64Type, //column_type
CS_TYPE_INVALID, //column_collation_type CS_TYPE_INVALID, //column_collation_type
sizeof(uint64_t), //column_length sizeof(uint64_t), //column_length

View File

@ -5679,6 +5679,7 @@ def_table_schema(
table_type = 'SYSTEM_TABLE', table_type = 'SYSTEM_TABLE',
gm_columns = ['gmt_create', 'gmt_modified'], gm_columns = ['gmt_create', 'gmt_modified'],
rowkey_columns = [ rowkey_columns = [
('tenant_id', 'int', 'false'),
('operation_scn', 'uint', 'false'), ('operation_scn', 'uint', 'false'),
], ],
in_tenant_space = True, in_tenant_space = True,