lukecwik commented on a change in pull request #16537:
URL: https://github.com/apache/beam/pull/16537#discussion_r786281423



##########
File path: 
sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/data/BeamFnDataInboundObserver2.java
##########
@@ -62,6 +62,9 @@ public static BeamFnDataInboundObserver2 forConsumers(
   private final Map<String, Map<String, EndpointStatus<TimerEndpoint<?>>>>
       transformIdToTimerFamilyIdToTimerEndpoint;
   private final CancellableQueue<BeamFnApi.Elements> queue;
+  // Share an exception used for close as constructing exception stack traces 
is expensive.
+  private static final Exception closeException =

Review comment:
       This will confuse people if we keep the original stack trace since it 
will be bound to the construction of this instance.
   
   We'll want to create an exception type or find an a suitable alternative 
that passes false for `writeableStackTrace`:
   
https://docs.oracle.com/javase/7/docs/api/java/lang/RuntimeException.html#RuntimeException(java.lang.String,%20java.lang.Throwable,%20boolean,%20boolean)




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