Timm0 commented on code in PR #29843:
URL: https://github.com/apache/flink/pull/29843#discussion_r4537423346
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/delegation/materializedtable/DefaultMaterializedTableExecutor.java:
##########
@@ -846,19 +949,36 @@ private void alterActivatedContinuousMaterializedTable(
alterMaterializedTableChangeOperation.execute(operationCtx);
// 3. resume the materialized table
+ final String restartFailureMessage =
+ String.format(
+ "Failed to start the continuous refresh job using new
query %s when altering materialized table '%s' select query.",
+ op.getNewTable().getExpandedQuery(),
tableIdentifier.asSummaryString());
try {
executeContinuousRefreshJob(
alterMaterializedTableChangeOperation.getNewTable(),
tableIdentifier,
Map.of(),
Optional.empty());
+ } catch (UncancelledRefreshJobException e) {
+ try {
+ generateRollbackAlterMaterializedTableOperation(
+ suspendMaterializedTable,
alterMaterializedTableChangeOperation)
+ .execute(operationCtx);
+ } catch (RuntimeException rollbackFailure) {
+ rollbackFailure.addSuppressed(e);
+ throw rollbackFailure;
+ }
Review Comment:
Done
--
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]