mirror of https://github.com/milvus-io/milvus.git
fix: try best to get enough query results (#33178)
issue: https://github.com/milvus-io/milvus/issues/33137 Signed-off-by: longjiquan <jiquan.long@zilliz.com>pull/33184/head
parent
0f8c6f49ff
commit
9f81290c63
|
@ -633,7 +633,7 @@ func reduceRetrieveResults(ctx context.Context, retrieveResults []*internalpb.Re
|
|||
|
||||
var retSize int64
|
||||
maxOutputSize := paramtable.Get().QuotaConfig.MaxOutputSize.GetAsInt64()
|
||||
for j := 0; j < loopEnd; j++ {
|
||||
for j := 0; j < loopEnd; {
|
||||
sel, drainOneResult := typeutil.SelectMinPK(retrieveLimit, validRetrieveResults, cursors)
|
||||
if sel == -1 || (reduceStopForBest && drainOneResult) {
|
||||
break
|
||||
|
@ -643,6 +643,7 @@ func reduceRetrieveResults(ctx context.Context, retrieveResults []*internalpb.Re
|
|||
if _, ok := idSet[pk]; !ok {
|
||||
retSize += typeutil.AppendFieldData(ret.FieldsData, validRetrieveResults[sel].GetFieldsData(), cursors[sel])
|
||||
idSet[pk] = struct{}{}
|
||||
j++
|
||||
} else {
|
||||
// primary keys duplicate
|
||||
skipDupCnt++
|
||||
|
|
Loading…
Reference in New Issue