From 290ceb4e848efb70bdc83f7fbdfe47992ae42369 Mon Sep 17 00:00:00 2001 From: XuanYang-cn Date: Thu, 10 Oct 2024 17:51:25 +0800 Subject: [PATCH] enhance: Add more info in logs (#36731) Signed-off-by: yangxuan --- internal/datanode/channel/channel_manager.go | 4 ++-- internal/datanode/compaction/mix_compactor.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/datanode/channel/channel_manager.go b/internal/datanode/channel/channel_manager.go index fec7d67d55..83343cf579 100644 --- a/internal/datanode/channel/channel_manager.go +++ b/internal/datanode/channel/channel_manager.go @@ -90,7 +90,7 @@ func NewChannelManager(pipelineParams *util.PipelineParams, fgManager pipeline.F func (m *ChannelManagerImpl) Submit(info *datapb.ChannelWatchInfo) error { channel := info.GetVchan().GetChannelName() - // skip enqueue datacoord re-submit the same operations + // skip enqueue the same operation resubmmited by datacoord if runner, ok := m.opRunners.Get(channel); ok { if _, exists := runner.Exist(info.GetOpID()); exists { log.Warn("op already exist, skip", zap.Int64("opID", info.GetOpID()), zap.String("channel", channel)) @@ -400,7 +400,7 @@ func (r *opRunner) watchWithTimer(info *datapb.ChannelWatchInfo) *opState { return case <-tickler.GetProgressSig(): - log.Info("Reset timer for tickler updated") + log.Info("Reset timer for tickler updated", zap.Int32("current progress", tickler.Progress())) timer.Reset(watchTimeout) case <-successSig: diff --git a/internal/datanode/compaction/mix_compactor.go b/internal/datanode/compaction/mix_compactor.go index cbb06ae219..252d220ba9 100644 --- a/internal/datanode/compaction/mix_compactor.go +++ b/internal/datanode/compaction/mix_compactor.go @@ -115,9 +115,10 @@ func (t *mixCompactionTask) preCompact() error { outputSegmentCount := int64(math.Ceil(float64(currSize) / float64(t.targetSize))) log.Info("preCompaction analyze", zap.Int64("planID", t.GetPlanID()), - zap.Int64("currSize", currSize), + zap.Int64("inputSize", currSize), zap.Int64("targetSize", t.targetSize), - zap.Int64("estimatedSegmentCount", outputSegmentCount), + zap.Int("inputSegmentCount", len(t.plan.GetSegmentBinlogs())), + zap.Int64("estimatedOutputSegmentCount", outputSegmentCount), ) return nil