diff --git a/internal/datanode/flush_manager.go b/internal/datanode/flush_manager.go index 232ea3327a..5b40158e48 100644 --- a/internal/datanode/flush_manager.go +++ b/internal/datanode/flush_manager.go @@ -854,7 +854,9 @@ func flushNotifyFunc(dsService *dataSyncService, opts ...retry.Option) notifyMet // TODO change to graceful stop panic(err) } - if pack.flushed || pack.dropped { + if pack.dropped { + dsService.channel.removeSegments(pack.segmentID) + } else if pack.flushed { dsService.channel.segmentFlushed(pack.segmentID) }