From dbcdb30db22966a74ee66b1a5e0c2c8187413381 Mon Sep 17 00:00:00 2001 From: Xianhui Lin <35839735+JsDove@users.noreply.github.com> Date: Fri, 9 May 2025 14:30:55 +0800 Subject: [PATCH] fix: [2.5]set quota center metrics configuration before watch (#41708) fix: [2.5]set quota center metrics configuration before watch pr:https://github.com/milvus-io/milvus/pull/41706 issue:https://github.com/milvus-io/milvus/issues/35177 Signed-off-by: Xianhui.Lin --- internal/rootcoord/quota_center.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/rootcoord/quota_center.go b/internal/rootcoord/quota_center.go index 8aabb63a5b..7dbc880d6f 100644 --- a/internal/rootcoord/quota_center.go +++ b/internal/rootcoord/quota_center.go @@ -295,6 +295,10 @@ func (q *QuotaCenter) Start() { func (q *QuotaCenter) watchQuotaAndLimit() { pt := paramtable.Get() + metrics.QueryNodeMemoryHighWaterLevel.Set(pt.QuotaConfig.QueryNodeMemoryHighWaterLevel.GetAsFloat()) + metrics.DiskQuota.WithLabelValues(paramtable.GetStringNodeID(), "cluster").Set(pt.QuotaConfig.DiskQuota.GetAsFloat()) + metrics.DiskQuota.WithLabelValues(paramtable.GetStringNodeID(), "db").Set(pt.QuotaConfig.DiskQuotaPerDB.GetAsFloat()) + metrics.DiskQuota.WithLabelValues(paramtable.GetStringNodeID(), "collection").Set(pt.QuotaConfig.DiskQuotaPerCollection.GetAsFloat()) pt.Watch(pt.QuotaConfig.QueryNodeMemoryHighWaterLevel.Key, config.NewHandler(pt.QuotaConfig.QueryNodeMemoryHighWaterLevel.Key, func(event *config.Event) { metrics.QueryNodeMemoryHighWaterLevel.Set(pt.QuotaConfig.QueryNodeMemoryHighWaterLevel.GetAsFloat()) }))