Fix nilness linter errors (#26218)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2023-08-09 11:31:15 +08:00 committed by GitHub
parent 12a7747a95
commit 2770ac4df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 18 deletions

View File

@ -516,9 +516,6 @@ func anyToColumns(rows []map[string]interface{}, sch *schemapb.CollectionSchema)
return nil, fmt.Errorf("failed to marshal dynamic field %w", err)
}
dynamicCol = append(dynamicCol, bs)
if err != nil {
return nil, fmt.Errorf("failed to append value to dynamic field %w", err)
}
}
}
columns := make([]*schemapb.FieldData, 0, len(nameColumns))

View File

@ -202,14 +202,6 @@ func (i *IndexNode) Init() error {
}
log.Info("IndexNode init session successful", zap.Int64("serverID", i.session.ServerID))
if err != nil {
log.Error("IndexNode NewMinIOKV failed", zap.Error(err))
initErr = err
return
}
log.Info("IndexNode NewMinIOKV succeeded")
i.initSegcore()
})

View File

@ -527,7 +527,7 @@ func (mt *MetaTable) getCollectionByIDInternal(ctx context.Context, dbName strin
if coll == nil {
// use coll.Name to match error message of regression. TODO: remove this after error code is ready.
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection: %s", coll.Name))
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection: %d", collectionID))
}
if allowUnavailable {

View File

@ -1025,9 +1025,6 @@ func (deleteCodec *DeleteCodec) Serialize(collectionID UniqueID, partitionID Uni
}
defer binlogWriter.Close()
defer eventWriter.Close()
if err != nil {
return nil, err
}
length := len(data.Pks)
if length != len(data.Tss) {
return nil, fmt.Errorf("the length of pks, and TimeStamps is not equal")
@ -1178,9 +1175,6 @@ func (dataDefinitionCodec *DataDefinitionCodec) Serialize(ts []Timestamp, ddRequ
var blobs []*Blob
if err != nil {
return nil, err
}
var int64Ts []int64
for _, singleTs := range ts {
int64Ts = append(int64Ts, int64(singleTs))