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

   ### Describe the subtask
   
   `StatisticMetaService.batchInsertStatisticPOsOnDuplicateKeyUpdate` is a raw 
upsert: no `current_version` check, and the metadata-object id is resolved 
before the transaction with no live-target check. Last-writer-wins on a 
statistic *value* may be acceptable, but inserting a statistic against an 
object that another server just dropped is a different invariant, and 
statistics are the only entity family without OCC on `main`.
   
   Proposed change:
   - Version CAS on statistic updates (say explicitly if value-level 
last-writer-wins stays by design).
   - Lock the target metadata object row `FOR SHARE` in the statistic 
transaction (shared `lockLiveEndpoint` helper from #13004).
   - Tests: stale statistic update; statistic insert paused after id resolution 
while the target is dropped on the other server.
   
   Design: implementation design Part 3 (M3c). Gate G3.
   
   ### Parent issue
   
   https://github.com/apache/gravitino/issues/10238


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