haoxins commented on code in PR #540:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/540#discussion_r1152179953
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/sessionjob/SessionJobReconciler.java:
##########
@@ -100,6 +106,26 @@ public DeleteControl
cleanupInternal(FlinkResourceContext<FlinkSessionJob> ctx)
if (jobID != null) {
try {
cancelJob(ctx, UpgradeMode.STATELESS);
+ } catch (ExecutionException e) {
+ final var cause = e.getCause();
+
+ if (cause instanceof FlinkJobNotFoundException) {
+ LOG.error("Job {} not found in the Flink cluster.",
jobID, e);
+ return DeleteControl.defaultDelete();
+ }
+
+ if (cause instanceof
FlinkJobTerminatedWithoutCancellationException) {
+ LOG.error("Job {} already terminated without
cancellation.", jobID, e);
+ return DeleteControl.defaultDelete();
+ }
+
+ final var delay = 10_000L;
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]