File tree Expand file tree Collapse file tree
client/src/main/java/com/microsoft/durabletask Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,7 +208,10 @@ public void startAndBlock() {
208208 } catch (Throwable e ) {
209209 TracingHelper .endSpan (orchestrationSpan , e );
210210 orchestrationScope .close ();
211- throw e ;
211+ if (e instanceof Error ) {
212+ throw (Error ) e ;
213+ }
214+ throw new RuntimeException (e );
212215 }
213216 orchestrationScope .close ();
214217 TracingHelper .endSpan (orchestrationSpan , null );
Original file line number Diff line number Diff line change @@ -181,12 +181,12 @@ public TaskOrchestration create() {
181181 taskOrchestratorResult = taskOrchestrationExecutor .execute (
182182 orchestratorRequest .getPastEventsList (),
183183 orchestratorRequest .getNewEventsList ());
184- } catch (Throwable e ) {
184+ } catch (Exception e ) {
185185 TracingHelper .endSpan (orchestrationSpan , e );
186- orchestrationScope .close ();
187186 throw e instanceof RuntimeException ? (RuntimeException ) e : new RuntimeException (e );
187+ } finally {
188+ orchestrationScope .close ();
188189 }
189- orchestrationScope .close ();
190190 TracingHelper .endSpan (orchestrationSpan , null );
191191
192192 OrchestratorService .OrchestratorResponse response = OrchestratorService .OrchestratorResponse .newBuilder ()
Original file line number Diff line number Diff line change @@ -887,6 +887,8 @@ private void processEvent(HistoryEvent e) {
887887 this .setVersion (version );
888888 if (startedEvent .hasParentTraceContext ()) {
889889 this .parentTraceContext = startedEvent .getParentTraceContext ();
890+ } else {
891+ this .parentTraceContext = null ;
890892 }
891893 TaskOrchestrationFactory factory = TaskOrchestrationExecutor .this .orchestrationFactories .get (name );
892894 if (factory == null ) {
You can’t perform that action at this time.
0 commit comments