[ 
https://issues.apache.org/jira/browse/BEAM-10286?focusedWorklogId=449519&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-449519
 ]

ASF GitHub Bot logged work on BEAM-10286:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Jun/20 22:08
            Start Date: 22/Jun/20 22:08
    Worklog Time Spent: 10m 
      Work Description: apilloud commented on a change in pull request #12041:
URL: https://github.com/apache/beam/pull/12041#discussion_r443853108



##########
File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamEnumerableConverter.java
##########
@@ -201,7 +204,9 @@ private static void runCollector(PipelineOptions options, 
BeamRelNode node) {
     PCollection<Row> resultCollection = 
BeamSqlRelUtils.toPCollection(pipeline, node);
     resultCollection.apply(ParDo.of(new Collector()));
     PipelineResult result = pipeline.run();
-    result.waitUntilFinish();
+    if (PipelineResult.State.FAILED.equals(result.waitUntilFinish())) {
+      throw new RuntimeException("Pipeline failed for unknown reason");

Review comment:
       You may want to file a bug. The behavior before this PR is that an 
exception will be thrown `at most once`, after the PR it is `exactly once`. If 
there are multiple threads waiting on `result.waitUntilFinish()`, not all will 
receive exceptions.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 449519)
    Time Spent: 40m  (was: 0.5h)

> ExecutorServiceParallelExecutor.waitUntilFinish drops exceptions
> ----------------------------------------------------------------
>
>                 Key: BEAM-10286
>                 URL: https://issues.apache.org/jira/browse/BEAM-10286
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-direct
>            Reporter: Andrew Pilloud
>            Assignee: Andrew Pilloud
>            Priority: P1
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> This is a race, I have been unable to reproduce in an isolated test, but it 
> is trivial to reproduce in a google internal integration suite with the 
> following change to 
> runners/direct-java/src/main/java/org/apache/beam/runners/direct/ExecutorServiceParallelExecutor.java
> {code}
>        // Get an update; don't block forever if another thread has handled 
> it. The call to poll will
>        // wait the entire timeout; this call primarily exists to relinquish 
> any core.
>        VisibleExecutorUpdate update = 
> visibleUpdates.tryNext(Duration.millis(25L));
> +      Thread.sleep(100);
>  
>        if (update == null && pipelineState.get().isTerminal()) {
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to