foxtail463 commented on code in PR #63639:
URL: https://github.com/apache/doris/pull/63639#discussion_r4279754136
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/MTMV.java:
##########
@@ -672,23 +674,24 @@ public MTMVCache getOrGenerateCache(ConnectContext
connectionContext) throws
// Someone invalidated between our snapshot and now; drop
the stale build and retry.
continue;
}
+ MTMVCache published =
cacheWithValidOutputPredicates(generated);
if (manager.isEnabled()) {
MTMVCache existing = manager.getIfPresent(this.id,
guarded);
if (existing != null) {
return existing;
}
if (!isDropped) {
- manager.put(this.id, guarded, generated);
+ manager.put(this.id, guarded, published);
}
} else if (statementContext != null && !isDropped) {
// Global cache is disabled (maximumSize=0); keep one copy
for this statement only.
MTMVCache existing =
statementContext.getQueryLocalMtmvCache(this.id, guarded);
if (existing != null) {
return existing;
}
- statementContext.putQueryLocalMtmvCache(this.id, guarded,
generated);
+ statementContext.putQueryLocalMtmvCache(this.id, guarded,
published);
Review Comment:
#68141 引入的 queryLocalMtmvCaches 没加缓存失效机制
--
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]