mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
Fix nilness linter errors (#26218)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
12a7747a95
commit
2770ac4df5
@ -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))
|
||||
|
@ -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()
|
||||
})
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user