HealthState

The health state of the Milvus server, as reported by MilvusClientV2.HealthAsync.

public sealed record HealthState(
    bool IsHealthy,
    string Reason,
    MilvusErrorCode ErrorCode,
    IReadOnlyList<string>? Reasons = null,
    IReadOnlyList<QuotaState>? QuotaStates = null);

PARAMETERS:

  • IsHealthy (bool) -

    Whether the server reported itself as healthy.

  • Reason (string) -

    The reason reported by the server when unhealthy.

  • ErrorCode (MilvusErrorCode) -

    The error code reported by the server. For the values of the MilvusErrorCode enumeration, refer to MilvusErrorCode.

  • Reasons (IReadOnlyList?) -

    The detailed reasons reported by the server when unhealthy.

  • QuotaStates (IReadOnlyList?) -

    The quota states reported by the server.

QuotaState

public enum QuotaState
{
    Unknown = 0,
    ReadLimited = 2,
    WriteLimited = 3,
    DenyToRead = 4,
    DenyToWrite = 5,
    DenyToDdl = 6
}

Constants:

  • Unknown (0)

    The quota state is unknown.

  • ReadLimited (2)

    Reads are rate-limited.

  • WriteLimited (3)

    Writes are rate-limited.

  • DenyToRead (4)

    Reads are denied.

  • DenyToWrite (5)

    Writes are denied.

  • DenyToDdl (6)

    DDL operations are denied.

Example

using Milvus.Client.V2;
using Milvus.Client.V2.Types;

using var client = new MilvusClientV2(new ConnectConfig
{
    Uri = "localhost:19530",
    Username = "root",
    Password = "Milvus"
});

HealthState state = await client.HealthAsync();
Console.WriteLine(state.IsHealthy ? "Healthy" : state.Reason);

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?