morningman commented on code in PR #49875:
URL: https://github.com/apache/doris/pull/49875#discussion_r2056875469
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/MTMV.java:
##########
@@ -473,6 +473,12 @@ public void setRefreshSnapshot(MTMVRefreshSnapshot
refreshSnapshot) {
this.refreshSnapshot = refreshSnapshot;
}
+ public boolean canBeCandidate() {
+ // MTMVRefreshState.FAIL also can be candidate, because may have some
sync partitions
+ return getStatus().getState() == MTMVState.NORMAL
+ && getStatus().getRefreshState() != MTMVRefreshState.INIT;
Review Comment:
How about create a `canBeCandidate()` in `MTMVStatus`?
So that we won't miss this judgement if we add or delete the status or state
enum.
For example, if i add a new `MTMVRefreshState`, this logic may be forgot to
modify
##########
fe/fe-core/src/main/java/org/apache/doris/mtmv/BaseTableInfo.java:
##########
@@ -159,10 +159,14 @@ public String toString() {
+ '}';
}
- public void compatible(CatalogMgr catalogMgr) {
+ public void compatible(CatalogMgr catalogMgr) throws Exception {
if (!StringUtils.isEmpty(ctlName)) {
return;
}
+ // should not get meta from external catalog when replay, because the
timeout period may be very long
+ if (ctlId != InternalCatalog.INTERNAL_CATALOG_ID) {
+ throw new Exception("can not compatibility external table");
Review Comment:
Better add catalog, db and table info in error msg
--
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]