roryqi opened a new pull request, #12889:
URL: https://github.com/apache/gravitino/pull/12889

   ### What changes were proposed in this pull request?
   
   - Add a 128-character limit for statistic names, matching the storage schema.
   - Validate statistic names before table or partition statistics are 
persisted.
   - Redact overlong statistic names from error context.
   - Add tests for the accepted boundary and overlong-name rejection.
   
   ### Why are the changes needed?
   
   Overlong statistic names currently reach the storage layer and produce a 500 
response. The resulting error also echoes the complete offending name.
   
   This change rejects such requests with a clear 400 response before 
persistence.
   
   Fix: #12887
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Statistic names longer than 128 characters now return a 400 error 
identifying the length limit, without echoing the complete name.
   
   ### How was this patch tested?
   
   - `./gradlew :api:spotlessCheck :server:spotlessCheck`
   - `./gradlew :server:test --tests 
org.apache.gravitino.server.web.rest.TestStatisticOperations`


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