github-actions[bot] commented on code in PR #66287:
URL: https://github.com/apache/doris/pull/66287#discussion_r3793508210
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -1012,7 +1012,8 @@ private void dropTableInternal(Database db, Table table,
boolean isView, boolean
} finally {
table.writeUnlock();
}
- if (table instanceof OlapTable) {
+ // MTMVs persist streams as explicit relations, so dropping a stream
must invalidate them immediately.
+ if (table instanceof OlapTable || table instanceof BaseTableStream) {
Review Comment:
**[P1] Invalidate stream dependents on database drop too**
This hook is reached by standalone `DROP STREAM`, but `unprotectDropDb()`
removes each stream through `unprotectDropTable()` directly, and
`replayDropDb()` follows the same bypass. An MTMV in another database over `S
-> T` can therefore remain `NORMAL`; after the dropped database is recreated
with a same-name stream or View over `B`, name-keyed relation lookup matches
the replacement, that stream/View is treated as synchronous, and `T`'s old
snapshot can still match. A later lazy cache build then reparses the MV SQL
through the replacement even though its rows came from old `S -> T`. This is
distinct from the existing load-compatibility threads because no compatibility
pass runs on this live lifecycle. Please put stream invalidation on the common
database-drop/replay path, make the standalone drop/status journal ordering
crash-safe, and add cross-database replacement plus incomplete-journal replay
coverage.
--
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]