[skip e2e] Refine collection not exists error (#26707)

Signed-off-by: jaime <yun.zhang@zilliz.com>
pull/26780/head
jaime 2023-08-31 17:29:03 +08:00 committed by GitHub
parent 4bf26dd4ed
commit d001133bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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
}