Skip to content

Commit

Permalink
fix: [2.4] Prevent use captured iteration variable partitionID (#33907)
Browse files Browse the repository at this point in the history
Cherry-pick from master
pr: #33906 
See also #33902

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
  • Loading branch information
congqixia authored Jun 17, 2024
1 parent 5fc1370 commit e807183
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/querynodev2/delegator/delegator_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,9 @@ func (sd *shardDelegator) applyBFInParallel(deleteDatas []*DeleteData, pool *con
retIdx += 1
tmpRetIdx := retIdx
deleteDataId := didx
partitionID := data.PartitionID
future := pool.Submit(func() (any, error) {
ret := sd.pkOracle.BatchGet(pks[startIdx:endIdx], pkoracle.WithPartitionID(data.PartitionID))
ret := sd.pkOracle.BatchGet(pks[startIdx:endIdx], pkoracle.WithPartitionID(partitionID))
retMap.Insert(tmpRetIdx, &BatchApplyRet{
DeleteDataIdx: deleteDataId,
StartIdx: startIdx,
Expand Down

0 comments on commit e807183

Please sign in to comment.