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

   ### What changes were proposed in this pull request?
   
   Add version-CAS optimistic concurrency control and atomic service operations 
for managed users.
   
   - Increment the user version on every update and match updates by user ID, 
expected version, and active-row state.
   - Make soft deletes version checked and classify a zero-row result as either 
a missing user or an OCC conflict.
   - Execute the user CAS before user-role and ownership mutations in one 
transaction.
   - Fence the parent metalake while creating a user and advance the version on 
overwrite upserts.
   - Add coverage for metadata-only updates, external-ID and ID updates, stale 
deletes, overwrite versioning, parent fencing, and relationship rollback.
   
   ### Why are the changes needed?
   
   Concurrent user mutations could otherwise overwrite each other or leave 
partially updated relationship state.
   
   Fix: #12739
   
   ### Does this PR introduce _any_ user-facing change?
   
   Concurrent managed-user 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 TestUserMetaService --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