yuqi1129 opened a new pull request, #12746:
URL: https://github.com/apache/gravitino/pull/12746

   ### What changes were proposed in this pull request?
   
   Add version-CAS optimistic concurrency control and atomic service operations 
for managed roles.
   
   - Increment the role version on every update and match updates by role ID, 
expected version, and active-row state.
   - Make soft deletes version checked and classify a zero-row result as either 
a missing role or an OCC conflict.
   - Execute the role CAS before privilege, user-role, group-role, ownership, 
and cleanup mutations in one transaction.
   - Fence the parent metalake while creating a role, write the role before its 
securable objects, and advance the version on overwrite upserts.
   - Add coverage for metadata-only and privilege updates, stale deletes, 
overwrite versioning, parent fencing, and relationship rollback.
   
   ### Why are the changes needed?
   
   Concurrent role mutations could otherwise overwrite each other or leave 
partially updated privilege and relationship state.
   
   Fix: #12344
   
   ### Does this PR introduce _any_ user-facing change?
   
   Concurrent managed-role writes now report the existing optimistic-lock 
conflict response (HTTP 409). No API or configuration keys are changed.
   
   ### How was this patch tested?
   
   - `./gradlew :core:test --tests TestRoleMetaService --tests TestAuthMappers 
--tests TestPOConverters -PskipITs -PskipDockerTests=true`
   - `./gradlew :core:spotlessCheck :core:compileTestJava`
   
   MySQL and PostgreSQL backend execution was attempted locally, but the test 
databases could not be created because `mac-docker-connector` was not running. 
The H2 backend and all targeted assertions passed.
   


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