yuqi1129 opened a new issue, #12452:
URL: https://github.com/apache/gravitino/issues/12452

   ### Describe the subtask
   
   Add database-backed optimistic concurrency control and transaction 
boundaries for catalog writes.
   
   - Advance the catalog OCC version on every alter, and guard alter and drop 
with a compare-and-set on the observed version.
   - Classify a failed CAS as either a stale-version conflict or an 
already-missing entity.
   - Protect catalog creation with a shared lock on the parent metalake row on 
MySQL and PostgreSQL, without changing the parent version, so a catalog cannot 
be created below a metalake that is being dropped. H2 uses an exclusive lock 
because it has no shared row-lock syntax.
   - Keep the catalog CAS, the non-empty check or the cascade cleanup, and the 
change-log writes in one database transaction, and CAS-delete descendant 
schemas with their observed identifier-and-version pairs.
   
   Split out of #12350 to keep each review small. Second of three: metalake -> 
catalog -> schema.
   
   ### Parent issue
   
   https://github.com/apache/gravitino/issues/12342
   


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