Timm0 commented on code in PR #29843:
URL: https://github.com/apache/flink/pull/29843#discussion_r4537418453


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/delegation/materializedtable/DefaultMaterializedTableExecutor.java:
##########
@@ -191,12 +195,19 @@ 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."
+                                    + LEFT_IN_INITIALIZING_STATUS,
+                            materializedTableIdentifier.asSummaryString()));
             throw new TableException(
                     String.format(
-                            "Failed to submit continuous refresh job for 
materialized table %s.",
-                            materializedTableIdentifier),
+                            "Failed to submit continuous refresh job for 
materialized table '%s'.",
+                            materializedTableIdentifier.asSummaryString()),
                     e);

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]

Reply via email to