Fix stale segments selector (#11051)

Signed-off-by: sunby <bingyi.sun@zilliz.com>
pull/11054/head
sunby 2021-11-01 22:30:04 +08:00 committed by GitHub
parent fdac1b4e4a
commit a55019825b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -426,7 +426,9 @@ func (s *Server) startDataNodeTtLoop(ctx context.Context) {
}
staleSegments := s.meta.SelectSegments(func(info *SegmentInfo) bool {
return !info.lastFlushTime.IsZero() && time.Since(info.lastFlushTime).Minutes() >= segmentTimedFlushDuration
return info.GetInsertChannel() == ch &&
!info.lastFlushTime.IsZero() &&
time.Since(info.lastFlushTime).Minutes() >= segmentTimedFlushDuration
})
if len(segments)+len(staleSegments) == 0 {