yuqi1129 commented on code in PR #13067:
URL: https://github.com/apache/gravitino/pull/13067#discussion_r3978517993


##########
docs/health-and-readiness.md:
##########
@@ -54,7 +57,44 @@ endpoint rather than to a check of its own.
 
 The response body carries an overall status and a list of individual checks. 
Each check has a name,
 a status of UP or DOWN, and a details map that explains a failure. On the 
Gravitino server the two
-check names are `httpServer` and `entityStore`.
+normal check names are `httpServer` and `entityStore`. After an observed 
out-of-memory error, all
+three endpoints instead report the `jvm` failure described below.
+
+## Out-of-memory Failures
+
+A Metaspace or heap `OutOfMemoryError` can leave already-loaded endpoints 
responding successfully
+while other operations fail. A successful HTTP response or entity-store lookup 
therefore does not
+prove recovery after OOM.
+
+The Gravitino, Iceberg REST, and Lance REST servers record OOM observed by 
their Jersey exception
+listeners, error mappers, shared request execution/error-response helpers, and 
Jetty worker
+uncaught-exception handlers. The main server also records failures in 
health-probe tasks.
+Wrapped causes are checked too. Once recorded, the affected service’s health 
endpoints and root
+aliases return HTTP 503 with this body (the main server uses the `/api/health` 
prefix):
+
+```json
+{
+  "code": 0,
+  "status": "down",

Review Comment:
   Corrected in 1762ae3. The docs now distinguish lowercase Gravitino/Lance 
status values from uppercase Iceberg REST values and clarify that Iceberg uses 
`DOWN` for both status fields in the OOM example. The main-server configuration 
example is also lowercase. Added assertions using the actual Iceberg and Lance 
JSON mappers for healthy and OOM responses; serialization behavior is unchanged.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to