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 | 
|---|---|---|
| 
 | Context for the current call to work. | 
 | 
| 
 | Name of a collection | 
 | 
| 
 | Names of the partitions to release. | 
 | 
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())
}