Skip to content

Commit

Permalink
fix: Query may return deleted records (#34501)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
weiliu1031 authored Jul 9, 2024
1 parent 0c4d82c commit eeb03a0
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/querynodev2/delegator/delegator_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"math/rand"
"runtime"
"sort"
"time"

"github.com/cockroachdb/errors"
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit eeb03a0

Please sign in to comment.