Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deleted data may be returned by search/query #25513

Merged
merged 1 commit into from Jul 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion internal/querynode/watch_dm_channels_task.go
Expand Up @@ -244,11 +244,21 @@
zap.Int64("collectionID", collectionID),
zap.Int64s("unFlushedSegmentIDs", unFlushedSegmentIDs),
)
_, err := w.node.loader.LoadSegment(w.ctx, req, segmentTypeGrowing)
loaded, err := w.node.loader.LoadSegment(w.ctx, req, segmentTypeGrowing)
if err != nil {
log.Warn("failed to load segment", zap.Int64("collection", collectionID), zap.Error(err))
return nil, err
}
for _, segmentID := range loaded {
segment, err := w.node.metaReplica.getSegmentByID(segmentID, segmentTypeGrowing)
if err != nil {
log.Warn("could not get segment", zap.Int64("segmentID", segmentID))
continue

Check warning on line 256 in internal/querynode/watch_dm_channels_task.go

View check run for this annotation

Codecov / codecov/patch

internal/querynode/watch_dm_channels_task.go#L255-L256

Added lines #L255 - L256 were not covered by tests
}
if err = segment.FlushDelete(); err != nil {
return nil, err
}

Check warning on line 260 in internal/querynode/watch_dm_channels_task.go

View check run for this annotation

Codecov / codecov/patch

internal/querynode/watch_dm_channels_task.go#L259-L260

Added lines #L259 - L260 were not covered by tests
}
log.Info("successfully load growing segments done in WatchDmChannels",
zap.Int64("collectionID", collectionID),
zap.Int64s("unFlushedSegmentIDs", unFlushedSegmentIDs),
Expand Down