placeholder
This commit is contained in:
parent
fc0ab3066b
commit
f65f425354
@ -302,6 +302,11 @@ int ObAllVirtualSessionInfo::FillScanner::operator()(
|
||||
cur_row_->cells_[cell_idx].set_int(sess_info->get_client_addr_port());
|
||||
break;
|
||||
}
|
||||
case TOTAL_CPU_TIME: {
|
||||
cur_row_->cells_[cell_idx].set_double(0);
|
||||
cur_row_->cells_[cell_idx].set_scale(6);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
SERVER_LOG(WARN, "invalid column id", K(ret), K(cell_idx),
|
||||
|
@ -62,7 +62,8 @@ private:
|
||||
REF_COUNT,
|
||||
BACKTRACE,
|
||||
TRANS_STATE,
|
||||
USER_CLIENT_PORT
|
||||
USER_CLIENT_PORT,
|
||||
TOTAL_CPU_TIME
|
||||
};
|
||||
class FillScanner
|
||||
{
|
||||
|
@ -456,6 +456,11 @@ bool ObShowProcesslist::FillScanner::operator()(sql::ObSQLSessionMgr::Key key, O
|
||||
cur_row_->cells_[cell_idx].set_null();
|
||||
break;
|
||||
}
|
||||
case TOTAL_CPU_TIME: {
|
||||
cur_row_->cells_[cell_idx].set_double(0);
|
||||
cur_row_->cells_[cell_idx].set_scale(6);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
SERVER_LOG(WARN, "invalid column id", K(ret), K(cell_idx),
|
||||
|
@ -81,6 +81,7 @@ private:
|
||||
USER_CLIENT_PORT,
|
||||
PROXY_USER_NAME,
|
||||
SERVICE_NAME,
|
||||
TOTAL_CPU_TIME,
|
||||
};
|
||||
class FillScanner
|
||||
{
|
||||
|
@ -2071,6 +2071,21 @@ int ObInnerTableSchema::all_virtual_processlist_schema(ObTableSchema &table_sche
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("total_cpu_time", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObDoubleType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(double), //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);
|
||||
|
@ -2230,6 +2230,21 @@ int ObInnerTableSchema::all_virtual_session_info_schema(ObTableSchema &table_sch
|
||||
user_client_port_default,
|
||||
user_client_port_default); //default_value
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("total_cpu_time", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObDoubleType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(double), //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);
|
||||
|
@ -9078,6 +9078,21 @@ int ObInnerTableSchema::all_virtual_processlist_ora_schema(ObTableSchema &table_
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("TOTAL_CPU_TIME", //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
|
||||
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);
|
||||
|
@ -7179,6 +7179,7 @@ def_table_schema(
|
||||
('user_client_port', 'int', 'false', '0'),
|
||||
('proxy_user', 'varchar:OB_MAX_USER_NAME_LENGTH_STORE', 'true'),
|
||||
('service_name', 'varchar:64', 'true'),
|
||||
('total_cpu_time', 'double', 'false'),
|
||||
],
|
||||
partition_columns = ['svr_ip', 'svr_port'],
|
||||
vtable_route_policy = 'distributed',
|
||||
@ -9438,7 +9439,8 @@ def_table_schema(
|
||||
('ref_count', 'int'),
|
||||
('backtrace', 'varchar:16384', 'true', ''),
|
||||
('trans_state', 'varchar:OB_MAX_TRANS_STATE_LENGTH', 'true'),
|
||||
('user_client_port', 'int', 'false', '0')
|
||||
('user_client_port', 'int', 'false', '0'),
|
||||
('total_cpu_time', 'double', 'false'),
|
||||
],
|
||||
partition_columns = ['svr_ip', 'svr_port'],
|
||||
vtable_route_policy = 'distributed',
|
||||
@ -31168,8 +31170,8 @@ def_table_schema(
|
||||
WHERE a.tenant_id = b.tenant_id
|
||||
""".replace("\n", " ")
|
||||
)
|
||||
# 21459:GV$OB_SESSION
|
||||
# 21460:V$OB_SESSION
|
||||
# 21459:GV$OB_SESSION
|
||||
# 21460:V$OB_SESSION
|
||||
# 21461: GV$OB_PL_CACHE_OBJECT
|
||||
# 21462: V$OB_PL_CACHE_OBJECT
|
||||
|
||||
|
@ -129,6 +129,7 @@ out_bytes bigint(20) NO NULL
|
||||
user_client_port bigint(20) NO 0
|
||||
proxy_user varchar(128) YES NULL
|
||||
service_name varchar(64) YES NULL
|
||||
total_cpu_time double NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_processlist;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
|
@ -130,6 +130,7 @@ out_bytes bigint(20) NO NULL
|
||||
user_client_port bigint(20) NO 0
|
||||
proxy_user varchar(128) YES NULL
|
||||
service_name varchar(64) YES NULL
|
||||
total_cpu_time double NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_processlist;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
@ -1815,6 +1816,7 @@ ref_count bigint(20) NO NULL
|
||||
backtrace varchar(16384) YES
|
||||
trans_state varchar(32) YES NULL
|
||||
user_client_port bigint(20) NO 0
|
||||
total_cpu_time double NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_session_info;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
|
Loading…
x
Reference in New Issue
Block a user