mchades opened a new pull request, #14040: URL: https://github.com/apache/gravitino/pull/14040
### What changes were proposed in this pull request? Translate metadata-store rename conflicts into the corresponding `*AlreadyExistsException` for filesets, models, policies, catalogs, metalakes, and managed tables. Preserve the cause and report the final target name, including the target schema for table renames. Document the exception contract and add database-backed regression tests and REST error-response tests. ### Why are the changes needed? Renaming to an existing name currently returns HTTP 500 for five of these types and HTTP 400 for managed tables. These conflicts should consistently return HTTP 409. Fix: #14039 Job template conflicts are handled separately in #14018. ### Does this PR introduce _any_ user-facing change? Yes. Affected rename conflicts return HTTP 409 with the object-specific exception type and conflicting target name. ### How was this patch tested? - Relational-store tests cover all six types, repeated renames, cross-schema table conflicts, and unchanged source/target objects after a failed rename. - REST tests verify HTTP 409, the error code, exception type, and message for all six types. - 471 tests passed across the affected Core manager, Fileset/Model operation, and REST test classes. `:api:javadoc` and Spotless checks also passed. - MySQL/PostgreSQL Docker tests were not run locally; H2 was used for relational-store validation. -- 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]
