reuvenlax commented on code in PR #40298:
URL: https://github.com/apache/beam/pull/40298#discussion_r4124699650


##########
runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/SparkStructuredStreamingRunner.java:
##########
@@ -177,8 +177,13 @@ public SparkStructuredStreamingPipelineResult run(final 
Pipeline pipeline) {
                 ctxRef.set(ctx);
                 if (!cancelRequested.get()) {
                   ctx.evaluate();
+                } else {
+                  cancelSparkJobs.run();
                 }
               } finally {
+                if (cancelRequested.get()) {

Review Comment:
   BTW pr/40103 (fix for 40101) actually introduced some of the flaky tests 
that this PR tries to address, so the flakes seen by this PR postdate 40103.



-- 
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