yuqi1129 opened a new issue, #14503:
URL: https://github.com/apache/gravitino/issues/14503

   ### Version
   
   branch-1.3, source checked at bfe2876bd5802eea3073d63d568e1ee50c619c31. 
Current main already contains the HTTP 502 fallback described below.
   
   ### Describe what's wrong
   
   On branch-1.3, a schema operation that receives `ConnectionFailedException` 
falls through `SchemaExceptionHandler` to `BaseExceptionHandler` and is 
returned as HTTP 500. Table operations have a specific HTTP 502 mapping for the 
same exception. Schema listing is often the first call made by clients, so a 
source outage or rejected connection can appear as a Gravitino server fault.
   
   This is a release-branch backport gap, not a new main-branch defect. Main's 
base handler maps `ConnectionFailedException` to `Utils.connectionFailed` 
(502). That fallback was introduced in the changes merged by [PR 
#11959](https://github.com/apache/gravitino/pull/11959). The corresponding 
mapping is absent from the checked branch-1.3 source.
   
   ### Error message and/or stacktrace
   
   For the same source connection failure:
   
   - Schema list/load/create/drop: HTTP 500, generic runtime error.
   - Table operation receiving `ConnectionFailedException`: HTTP 502, 
`ConnectionFailedException`.
   
   ### How to reproduce
   
   1. Use a branch-1.3 server with a JDBC PostgreSQL catalog whose connection 
initially succeeds.
   2. Rotate the source role's password without updating the catalog, and 
terminate its existing pooled sessions so the next operation must reconnect.
   3. Invoke schema list, schema load, schema create and schema drop. Compare 
these responses with a table operation against the same catalog.
   4. Alternatively, invoke the schema REST exception handler directly with a 
`ConnectionFailedException` for each of LIST, LOAD, CREATE and DROP.
   5. Expect HTTP 502 and the connection-failure error type consistently. 
Backport the relevant exception mapping with schema-operation regression 
coverage.
   
   ### Additional context
   
   - [branch-1.3 
ExceptionHandlers](https://github.com/apache/gravitino/blob/bfe2876bd5802eea3073d63d568e1ee50c619c31/server/src/main/java/org/apache/gravitino/server/web/rest/ExceptionHandlers.java)
   - [main 
ExceptionHandlers](https://github.com/apache/gravitino/blob/90da2776a/server/src/main/java/org/apache/gravitino/server/web/rest/ExceptionHandlers.java)
   
   A focused diagnostic on current main verifies that schema handler calls 
already return 502 for LIST, LOAD, CREATE and DROP. The release-branch gap is 
confirmed by source comparison; a current branch-1.3 server was not started in 
this audit. A small targeted backport is sufficient; this report does not 
request backporting the entire warehouse-validation feature from PR #11959.
   


-- 
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