MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
5.84k stars 11.06k forks source link

[GraphQL][cherry-pick #18277] Gql cherry pick health endpoint into 2024.4 release #18399

Closed stefan-mysten closed 4 days ago

stefan-mysten commented 4 days ago

Description

Adds a checkpoint_timestamp_ms to the watermark task and uses it in a new health check endpoint function. The health endpoint checks for two things

How to query this endpoint: curl -X GET "http://127.0.0.1:8000/health" -i Set the check for max checkpoint time lag to 10s. If it returns 503, then the checkpoint is behind. curl -X GET "http://127.0.0.1:8000/health?max_checkpoint_lag_ms=10000" -i

Test plan

Added a new test.

cargo nextest run --features pg_integration -- test_health_check


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

vercel[bot] commented 4 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 25, 2024 2:36am
vercel[bot] commented 4 days ago

@stefan-mysten is attempting to deploy a commit to the Mysten Labs Team on Vercel.

A member of the Team first needs to authorize it.