yuqi1129 commented on code in PR #13737:
URL: https://github.com/apache/gravitino/pull/13737#discussion_r4245792145


##########
core/src/main/java/org/apache/gravitino/stats/StatisticManager.java:
##########
@@ -200,14 +196,7 @@ public void updateStatistics(
                 .build();
         statisticEntities.add(statistic);
       }
-      TreeLockUtils.doWithTreeLock(
-          identifier,
-          LockType.WRITE,
-          (Executable<Void, IOException>)
-              () -> {
-                store.batchPut(statisticEntities, true);
-                return null;
-              });
+      store.batchPut(statisticEntities, true);

Review Comment:
   Agreed that this needs a decision. I went with the documentation route for 
this PR and a separate fix for the code:
   
   - The user-facing section of the PR description now states the case. On a 
single server, a table drop that races table-scoped writes (table statistics, 
and tag/policy associations, whose locks this PR also removes) waits on the 
table row. If that wait exceeds the backend lock timeout, the drop fails with a 
raw store error, as multi-node deployments already could since #13004 and 
#13487.
   - Translating only `TableMetaService` would special-case one path. #13776 
covers mapping deadlocks and lock-wait timeouts to 409 once, in the shared 
store exception path, for every write. It reuses the statistic classification, 
and adds a real H2 lock-timeout test for a table drop racing a table-scoped 
write.



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