enhance: [Cherry-pick] Set delete scope for LoadSegment streaming data (#30245) (#30367)

Cherry pick from master
pr: #30245
See also #29474

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/30478/head
congqixia 2024-02-02 16:05:06 +08:00 committed by GitHub
parent 73df0b872e
commit 69a82acc46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -458,6 +458,7 @@ func (sd *shardDelegator) loadStreamDelete(ctx context.Context,
}
deleteData := &storage.DeleteData{}
// start position is dml position for segment
// if this position is before deleteBuffer's safe ts, it means some delete shall be read from msgstream
if position.GetTimestamp() < sd.deleteBuffer.SafeTs() {
@ -497,6 +498,7 @@ func (sd *shardDelegator) loadStreamDelete(ctx context.Context,
SegmentId: info.GetSegmentID(),
PrimaryKeys: storage.ParsePrimaryKeys2IDs(deleteData.Pks),
Timestamps: deleteData.Tss,
Scope: querypb.DataScope_Historical,
})
if err != nil {
log.Warn("failed to apply delete when LoadSegment", zap.Error(err))