Skip to main content

ReleasePartitions()

This method releases the data of specific partitions from memory.

func (c *GrpcClient) ReleasePartitions(ctx context.Context, collName string, partitionNames []string) error

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

collName

Name of a collection

string

partitionNames

Names of the partitions to release.

string

Return

Null

Errors

Any error in the execution of the request. Possible errors are as follows:

  • ErrClientNotReady: The client is not connected to Milvus.

  • ErrCollectionNotExists: The specified collection does not exist.

  • Partitions with the specified name do not exist.

  • The call to this API fails.

Example

// release partitions
errPar := mc.ReleasePartitions(context.Background(), collectionName, []string{"_default", "p1"})
if errPar != nil {
log.Fatal("failed to release partition:", errPar.Error())
}