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