fix: Set indexInfo when try to set segment to leader view (#30758)

issue: #30150
see also: #30258

cause `SyncDataDistribution` will try to load delta for segment. if miss
indexInfo in request, sync action will failed due to lack of index info.

This PR set indexinfo when try to set segment to leader view

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
pull/30817/head
wei liu 2024-02-26 11:02:55 +08:00 committed by GitHub
parent d970a9fc6c
commit befe0e21fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -433,7 +433,7 @@ func (ex *Executor) setDistribution(task *LeaderTask, step int) error {
return err
}
loadInfo, _, err := ex.getLoadInfo(ctx, task.CollectionID(), action.SegmentID(), channel)
loadInfo, indexInfo, err := ex.getLoadInfo(ctx, task.CollectionID(), action.SegmentID(), channel)
if err != nil {
return err
}
@ -457,6 +457,7 @@ func (ex *Executor) setDistribution(task *LeaderTask, step int) error {
Info: loadInfo,
},
},
IndexInfoList: indexInfo,
}
startTs := time.Now()