Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: [2.4] Move collection meta check to server side #835

Merged
merged 5 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions client/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,6 @@ func (c *GrpcClient) DropCollection(ctx context.Context, collName string, opts .
if c.Service == nil {
return ErrClientNotReady
}
if err := c.checkCollectionExists(ctx, collName); err != nil {
return err
}

req := &milvuspb.DropCollectionRequest{
CollectionName: collName,
Expand Down Expand Up @@ -350,10 +347,6 @@ func (c *GrpcClient) GetCollectionStatistics(ctx context.Context, collName strin
return nil, ErrClientNotReady
}

if err := c.checkCollectionExists(ctx, collName); err != nil {
return nil, err
}

req := &milvuspb.GetCollectionStatisticsRequest{
CollectionName: collName,
}
Expand All @@ -372,9 +365,6 @@ func (c *GrpcClient) ShowCollection(ctx context.Context, collName string) (*enti
if c.Service == nil {
return nil, ErrClientNotReady
}
if err := c.checkCollectionExists(ctx, collName); err != nil {
return nil, err
}

req := &milvuspb.ShowCollectionsRequest{
Type: milvuspb.ShowType_InMemory,
Expand Down Expand Up @@ -404,10 +394,6 @@ func (c *GrpcClient) RenameCollection(ctx context.Context, collName, newName str
return ErrClientNotReady
}

if err := c.checkCollectionExists(ctx, collName); err != nil {
return err
}

req := &milvuspb.RenameCollectionRequest{
OldName: collName,
NewName: newName,
Expand All @@ -425,10 +411,6 @@ func (c *GrpcClient) LoadCollection(ctx context.Context, collName string, async
return ErrClientNotReady
}

if err := c.checkCollectionExists(ctx, collName); err != nil {
return err
}

req := &milvuspb.LoadCollectionRequest{
CollectionName: collName,
}
Expand Down Expand Up @@ -471,9 +453,6 @@ func (c *GrpcClient) ReleaseCollection(ctx context.Context, collName string, opt
if c.Service == nil {
return ErrClientNotReady
}
if err := c.checkCollectionExists(ctx, collName); err != nil {
return err
}

req := &milvuspb.ReleaseCollectionRequest{
DbName: "", // reserved
Expand Down Expand Up @@ -537,9 +516,6 @@ func (c *GrpcClient) GetLoadingProgress(ctx context.Context, collName string, pa
if c.Service == nil {
return 0, ErrClientNotReady
}
if err := c.checkCollectionExists(ctx, collName); err != nil {
return 0, err
}

req := &milvuspb.GetLoadingProgressRequest{
CollectionName: collName,
Expand All @@ -558,9 +534,6 @@ func (c *GrpcClient) GetLoadState(ctx context.Context, collName string, partitio
if c.Service == nil {
return 0, ErrClientNotReady
}
if err := c.checkCollectionExists(ctx, collName); err != nil {
return 0, err
}

req := &milvuspb.GetLoadStateRequest{
CollectionName: collName,
Expand All @@ -579,9 +552,6 @@ func (c *GrpcClient) AlterCollection(ctx context.Context, collName string, attrs
if c.Service == nil {
return ErrClientNotReady
}
if err := c.checkCollectionExists(ctx, collName); err != nil {
return err
}

if len(attrs) == 0 {
return errors.New("no collection attribute provided")
Expand Down
Loading
Loading