tweise commented on a change in pull request #11084: [BEAM-9474] Improve
robustness of BundleFactory and ProcessEnvironment
URL: https://github.com/apache/beam/pull/11084#discussion_r389980853
##########
File path:
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/environment/ProcessEnvironment.java
##########
@@ -64,13 +63,32 @@ public InstructionRequestHandler
getInstructionRequestHandler() {
}
@Override
- public void close() throws Exception {
- synchronized (lock) {
- if (!isClosed) {
- instructionHandler.close();
- processManager.stopProcess(workerId);
- isClosed = true;
+ public synchronized void close() throws Exception {
+ if (isClosed) {
+ return;
+ }
+ Exception exception = null;
+ try {
+ processManager.stopProcess(workerId);
+ } catch (Exception e) {
+ if (exception != null) {
Review comment:
Since `exception` is null, this should just be `exception = e`
----------------------------------------------------------------
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]
With regards,
Apache Git Services