Add placeholder for new column 'data_version' in __all_transfer_task

This commit is contained in:
ZhenNan0
2024-02-19 07:10:38 +00:00
committed by ob-robot
parent 2d906552e2
commit 18c5bdb8f2
6 changed files with 133 additions and 8 deletions

View File

@ -10207,6 +10207,21 @@ int ObInnerTableSchema::all_virtual_transfer_task_schema(ObTableSchema &table_sc
true, //is_nullable
false); //is_autoincrement
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_version", //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
true, //is_nullable
false); //is_autoincrement
}
table_schema.set_index_using_type(USING_BTREE);
table_schema.set_row_store_type(ENCODING_ROW_STORE);
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
@ -10600,6 +10615,21 @@ int ObInnerTableSchema::all_virtual_transfer_task_history_schema(ObTableSchema &
false, //is_autoincrement
false); //is_on_update_for_timestamp
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_version", //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
true, //is_nullable
false); //is_autoincrement
}
table_schema.set_index_using_type(USING_BTREE);
table_schema.set_row_store_type(ENCODING_ROW_STORE);
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);

View File

@ -1494,6 +1494,21 @@ int ObInnerTableSchema::all_virtual_transfer_task_real_agent_ora_schema(ObTableS
false); //is_autoincrement
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("DATA_VERSION", //column_name
++column_id, //column_id
0, //rowkey_id
0, //index_id
0, //part_key_pos
ObNumberType, //column_type
CS_TYPE_INVALID, //column_collation_type
38, //column_length
38, //column_precision
0, //column_scale
true, //is_nullable
false); //is_autoincrement
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("GMT_CREATE", //column_name
++column_id, //column_id
@ -1868,6 +1883,21 @@ int ObInnerTableSchema::all_virtual_transfer_task_history_real_agent_ora_schema(
false); //is_autoincrement
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("DATA_VERSION", //column_name
++column_id, //column_id
0, //rowkey_id
0, //index_id
0, //part_key_pos
ObNumberType, //column_type
CS_TYPE_INVALID, //column_collation_type
38, //column_length
38, //column_precision
0, //column_scale
true, //is_nullable
false); //is_autoincrement
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("GMT_CREATE", //column_name
++column_id, //column_id

View File

@ -4576,6 +4576,21 @@ int ObInnerTableSchema::all_transfer_task_schema(ObTableSchema &table_schema)
true, //is_nullable
false); //is_autoincrement
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_version", //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
true, //is_nullable
false); //is_autoincrement
}
table_schema.set_index_using_type(USING_BTREE);
table_schema.set_row_store_type(ENCODING_ROW_STORE);
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
@ -4970,6 +4985,21 @@ int ObInnerTableSchema::all_transfer_task_history_schema(ObTableSchema &table_sc
false, //is_autoincrement
false); //is_on_update_for_timestamp
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_version", //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
true, //is_nullable
false); //is_autoincrement
}
table_schema.set_index_using_type(USING_BTREE);
table_schema.set_row_store_type(ENCODING_ROW_STORE);
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);

View File

@ -5337,7 +5337,7 @@ def_table_schema(**all_column_group_mapping)
def_table_schema(**gen_history_table_def(422, all_column_group_mapping))
all_transfer_task_def = dict(
def_table_schema(
owner = 'wangzhennan.wzn',
table_name = '__all_transfer_task',
table_id = '423',
@ -5369,11 +5369,47 @@ all_transfer_task_def = dict(
('comment', 'longtext', 'true'),
('balance_task_id', 'int', 'false'),
('table_lock_owner_id', 'int', 'true'),
('data_version', 'uint', 'true'),
],
)
def_table_schema(**all_transfer_task_def)
def_table_schema(**gen_history_table_def_of_task(424, all_transfer_task_def))
def_table_schema(
owner = 'wangzhennan.wzn',
table_name = '__all_transfer_task_history',
table_id = '424',
table_type = 'SYSTEM_TABLE',
gm_columns = ['gmt_create', 'gmt_modified'],
rowkey_columns = [
('task_id', 'int'),
],
in_tenant_space = True,
is_cluster_private = False,
meta_record_in_sys = False,
normal_columns = [
('src_ls', 'int', 'false'),
('dest_ls', 'int', 'false'),
('part_list', 'longtext', 'true'),
('part_count', 'int', 'true'),
('not_exist_part_list', 'longtext', 'true'),
('lock_conflict_part_list', 'longtext', 'true'),
('table_lock_tablet_list', 'longtext', 'true'),
('tablet_list', 'longtext', 'true'),
('tablet_count', 'int', 'true'),
('start_scn', 'uint', 'true'),
('finish_scn', 'uint', 'true'),
('status', 'varchar:OB_DEFAULT_STATUS_LENTH', 'false'),
('trace_id', 'varchar:OB_MAX_TRACE_ID_BUFFER_SIZE', 'false'),
('result', 'int', 'true'),
('comment', 'longtext', 'true'),
('balance_task_id', 'int', 'false'),
('table_lock_owner_id', 'int', 'true'),
('create_time', 'timestamp', 'false'),
('finish_time', 'timestamp', 'false'),
('data_version', 'uint', 'true'),
],
)
all_balance_job_def= dict(
owner = 'msy164651',

View File

@ -271,7 +271,6 @@
# 422: __all_column_group_mapping # BASE_TABLE_NAME
# 423: __all_transfer_task
# 424: __all_transfer_task_history
# 424: __all_transfer_task # BASE_TABLE_NAME
# 425: __all_balance_job
# 426: __all_balance_job_history
# 426: __all_balance_job # BASE_TABLE_NAME
@ -903,8 +902,7 @@
# 12342: __all_virtual_transfer_task
# 12342: __all_transfer_task # BASE_TABLE_NAME
# 12343: __all_virtual_transfer_task_history
# 12343: __all_transfer_task # BASE_TABLE_NAME
# 12343: __all_transfer_task_history # BASE_TABLE_NAME1
# 12343: __all_transfer_task_history # BASE_TABLE_NAME
# 12344: __all_virtual_balance_job
# 12344: __all_balance_job # BASE_TABLE_NAME
# 12345: __all_virtual_balance_job_history
@ -1565,8 +1563,7 @@
# 15381: ALL_VIRTUAL_TRANSFER_TASK_REAL_AGENT
# 15381: __all_transfer_task # BASE_TABLE_NAME
# 15382: ALL_VIRTUAL_TRANSFER_TASK_HISTORY_REAL_AGENT
# 15382: __all_transfer_task # BASE_TABLE_NAME
# 15382: __all_transfer_task_history # BASE_TABLE_NAME1
# 15382: __all_transfer_task_history # BASE_TABLE_NAME
# 15383: ALL_VIRTUAL_RESOURCE_POOL_SYS_AGENT
# 15383: __all_resource_pool # BASE_TABLE_NAME
# 15384: ALL_VIRTUAL_PX_P2P_DATAHUB

View File

@ -7392,6 +7392,7 @@ result bigint(20) YES NULL
comment longtext YES NULL
balance_task_id bigint(20) NO NULL
table_lock_owner_id bigint(20) YES NULL
data_version bigint(20) unsigned YES NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_transfer_task;
IF(count(*) >= 0, 1, 0)
1
@ -7420,6 +7421,7 @@ balance_task_id bigint(20) NO NULL
table_lock_owner_id bigint(20) YES NULL
create_time timestamp(6) NO NULL
finish_time timestamp(6) NO NULL
data_version bigint(20) unsigned YES NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_transfer_task_history;
IF(count(*) >= 0, 1, 0)
1