hs150 commented on issue #14792: URL: https://github.com/apache/gravitino/issues/14792#issuecomment-6747909830
I looked through the reported race condition, and I agree that checking ownership by table name is insufficient when concurrent drop-and-recreate operations are possible. The important part of the fix is ensuring that the table identity returned by the original create operation is validated atomically with the ownership update. Performing an ID check before a separate owner write would still leave a race window. One possible direction worth exploring is a conditional ownership update at the metadata-store layer, using the created table's ID as the condition. This could potentially avoid introducing additional methods into the core interfaces, which was a concern in PR #14557. For regression testing, a deterministic concurrency test using synchronization barriers or latches would help: 1. Pause User A after table creation but before ownership assignment. 2. Drop the table and recreate the same name as User C. 3. Resume User A's ownership operation. 4. Verify that User A cannot become the owner of User C's table. The same identity-fencing principle should also be reviewed across the other create paths mentioned in #14786. -- 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]
