Timm0 commented on code in PR #29843:
URL: https://github.com/apache/flink/pull/29843#discussion_r4536881588
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/delegation/materializedtable/DefaultMaterializedTableExecutor.java:
##########
@@ -191,8 +195,15 @@ private void createMaterializedTableInContinuousMode(
} catch (Exception e) {
// drop materialized table if submitting the Flink streaming job
encounters an
// exception. Thus, weak atomicity is guaranteed
- new DropMaterializedTableOperation(materializedTableIdentifier,
true)
- .execute(operationCtx);
+ cleanUpAfterFailure(
+ () ->
+ new
DropMaterializedTableOperation(materializedTableIdentifier, true)
+ .execute(operationCtx),
+ e,
+ String.format(
+ "Failed to submit continuous refresh job for
materialized table %s, and dropping the table failed as well."
Review Comment:
Done. Adopted the pattern `CatalogManager` uses.
--
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]