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


##########
fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java:
##########
@@ -2682,6 +2682,7 @@ private boolean 
updateCatalogAfterVisible(TransactionState transactionState, Dat
             long versionTime = entry.getValue().getMiddle();
             OlapTable table = entry.getValue().getRight();
             table.updateVisibleVersionAndTime(version, versionTime);
+            env.onTableChanged(table, Env.TableChangeType.DATA);

Review Comment:
   [P2] Avoid scanning cache partition dependencies while holding transaction 
table write locks. `finishTransaction` keeps 
`MetaLockUtils.tryWriteLockTablesIfExist(...)` held through 
`updateCatalogAfterVisible`, and this new callback walks every cached context 
and calls `OlapTableSqlCacheVersion.matches` for partition-aware entries. With 
a large SQL cache or many tracked partitions, visible-version publication now 
holds all affected table write locks for an unbounded cache-sized scan, 
delaying concurrent reads and metadata work. Capture the changed 
table/partition versions and invalidate or classify entries after releasing 
those locks, or use a cheap generation fence and defer detailed validation to 
lookup.



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