yuqi1129 opened a new issue, #12776: URL: https://github.com/apache/gravitino/issues/12776
### Describe the subtask Implement database optimistic concurrency control and atomic service operations for managed policies. Split from #12347. - Audit policy create, alter, delete, content-version, and metadata-object association mutations. - Fence the active parent metalake during policy creation using the shared parent-lock pattern. - Advance `current_version` on every successful alter and use it as the metadata OCC token. - Write a complete `policy_version_info` snapshot for every alter so the active version remains readable, including metadata-only changes. - Preserve monotonic content-version history and overwrite versions instead of resetting them. - Match updates by policy ID, expected version, and active-row state. - Make policy deletion version checked and execute the root CAS before version, relationship, ownership, and change-log cleanup. - Use `OccWriteSupport` to classify missing entities versus optimistic-lock conflicts. - Apply association changes atomically and roll back all dependent writes when the root CAS fails. - Add H2, MySQL, and PostgreSQL coverage for create/drop fencing, content and metadata-only alters, stale deletes, overwrite versioning, association updates, and rollback. No database migration is required because the OCC and policy-version columns already exist. Depends on #12341 and #12639. ### Parent issue https://github.com/apache/gravitino/issues/12166 -- 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]
