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

   ## Why are the changes needed?
   
   REST table creation and background catalog exploration can register the same 
table runtime concurrently. This can cause a duplicate primary key error in 
`table_runtime`, failing table creation and triggering subsequent `test_ns 
already exists` errors.
   
   Related to #3985.
   
   ## Brief change log
   
   - Serialize runtime registration by table ID using bounded striped locks in 
the non-master-slave path.
   - Check for an existing runtime under the lock before inserting it and 
publishing registration events.
   - Add regression tests for late and overlapping registration calls.
   
   ## 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
   
   Both regression tests fail with duplicate-key errors before the fix and pass 
afterward. Keeping the existence check but removing the lock still causes the 
overlapping-registration test to fail.
   
   All 42 selected tests passed, including runtime handler and Iceberg/Mixed 
catalog tests. Checkstyle and Spotless also passed.
   
   ## 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