fix: don't use logical resource for metrics of quota center on streaming node (#44613)

issue: #44599

Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
Zhen Ye 2025-09-29 21:34:13 +08:00 committed by GitHub
parent e6640594fd
commit a110d8cc49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -254,21 +254,11 @@ func getSystemInfoMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest,
usedMem := hardware.GetUsedMemoryCount()
totalMem := hardware.GetMemoryCount()
// TieredEvictionEnabled is enabled, use the logical resource memory size
if paramtable.Get().QueryNodeCfg.TieredEvictionEnabled.GetAsBool() {
usedMem = node.manager.Segment.GetLogicalResource().MemorySize
}
usedDiskGB, totalDiskGB, err := hardware.GetDiskUsage(paramtable.Get().LocalStorageCfg.Path.GetValue())
if err != nil {
log.Ctx(ctx).Warn("get disk usage failed", zap.Error(err))
}
// TieredEvictionEnabled is enabled, use the logical resource disk size
if paramtable.Get().QueryNodeCfg.TieredEvictionEnabled.GetAsBool() {
usedDiskGB = float64(node.manager.Segment.GetLogicalResource().DiskSize) / 1e9
}
ioWait, err := hardware.GetIOWait()
if err != nil {
log.Ctx(ctx).Warn("get iowait failed", zap.Error(err))