github-actions[bot] commented on code in PR #61176:
URL: https://github.com/apache/doris/pull/61176#discussion_r3084951852
##########
fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java:
##########
@@ -1200,38 +1202,32 @@ public static void loadJournal(Env env, Long logId,
JournalEntity journal) {
}
case OperationType.OP_ADD_CONSTRAINT: {
final AlterConstraintLog log = (AlterConstraintLog)
journal.getData();
- try {
- TableNameInfo tni = log.getTableNameInfo();
- Constraint constraint = log.getConstraint();
- if (tni == null) {
- LOG.warn("Failed to replay add constraint {}: "
- + "table name could not be resolved",
- constraint.getName());
- break;
- }
- env.getConstraintManager().addConstraint(
- tni, constraint.getName(), constraint, true);
- } catch (Exception e) {
- LOG.warn("Failed to replay add constraint", e);
+ TableNameInfo tni = log.getTableNameInfo();
+ Constraint constraint = log.getConstraint();
+ if (tni == null) {
+ LOG.warn("Skip replaying add constraint {} because
table name could not be resolved",
+ constraint.getName());
+ break;
}
Review Comment:
Resolving dependent MTMVs before replaying the constraint makes journal
recovery fragile. `MTMVUtil.getDependentMtmvsByConstraint()` eagerly resolves
every relation-manager entry to an `MTMV`, but other MTMV call sites already
treat those lookups as best-effort because stale or temporarily unresolvable
entries can exist. If one lookup throws here, the exception escapes this
`case`, reaches `loadJournal()`'s outer handler, and terminates FE replay with
`System.exit(-1)`. Before this patch, these constraint replay paths only logged
and continued. Please keep cache invalidation best-effort during replay instead
of letting dependency lookup abort recovery.
--
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]