fix: bulkimport binlogs skip diskquota check (#39315)

bulkimport binlogs skip diskquota check
issue:https://github.com/milvus-io/milvus/issues/38845

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
pull/39344/head^2
Xianhui Lin 2025-01-17 10:03:03 +08:00 committed by GitHub
parent 0461ddf776
commit 4c76f0403f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -25,8 +25,10 @@ import (
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus/internal/types"
"github.com/milvus-io/milvus/internal/util/importutilv2"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/pkg/metrics"
"github.com/milvus-io/milvus/pkg/proto/internalpb"
"github.com/milvus-io/milvus/pkg/util"
"github.com/milvus-io/milvus/pkg/util/merr"
"github.com/milvus-io/milvus/pkg/util/paramtable"
@ -41,7 +43,13 @@ func RateLimitInterceptor(limiter types.Limiter) grpc.UnaryServerInterceptor {
log.Warn("failed to get request info", zap.Error(err))
return handler(ctx, req)
}
if rt == internalpb.RateType_DMLBulkLoad {
if importReq, ok := req.(*milvuspb.ImportRequest); ok {
if importutilv2.SkipDiskQuotaCheck(importReq.GetOptions()) {
return handler(ctx, req)
}
}
}
err = limiter.Check(dbID, collectionIDToPartIDs, rt, n)
nodeID := strconv.FormatInt(paramtable.GetNodeID(), 10)
metrics.ProxyRateLimitReqCount.WithLabelValues(nodeID, rt.String(), metrics.TotalLabel).Inc()