Reduce unnecessary logs of get compaction results (#20642)

Signed-off-by: yangxuan <xuan.yang@zilliz.com>

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
pull/20665/head
XuanYang-cn 2022-11-17 10:09:12 +08:00 committed by GitHub
parent 8da44638ac
commit bd20536c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -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,