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

   ### What changes were proposed in this pull request?
   
   - Add version CAS to statistic updates and deletes, and fence writes with 
`lockLiveEndpoint` from #13004.
   - Report concurrent first creation of the same statistic as an OCC conflict.
   - Load only the requested statistic names for write snapshots.
   
   ### Why are the changes needed?
   
   Statistic writes previously used an unconditional upsert after resolving the 
target ID outside the transaction. A concurrent target deletion could leave an 
orphan, and concurrent statistic updates could silently overwrite each other. 
Sequential replacement by name remains supported.
   
   Fix: #13177
   
   Depends on #13486 (for #13004). This draft branch includes those commits; 
its statistic-only diff is against `fix/13004-live-endpoint-fence`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Concurrent statistic writes can return an OCC conflict, and writes to a 
deleted or replaced target fail. No API or configuration fields change.
   
   ### How was this patch tested?
   
   Added deterministic tests for concurrent first creation, version CAS, target 
deletion, and requested-name snapshots. Ran the full `TestStatisticMetaService` 
suite on H2, MySQL, and PostgreSQL with `./gradlew :core:test --tests 
org.apache.gravitino.storage.relational.service.TestStatisticMetaService 
-PskipITs`.
   


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