github-actions[bot] commented on code in PR #69525:
URL: https://github.com/apache/doris/pull/69525#discussion_r4360134681


##########
fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java:
##########
@@ -185,6 +185,12 @@ private void tryFinishTxn(List<TransactionState> 
readyTransactionStates,
 
     private void tryFinishOneTxn(TransactionState transactionState, 
SystemInfoService infoService,
             GlobalTransactionMgrIface globalTransactionMgr) {
+        // A publish executor is finishing this transaction with the delta 
rows set by an earlier round, and it holds
+        // the monitor of the transaction state while it serializes them for 
the edit log. Setting them again here
+        // would make this thread, and so the publish of every other 
transaction, wait for that monitor.
+        if (publishingTxnIds.contains(transactionState.getTransactionId())) {
+            return;

Review Comment:
   [P2] Refresh queued transactions' delta rows before finishing
   
   With parallel publishing enabled, `tryFinishOneTxn` can queue a timed-out 
transaction while all BE tasks are unfinished, leaving its delta-row map empty. 
If those tasks finish while the attempt waits behind another executor job, this 
return skips every daemon refresh. `tryFinishTxnSync` does not recalculate the 
map, so `finishTransaction` can pass its live task quorum check and persist 
VISIBLE with empty deltas. `updateCatalogAfterVisible` then records no updated 
rows, and pruning discards the tasks, permanently losing those statistics 
updates, including on replay. Repeated UPSERTs with stable table row counts can 
therefore suppress update-triggered auto-analysis. Refresh the completed-task 
deltas on the executor's finish path before the VISIBLE snapshot, preserving 
monitor protection, and cover responses arriving during a queued attempt.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to