remove segment from datanode meta when segment dropped (#23398)

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
aoiasd 2023-04-17 10:58:30 +08:00 committed by GitHub
parent 7ff6a3a246
commit f603456b72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}