GreptimeTeam / greptimedb

An open-source, cloud-native, unified time series database for metrics, logs and events with SQL/PromQL supported. Available on GreptimeCloud.
https://greptime.com/
Apache License 2.0
4.31k stars 312 forks source link

Supports health checking in gRPC SDKs #4674

Open killme2008 opened 2 months ago

killme2008 commented 2 months ago

What type of enhancement is this?

API improvement

What does the enhancement do?

It would be ideal for the gRPC SDK to have a status indicator to show whether it is currently healthy, just like to probe the database and connections. Users can use this status to perform fault tolerance and disaster recovery actions

Implementation challenges

No response

killme2008 commented 1 month ago

Already implemented in erlang ingester is_alive

https://github.com/GreptimeTeam/greptimedb-ingester-erl/blob/73f5d11977abf5dc2bce4b5eddc5334277d3b7ae/src/greptimedb.erl#L114

killme2008 commented 1 month ago

@fengjiachun Do we have the same function in java ingester? If not,i think we should implement it.

https://github.com/GreptimeTeam/greptime-proto/blob/973f49cde88a582fb65755cc572ebcf6fb93ccf7/proto/greptime/v1/health.proto#L26

fengjiachun commented 1 month ago

@fengjiachun Do we have the same function in java ingester? If not,i think we should implement it.

https://github.com/GreptimeTeam/greptime-proto/blob/973f49cde88a582fb65755cc572ebcf6fb93ccf7/proto/greptime/v1/health.proto#L26

I will implement this later.

fengjiachun commented 1 month ago

@fengjiachun Do we have the same function in java ingester? If not,i think we should implement it. https://github.com/GreptimeTeam/greptime-proto/blob/973f49cde88a582fb65755cc572ebcf6fb93ccf7/proto/greptime/v1/health.proto#L26

I will implement this later.

In progress:

https://github.com/GreptimeTeam/greptimedb-ingester-java/pull/50

fengjiachun commented 1 month ago

@killme2008 PTAL https://github.com/GreptimeTeam/greptimedb-ingester-java/pull/50