mirror of https://github.com/milvus-io/milvus.git
[skip e2e] Refine collection not exists error (#26707)
Signed-off-by: jaime <yun.zhang@zilliz.com>pull/26780/head
parent
4bf26dd4ed
commit
d001133bd2
|
@ -592,7 +592,7 @@ func (kc *Catalog) GetCollectionByName(ctx context.Context, dbID int64, collecti
|
|||
}
|
||||
}
|
||||
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection: %s, at timestamp = %d", collectionName, ts))
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection %d:%s, at timestamp = %d", dbID, collectionName, ts))
|
||||
}
|
||||
|
||||
func (kc *Catalog) ListCollections(ctx context.Context, dbID int64, ts typeutil.Timestamp) ([]*model.Collection, error) {
|
||||
|
|
|
@ -469,7 +469,7 @@ func (m *MetaCache) GetPartitions(ctx context.Context, database, collectionName
|
|||
|
||||
if !ok {
|
||||
m.mu.RUnlock()
|
||||
return nil, fmt.Errorf("can't find collection name:%s", collectionName)
|
||||
return nil, fmt.Errorf("can't find collection name %s:%s", database, collectionName)
|
||||
}
|
||||
|
||||
if collInfo.partInfo == nil || len(collInfo.partInfo) == 0 {
|
||||
|
@ -528,7 +528,7 @@ func (m *MetaCache) GetPartitionInfo(ctx context.Context, database, collectionNa
|
|||
|
||||
if !ok {
|
||||
m.mu.RUnlock()
|
||||
return nil, fmt.Errorf("can't find collection name:%s", collectionName)
|
||||
return nil, fmt.Errorf("can't find collection name %s:%s", database, collectionName)
|
||||
}
|
||||
|
||||
var partInfo *partitionInfo
|
||||
|
|
|
@ -536,7 +536,7 @@ func (mt *MetaTable) getCollectionByIDInternal(ctx context.Context, dbName strin
|
|||
|
||||
if !coll.Available() {
|
||||
// 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 %s:%s", dbName, coll.Name))
|
||||
}
|
||||
|
||||
return filterUnavailable(coll), nil
|
||||
|
@ -566,7 +566,7 @@ func (mt *MetaTable) getCollectionByNameInternal(ctx context.Context, dbName str
|
|||
}
|
||||
|
||||
if isMaxTs(ts) {
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection: %s", collectionName))
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection %s:%s", dbName, collectionName))
|
||||
}
|
||||
|
||||
db, err := mt.getDatabaseByNameInternal(ctx, dbName, typeutil.MaxTimestamp)
|
||||
|
@ -582,7 +582,7 @@ func (mt *MetaTable) getCollectionByNameInternal(ctx context.Context, dbName str
|
|||
}
|
||||
|
||||
if coll == nil || !coll.Available() {
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection: %s", collectionName))
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection %s:%s", dbName, collectionName))
|
||||
}
|
||||
return filterUnavailable(coll), nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue