未验证 提交 d4a1e94f 编写于 作者: T Ten Thousand Leaves 提交者: GitHub

Fix flush failure caused by empty stale segments (#18097)

/bug

issue: #18096
Signed-off-by: NYuchen Gao <yuchen.gao@zilliz.com>
上级 79523ff8
...@@ -641,7 +641,8 @@ func (s *Server) getStaleSegmentsInfo(ch string) []*SegmentInfo { ...@@ -641,7 +641,8 @@ func (s *Server) getStaleSegmentsInfo(ch string) []*SegmentInfo {
return isSegmentHealthy(info) && return isSegmentHealthy(info) &&
info.GetInsertChannel() == ch && info.GetInsertChannel() == ch &&
!info.lastFlushTime.IsZero() && !info.lastFlushTime.IsZero() &&
time.Since(info.lastFlushTime).Minutes() >= segmentTimedFlushDuration time.Since(info.lastFlushTime).Minutes() >= segmentTimedFlushDuration &&
info.GetNumOfRows() != 0
}) })
} }
......
...@@ -621,8 +621,7 @@ func (node *DataNode) FlushSegments(ctx context.Context, req *datapb.FlushSegmen ...@@ -621,8 +621,7 @@ func (node *DataNode) FlushSegments(ctx context.Context, req *datapb.FlushSegmen
log.Info("flow graph flushSegment tasks triggered", log.Info("flow graph flushSegment tasks triggered",
zap.Bool("flushed", flushed), zap.Bool("flushed", flushed),
zap.Int64("collection ID", req.GetCollectionID()), zap.Int64("collection ID", req.GetCollectionID()),
zap.Int64s("segments", segmentIDs), zap.Int64s("segments", segmentIDs))
zap.Int64s("mark segments", req.GetMarkSegmentIDs()))
return flushedSeg, noErr return flushedSeg, noErr
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册