RootCoord should get all binlog paths for vector field (#14621)

Signed-off-by: Cai.Zhang <cai.zhang@zilliz.com>
pull/14632/head
cai.zhang 2021-12-30 19:39:21 +08:00 committed by GitHub
parent b4d995ceb3
commit e7e40c2328
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -623,12 +623,16 @@ func (c *Core) SetDataCoord(ctx context.Context, s types.DataCoord) error {
if binlog.Status.ErrorCode != commonpb.ErrorCode_Success {
return nil, fmt.Errorf("getInsertBinlogPaths from data service failed, error = %s", binlog.Status.Reason)
}
binlogPaths := make([]string, 0)
for i := range binlog.FieldIDs {
if binlog.FieldIDs[i] == fieldID {
return binlog.Paths[i].Values, nil
binlogPaths = append(binlogPaths, binlog.Paths[i].Values...)
}
}
return nil, fmt.Errorf("binlog file does not exist, segment id = %d, field id = %d", segID, fieldID)
if len(binlogPaths) == 0 {
return nil, fmt.Errorf("binlog file does not exist, segment id = %d, field id = %d", segID, fieldID)
}
return binlogPaths, nil
}
c.CallGetNumRowsService = func(ctx context.Context, segID typeutil.UniqueID, isFromFlushedChan bool) (retRows int64, retErr error) {