XiaoHongbo-Hope opened a new pull request, #8974:
URL: https://github.com/apache/paimon/pull/8974

   ### Purpose
   
   A CREATE TABLE request that configures bucket-key together with bucket = -1 
is invalid. SchemaValidation currently reports this deterministic validation 
failure as a plain RuntimeException.
   
   In the REST Catalog deployment where we encountered this issue, the server 
fallback mapped the RuntimeException to HTTP 503. The Paimon REST client 
retried the request, and the authentication layer then rejected the retry with 
SignatureNonceUsed. Users therefore saw a secondary nonce error instead of the 
actual invalid table configuration, while a non-retryable request error was 
treated as transient.
   
   The REST Catalog OpenAPI defines HTTP 400 for illegal create-table requests, 
and REST servers map IllegalArgumentException to that response. This change 
uses IllegalArgumentException for this validation so the original configuration 
error can be returned as a non-retryable bad request.
   
   ### Changes
   
   - Throw IllegalArgumentException when bucket-key is configured with bucket = 
-1.
   - Add a regression test that verifies the exception type and original 
validation message.
   
   ### Tests
   
   - mvn -s /mnt/disk1/ali/code/morax/tools/settings.xml -pl paimon-core 
-Pfast-build -DwildcardSuites=none -Dtest=SchemaValidationTest test
   - 51 tests passed.


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