From 01ce32caa185cbdd4772da55193a91a7582f6d59 Mon Sep 17 00:00:00 2001 From: "yihao.dai" Date: Wed, 5 Jun 2024 16:51:56 +0800 Subject: [PATCH] enhance: Print more disk quota info (#33596) /kind enhancement Signed-off-by: bigsheeper --- internal/datacoord/import_util.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/internal/datacoord/import_util.go b/internal/datacoord/import_util.go index 3469a8f98f..65a44424b6 100644 --- a/internal/datacoord/import_util.go +++ b/internal/datacoord/import_util.go @@ -276,11 +276,23 @@ func CheckDiskQuota(job ImportJob, meta *meta, imeta ImportMeta) (int64, error) totalDiskQuota := Params.QuotaConfig.DiskQuota.GetAsFloat() if float64(totalUsage+requestedTotal+requestSize) > totalDiskQuota { + log.Warn("global disk quota exceeded", zap.Int64("jobID", job.GetJobID()), + zap.Bool("enabled", Params.QuotaConfig.DiskProtectionEnabled.GetAsBool()), + zap.Int64("totalUsage", totalUsage), + zap.Int64("requestedTotal", requestedTotal), + zap.Int64("requestSize", requestSize), + zap.Float64("totalDiskQuota", totalDiskQuota)) return 0, err } collectionDiskQuota := Params.QuotaConfig.DiskQuotaPerCollection.GetAsFloat() colID := job.GetCollectionID() if float64(collectionsUsage[colID]+requestedCollections[colID]+requestSize) > collectionDiskQuota { + log.Warn("collection disk quota exceeded", zap.Int64("jobID", job.GetJobID()), + zap.Bool("enabled", Params.QuotaConfig.DiskProtectionEnabled.GetAsBool()), + zap.Int64("collectionsUsage", collectionsUsage[colID]), + zap.Int64("requestedCollection", requestedCollections[colID]), + zap.Int64("requestSize", requestSize), + zap.Float64("collectionDiskQuota", collectionDiskQuota)) return 0, err } return requestSize, nil