924060929 commented on code in PR #63612:
URL: https://github.com/apache/doris/pull/63612#discussion_r3302576898
##########
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:
Added a complementary fix in the latest commit: store
`OlapTable.getBaseSchemaVersion()` in the cache entry and check it on lookup
(`tablesOrDataChanged`). This provides a **crash-window-free** safety net for
OlapTable schema DDLs (rename/add/drop column) — if the schema version changed,
the cache entry is invalidated on next access regardless of whether
`OP_TABLE_META_CHANGE` was received.
Now there are two layers:
- **Layer 2 (schemaVersion, lazy)**: no crash window, covers OlapTable
schema changes automatically
- **Layer 3 (OP_TABLE_META_CHANGE, eager)**: covers all table types and
non-schema DDLs (alter properties, etc.), has a tiny crash window
The crash window in Layer 3 only matters for non-OlapTable or non-schema
DDLs — and for those, the existing `tablesOrDataChanged` checks
(visibleVersion, table id, etc.) already catch most cases.
--
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]