From bd20536c6a027a186557ff0d7ed5c78ddbbb4a55 Mon Sep 17 00:00:00 2001 From: XuanYang-cn Date: Thu, 17 Nov 2022 10:09:12 +0800 Subject: [PATCH] Reduce unnecessary logs of get compaction results (#20642) Signed-off-by: yangxuan Signed-off-by: yangxuan --- internal/datanode/data_node.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/datanode/data_node.go b/internal/datanode/data_node.go index d67ee8e60d..d0dd722e64 100644 --- a/internal/datanode/data_node.go +++ b/internal/datanode/data_node.go @@ -857,7 +857,6 @@ func (node *DataNode) Compaction(ctx context.Context, req *datapb.CompactionPlan // GetCompactionState called by DataCoord // return status of all compaction plans func (node *DataNode) GetCompactionState(ctx context.Context, req *datapb.CompactionStateRequest) (*datapb.CompactionStateResponse, error) { - log.Info("DataNode.GetCompactionState") if !node.isHealthy() { return &datapb.CompactionStateResponse{ Status: &commonpb.Status{ @@ -883,7 +882,10 @@ func (node *DataNode) GetCompactionState(ctx context.Context, req *datapb.Compac node.compactionExecutor.completed.Delete(k) return true }) - log.Info("Compaction results", zap.Any("results", results)) + + if len(results) > 0 { + log.Info("Compaction results", zap.Any("results", results)) + } return &datapb.CompactionStateResponse{ Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, Results: results,