mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
fix: [2.6hf]Skip building text index for newly added columns (#45358)
issue: #45315 master pr #45316 Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
1c39169def
commit
923f9dfdc2
@ -439,12 +439,12 @@ func (st *statsTask) createTextIndex(ctx context.Context,
|
|||||||
return binlog.GetFieldID()
|
return binlog.GetFieldID()
|
||||||
})
|
})
|
||||||
|
|
||||||
getInsertFiles := func(fieldID int64) ([]string, error) {
|
getInsertFiles := func(fieldID int64, enableNull bool) ([]string, error) {
|
||||||
if st.req.GetStorageVersion() == storage.StorageV2 {
|
if st.req.GetStorageVersion() == storage.StorageV2 {
|
||||||
return []string{}, nil
|
return []string{}, nil
|
||||||
}
|
}
|
||||||
binlogs, ok := fieldBinlogs[fieldID]
|
binlogs, ok := fieldBinlogs[fieldID]
|
||||||
if !ok {
|
if !ok && !enableNull {
|
||||||
return nil, fmt.Errorf("field binlog not found for field %d", fieldID)
|
return nil, fmt.Errorf("field binlog not found for field %d", fieldID)
|
||||||
}
|
}
|
||||||
result := make([]string, 0, len(binlogs))
|
result := make([]string, 0, len(binlogs))
|
||||||
@ -469,7 +469,7 @@ func (st *statsTask) createTextIndex(ctx context.Context,
|
|||||||
}
|
}
|
||||||
log.Info("field enable match, ready to create text index", zap.Int64("field id", field.GetFieldID()))
|
log.Info("field enable match, ready to create text index", zap.Int64("field id", field.GetFieldID()))
|
||||||
// create text index and upload the text index files.
|
// create text index and upload the text index files.
|
||||||
files, err := getInsertFiles(field.GetFieldID())
|
files, err := getInsertFiles(field.GetFieldID(), field.GetNullable())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user