modify __all_virtual_server column name

This commit is contained in:
Revendell
2025-03-18 08:50:06 +00:00
committed by ob-robot
parent a442181884
commit b2c83e1a23
8 changed files with 23 additions and 10 deletions

View File

@ -869,6 +869,7 @@ STAT_EVENT_SET_DEF(HIDDEN_SYS_MEMORY, "effective hidden sys memory", ObStatClass
STAT_EVENT_SET_DEF(MAX_SESSION_NUM, "max session num", ObStatClassIds::RESOURCE, 140017, false, true, true)
STAT_EVENT_SET_DEF(KV_CACHE_HOLD, "kvcache hold", ObStatClassIds::RESOURCE, 140018, false, true, true)
STAT_EVENT_SET_DEF(UNMANAGED_MEMORY_SIZE, "unmanaged memory size", ObStatClassIds::RESOURCE, 140019, false, true, true) // FARM COMPAT WHITELIST
STAT_EVENT_SET_DEF(HIDDEN_SYS_DATA_DISK_SIZE, "hidden sys data disk size", ObStatClassIds::RESOURCE, 140020, false, true, true)
//CLOG

View File

@ -205,6 +205,12 @@ int ObAllVirtualResMgrSysStat::update_all_stats_(const int64_t tenant_id, ObStat
(OB_SYS_TENANT_ID == tenant_id) ? GMEMCONF.get_reserved_server_memory() : 0;
stat_events.get(ObStatEventIds::HIDDEN_SYS_MEMORY - ObStatEventIds::STAT_EVENT_ADD_END -1)->stat_value_ =
(OB_SYS_TENANT_ID == tenant_id) ? GMEMCONF.get_hidden_sys_memory() : 0;
#ifdef OB_BUILD_SHARED_STORAGE
if (GCTX.is_shared_storage_mode()) {
stat_events.get(ObStatEventIds::HIDDEN_SYS_DATA_DISK_SIZE - ObStatEventIds::STAT_EVENT_ADD_END -1)->stat_value_ =
(OB_SYS_TENANT_ID == tenant_id) ? OB_SERVER_DISK_SPACE_MGR.get_hidden_sys_data_disk_config_size() : 0;
}
#endif
int ret_bk = ret;
if (NULL != GCTX.omt_) {

View File

@ -155,14 +155,14 @@ int ObAllVirtualServer::inner_get_next_row(ObNewRow *&row)
case MEMORY_LIMIT:
cur_row_.cells_[i].set_int(GMEMCONF.get_server_memory_limit());
break;
case DATA_DISK_SUGGESTED_OPERATION:
case SS_DATA_DISK_OPERATION_SUGGESTED:
if (GCTX.is_shared_storage_mode()) {
cur_row_.cells_[i].set_varchar(share::DataDiskSuggestedOperationType::get_str(resource_info.report_data_disk_suggested_operation_));
} else {
cur_row_.cells_[i].set_null();
}
break;
case DATA_DISK_SUGGESTED_SIZE:
case SS_DATA_DISK_SIZE_SUGGESTED:
if (GCTX.is_shared_storage_mode()) {
cur_row_.cells_[i].set_int(resource_info.report_data_disk_suggested_size_);
} else {

View File

@ -44,8 +44,8 @@ class ObAllVirtualServer : public common::ObVirtualTableScannerIterator
MEMORY_LIMIT,
DATA_DISK_ALLOCATED,
DATA_DISK_ASSIGNED,
DATA_DISK_SUGGESTED_OPERATION,
DATA_DISK_SUGGESTED_SIZE
SS_DATA_DISK_OPERATION_SUGGESTED, // FARM COMPAT WHITELIST
SS_DATA_DISK_SIZE_SUGGESTED // FARM COMPAT WHITELIST
};
public:

View File

@ -197,6 +197,12 @@ int ObAllVirtualSysStat::update_all_stats_(const int64_t tenant_id, common::ObDi
(OB_SYS_TENANT_ID == tenant_id) ? GMEMCONF.get_reserved_server_memory() : 0;
stat_events.get(ObStatEventIds::HIDDEN_SYS_MEMORY - ObStatEventIds::STAT_EVENT_ADD_END -1)->stat_value_ =
(OB_SYS_TENANT_ID == tenant_id) ? GMEMCONF.get_hidden_sys_memory() : 0;
#ifdef OB_BUILD_SHARED_STORAGE
if (GCTX.is_shared_storage_mode()) {
stat_events.get(ObStatEventIds::HIDDEN_SYS_DATA_DISK_SIZE - ObStatEventIds::STAT_EVENT_ADD_END -1)->stat_value_ =
(OB_SYS_TENANT_ID == tenant_id) ? OB_SERVER_DISK_SPACE_MGR.get_hidden_sys_data_disk_config_size() : 0;
}
#endif
stat_events.get(ObStatEventIds::UNMANAGED_MEMORY_SIZE - ObStatEventIds::STAT_EVENT_ADD_END -1)->stat_value_ =
(OB_SYS_TENANT_ID == tenant_id) ? get_unmanaged_memory_size() : 0;

View File

@ -6456,7 +6456,7 @@ int ObInnerTableSchema::all_virtual_server_schema(ObTableSchema &table_schema)
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_disk_suggested_operation", //column_name
ADD_COLUMN_SCHEMA("ss_data_disk_operation_suggested", //column_name
++column_id, //column_id
0, //rowkey_id
0, //index_id
@ -6471,7 +6471,7 @@ int ObInnerTableSchema::all_virtual_server_schema(ObTableSchema &table_schema)
}
if (OB_SUCC(ret)) {
ADD_COLUMN_SCHEMA("data_disk_suggested_size", //column_name
ADD_COLUMN_SCHEMA("ss_data_disk_size_suggested", //column_name
++column_id, //column_id
0, //rowkey_id
0, //index_id

View File

@ -12821,8 +12821,8 @@ def_table_schema(
('memory_limit', 'int'),
('data_disk_allocated', 'int'),
('data_disk_assigned', 'int', 'true'),
('data_disk_suggested_operation', 'varchar:MAX_OPERATOR_NAME_LENGTH', 'true'),
('data_disk_suggested_size', 'int', 'true'),
('ss_data_disk_operation_suggested', 'varchar:MAX_OPERATOR_NAME_LENGTH', 'true'),
('ss_data_disk_size_suggested', 'int', 'true'),
],
partition_columns = ['svr_ip', 'svr_port'],
vtable_route_policy = 'distributed',

View File

@ -6541,8 +6541,8 @@ ssl_cert_expired_time bigint(20) NO NULL
memory_limit bigint(20) NO NULL
data_disk_allocated bigint(20) NO NULL
data_disk_assigned bigint(20) YES NULL
data_disk_suggested_operation varchar(32) YES NULL
data_disk_suggested_size bigint(20) YES NULL
ss_data_disk_operation_suggested varchar(32) YES NULL
ss_data_disk_size_suggested bigint(20) YES NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_server;
IF(count(*) >= 0, 1, 0)
1