From 29e25788d13e0b843fa9c535745f13b8eed32134 Mon Sep 17 00:00:00 2001 From: bigsheeper Date: Mon, 2 Sep 2024 19:37:07 +0800 Subject: [PATCH] fix Signed-off-by: bigsheeper --- internal/flushcommon/writebuffer/write_buffer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/flushcommon/writebuffer/write_buffer.go b/internal/flushcommon/writebuffer/write_buffer.go index 2609eaf0730aa..e94e6a09edd51 100644 --- a/internal/flushcommon/writebuffer/write_buffer.go +++ b/internal/flushcommon/writebuffer/write_buffer.go @@ -18,6 +18,7 @@ import ( "github.com/milvus-io/milvus/internal/flushcommon/syncmgr" "github.com/milvus-io/milvus/internal/proto/datapb" "github.com/milvus-io/milvus/internal/storage" + "github.com/milvus-io/milvus/internal/util/streamingutil" "github.com/milvus-io/milvus/pkg/log" "github.com/milvus-io/milvus/pkg/metrics" "github.com/milvus-io/milvus/pkg/mq/msgstream" @@ -346,7 +347,7 @@ func (wb *writeBufferBase) syncSegments(ctx context.Context, segmentIDs []int64) wb.syncCheckpoint.Remove(syncTask.SegmentID(), syncTask.StartPosition().GetTimestamp()) } - if syncTask.IsFlush() { + if streamingutil.IsStreamingServiceEnabled() && syncTask.IsFlush() { wb.metaCache.RemoveSegments(metacache.WithSegmentIDs(syncTask.SegmentID())) log.Info("flushed segment removed", zap.Int64("segmentID", syncTask.SegmentID()), zap.String("channel", syncTask.ChannelName())) }