924060929 commented on code in PR #63612:
URL: https://github.com/apache/doris/pull/63612#discussion_r3302134882


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -7553,6 +7560,35 @@ public NereidsSortedPartitionsCacheManager 
getSortedPartitionsCacheManager() {
         return sortedPartitionsCacheManager;
     }
 
+    public void notifyTableMetaChange(TableIf table) {
+        if (table == null) {
+            return;
+        }
+        TableMetaChange change =
+                TableMetaChange.fromTable(table);

Review Comment:
   Correction to my earlier reply: follower promotion via BDBJE election does 
NOT restart the process, so the promoted FE retains its in-memory sql cache. 
The crash window is real for DDLs that don't bump `visibleVersion` (e.g. rename 
column).
   
   That said, this is strictly better than the status quo: before this PR, 
followers **never** invalidated sql cache on any metadata replay. This PR 
narrows the exposure from "always stale" to "stale only during a crash between 
two consecutive journal writes in the same method call" — an extremely narrow 
window.
   
   Making invalidation truly atomic would require embedding it in each 
individual `replay*` path (dozens of them), which is the coupling this design 
intentionally avoids. The trade-off is accepted.



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