GetFlushAllState()

This operation checks whether a flush-all action has completed. Use it when you need to poll completion separately from the initial flush request.

Status GetFlushAllState(const GetFlushAllStateRequest& request, GetFlushAllStateResponse& response)

Request Syntax

auto request = milvus::GetFlushAllStateRequest()
    .WithDatabaseName("default")
    .WithFlushAllTs(flush_all_ts);

REQUEST METHODS:

  • WithDatabaseName(const std::string& db_name)

    Sets the database used for the original flush-all operation.

  • SetDatabaseName(const std::string& db_name)

    Set database name in which collections are flushed.

  • WithFlushAllTs(uint64_t flush_all_ts)

    Sets the timestamp returned by FlushAll().

  • SetFlushAllTs(uint64_t flush_all_ts)

    Set flush-all timestamp returned by FlushAll().

RETURNS:

Status

Returns a Status indicating whether the operation succeeded. On success, the GetFlushAllStateResponse indicates whether the flush-all action has finished.

  • response (GetFlushAllStateResponse) -

    • Flushed (bool) -

      Whether the flush-all action has finished.

ERROR HANDLING:

  • Status

    Failures are reported through the returned Status. The SDK converts internal exceptions into a non-OK Status; public API calls do not throw. Inspect status.IsOk() and status.Message() for failure details. See Status.

Example

auto client = milvus::MilvusClientV2::Create();
milvus::ConnectParam connect_param{"http://localhost:19530", "root:Milvus"};
auto status = client->Connect(connect_param);
if (!status.IsOk()) {
    std::cout << status.Message() << std::endl;
}

auto request = milvus::GetFlushAllStateRequest()
    .WithDatabaseName("default")
    .WithFlushAllTs(flush_all_ts);
milvus::GetFlushAllStateResponse response;
status = client->GetFlushAllState(request, response);
if (!status.IsOk()) {
    std::cout << status.Message() << std::endl;
}

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?