FlushAllAsync()
Flushes all collections.
public async Task<FlushAllResp> FlushAllAsync(FlushAllReq request, CancellationToken cancellationToken = default)
Request Syntax
var request = new FlushAllReq
{
WaitFlushedMs = 60000
};
FlushAllResp result = await client.FlushAllAsync(request);
REQUEST PARAMETERS:
DatabaseName(string?) -An optional database name to operate on. When empty, the client’s currently selected database is used.
WaitFlushedMs(int) -The number of milliseconds to wait for the flush-all operation to complete by polling
GetFlushAllStateAsync. When zero (default), waits until the flush-all completes with no timeout.
RETURN TYPE:
Task
RETURNS:
A FlushAllResp object that identifies the flush-all operation.
FlushAllResp
FlushAllTimestamp // -> ulong
FlushAllTss // -> IReadOnlyDictionary<string, ulong>?
PARAMETERS:
FlushAllTimestamp (ulong) -
The timestamp identifying the flush-all operation, used to poll its state.
FlushAllTss (IReadOnlyDictionary
? ) -The per-pchannel flush timestamps reported by the flush-all operation, or
nullwhen the server did not report them (or reported a channel without a timestamp).
EXCEPTIONS:
-
Thrown when the RPC fails or the server returns an error. Inspect the exception message for details.
Example
using Milvus.Client.V2;
using Milvus.Client.V2.Requests.Utility;
using Milvus.Client.V2.Responses.Utility;
using var client = new MilvusClientV2(new ConnectConfig
{
Uri = "localhost:19530",
Username = "root",
Password = "Milvus"
});
await client.ConnectAsync();
FlushAllResp result = await client.FlushAllAsync(new FlushAllReq
{
WaitFlushedMs = 60000
});
Console.WriteLine($"Flush-all timestamp: {result.FlushAllTimestamp}");