roryqi opened a new pull request, #13771:
URL: https://github.com/apache/gravitino/pull/13771
### What changes were proposed in this pull request?
- Use create-only writes when importing external schemas, tables, and views.
- Reload metadata after an import conflict to preserve normal HA
concurrent-import behavior.
- Reject mismatched identities with an error explaining that external
renames and multi-path conflicts require manual reconciliation.
- Add regression tests for successful HA races, identity conflicts, and
preservation of existing metadata.
### Why are the changes needed?
External metadata imports previously used overwrite writes in some cases.
When the same stable identifier appeared under another catalog or schema path,
the stored entity could be reassigned to that path.
Privilege relationships reference stable entity IDs, so reassigning an
entity could cause privileges to refer to the wrong path.
Fix: #13770
### Does this PR introduce _any_ user-facing change?
Yes. Gravitino no longer automatically overwrites imported metadata when
handling an external rename or multi-path identity conflict. The load operation
now reports that manual reconciliation is required.
Normal concurrent imports from multiple Gravitino nodes continue to work
through conflict detection and reload.
### How was this patch tested?
Ran:
./gradlew :core:test \
--tests org.apache.gravitino.catalog.TestSchemaOperationDispatcher \
--tests org.apache.gravitino.catalog.TestTableOperationDispatcher \
--tests org.apache.gravitino.catalog.TestViewOperationDispatcher
All 81 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]