mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 09:38:39 +08:00
fix: Skip building text index for newly added columns (#45316)
issue: #45315 Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
2dd2c96eb1
commit
b8f9384a85
@ -446,12 +446,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))
|
||||||
@ -476,7 +476,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