add message column to __all_virtual_load_data_stat placeholder
This commit is contained in:
1
deps/oblib/src/lib/ob_define.h
vendored
1
deps/oblib/src/lib/ob_define.h
vendored
@ -88,6 +88,7 @@ const int64_t OB_MAX_ACT_NAME_LENGTH = 32;
|
||||
const int64_t OB_MAX_UUID_LENGTH = 16;
|
||||
const int64_t OB_MAX_UUID_STR_LENGTH = 36;
|
||||
const int64_t OB_MAX_CON_INFO_STR_LENGTH = 512;
|
||||
const int64_t MAX_LOAD_DATA_MESSAGE_LENGTH = 4096;
|
||||
const int64_t MAX_ZONE_LENGTH = 128;
|
||||
const int64_t MAX_REGION_LENGTH = 128;
|
||||
const int64_t MAX_GTS_NAME_LENGTH = 128;
|
||||
|
||||
@ -231,6 +231,11 @@ int ObAllVirtualLoadDataStat::inner_get_next_row(ObNewRow *&row)
|
||||
cells[i].set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
break;
|
||||
}
|
||||
case MESSAGE: {
|
||||
cells[i].set_varchar(job_status->message_);
|
||||
cells[i].set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
SERVER_LOG(WARN, "invalid col_id", K(ret), K(col_id));
|
||||
|
||||
@ -74,7 +74,8 @@ private:
|
||||
STORE_PROCESSED_ROWS,
|
||||
STORE_LAST_COMMIT_SEGMENT_ID,
|
||||
STORE_STATUS,
|
||||
STORE_TRANS_STATUS
|
||||
STORE_TRANS_STATUS,
|
||||
MESSAGE
|
||||
};
|
||||
common::ObAddr addr_;
|
||||
char ip_buf_[common::OB_IP_STR_BUFF];
|
||||
|
||||
@ -10090,6 +10090,21 @@ int ObInnerTableSchema::all_virtual_load_data_stat_schema(ObTableSchema &table_s
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("message", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
MAX_LOAD_DATA_MESSAGE_LENGTH, //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);
|
||||
|
||||
@ -11087,7 +11087,8 @@ def_table_schema(
|
||||
('store_processed_rows', 'int'),
|
||||
('store_last_commit_segment_id', 'int'),
|
||||
('store_status', 'varchar:OB_MAX_PARAMETERS_NAME_LENGTH'),
|
||||
('store_trans_status', 'varchar:OB_MAX_PARAMETERS_NAME_LENGTH')
|
||||
('store_trans_status', 'varchar:OB_MAX_PARAMETERS_NAME_LENGTH'),
|
||||
('message', 'varchar:MAX_LOAD_DATA_MESSAGE_LENGTH')
|
||||
],
|
||||
partition_columns = ['svr_ip', 'svr_port'],
|
||||
vtable_route_policy = 'distributed',
|
||||
|
||||
@ -330,7 +330,8 @@ struct ObLoadDataStat
|
||||
insert_rt_sum_(0),
|
||||
total_wait_secs_(0),
|
||||
max_allowed_error_rows_(0),
|
||||
detected_error_rows_(0) {}
|
||||
detected_error_rows_(0),
|
||||
message_() {}
|
||||
int64_t aquire() {
|
||||
return ATOMIC_AAF(&ref_cnt_, 1);
|
||||
}
|
||||
@ -377,6 +378,7 @@ struct ObLoadDataStat
|
||||
common::ObString status_ = "none";
|
||||
common::ObString trans_status_ = "none";
|
||||
} store;
|
||||
char message_[common::MAX_LOAD_DATA_MESSAGE_LENGTH];
|
||||
|
||||
TO_STRING_KV(K(tenant_id_), K(job_id_), K(job_type_),
|
||||
K(table_name_), K(file_path_), K(table_column_), K(file_column_),
|
||||
@ -389,7 +391,7 @@ struct ObLoadDataStat
|
||||
K(coordinator.received_rows_), K(coordinator.last_commit_segment_id_),
|
||||
K(coordinator.status_), K(coordinator.trans_status_),
|
||||
K(store.processed_rows_), K(store.last_commit_segment_id_),
|
||||
K(store.status_), K(store.trans_status_));
|
||||
K(store.status_), K(store.trans_status_), K(message_));
|
||||
};
|
||||
|
||||
class ObGetAllJobStatusOp
|
||||
|
||||
@ -5487,6 +5487,7 @@ store_processed_rows bigint(20) NO NULL
|
||||
store_last_commit_segment_id bigint(20) NO NULL
|
||||
store_status varchar(128) NO NULL
|
||||
store_trans_status varchar(128) NO NULL
|
||||
message varchar(4096) NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_load_data_stat;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
|
||||
Reference in New Issue
Block a user