fix: Query may return deleted records (#34501)

issue: #34500
cause the sort in `GetLevel0Deletions` will broken the corresponed order
between pks and tss, then the pks and tss will be sorted in
segment.Delete() interface.

This PR remove this uncessary and incorrect sort progress to avoid query
may return deleted records.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
pull/34510/head
wei liu 2024-07-09 10:46:11 +08:00 committed by GitHub
parent 0c4d82c6d3
commit eeb03a0d6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 5 deletions

View File

@ -21,7 +21,6 @@ import (
"fmt"
"math/rand"
"runtime"
"sort"
"time"
"github.com/cockroachdb/errors"
@ -593,10 +592,6 @@ func (sd *shardDelegator) GetLevel0Deletions(partitionID int64, candidate pkorac
}
}
sort.Slice(pks, func(i, j int) bool {
return tss[i] < tss[j]
})
return pks, tss
}