csurong opened a new pull request, #4344:
URL: https://github.com/apache/amoro/pull/4344

   ## Why are the changes needed?
   
   Close #4343.
   
   External catalog synchronization invokes `triggerTableAdded` for every 
discovered table. When a table format has catalog support but no available 
`TableRuntimeCreator`, persisting `table_runtime` leaves a database-only 
runtime row. A later scan attempts to insert the same `table_id` again and logs 
a duplicate primary key error.
   
   ## Brief change log
   
   - Check `TableRuntimeFactory` support before persisting table runtime 
metadata.
   - Add a Paimon integration test that verifies metadata synchronization 
succeeds, no runtime is created, and repeated scans remain safe.
   
   ## How was this patch tested?
   
   - [x] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
   - [ ] Add screenshots for manual tests if appropriate
   - [x] Run test locally before making a pull request
   
   Commands:
   - `./mvnw -q -pl amoro-ams -am -Pskip-dashboard-build 
-Dtest=TestSyncUnsupportedTableFormat -DfailIfNoTests=false test`
   - `./mvnw -q -pl amoro-ams -am -Pskip-dashboard-build 
-Dtest=TestSyncTableOfExternalCatalog,TestSyncUnsupportedTableFormat 
-DfailIfNoTests=false test`
   - `./mvnw -q -pl amoro-ams -am -Pskip-dashboard-build -DskipTests 
spotless:check`
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable


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