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:
cai.zhang 2025-11-06 20:36:50 +08:00 committed by GitHub
parent 1c39169def
commit 923f9dfdc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -439,12 +439,12 @@ func (st *statsTask) createTextIndex(ctx context.Context,
return binlog.GetFieldID()
})
getInsertFiles := func(fieldID int64) ([]string, error) {
getInsertFiles := func(fieldID int64, enableNull bool) ([]string, error) {
if st.req.GetStorageVersion() == storage.StorageV2 {
return []string{}, nil
}
binlogs, ok := fieldBinlogs[fieldID]
if !ok {
if !ok && !enableNull {
return nil, fmt.Errorf("field binlog not found for field %d", fieldID)
}
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()))
// create text index and upload the text index files.
files, err := getInsertFiles(field.GetFieldID())
files, err := getInsertFiles(field.GetFieldID(), field.GetNullable())
if err != nil {
return err
}