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

 ##########
 File path: 
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/DefaultJobBundleFactory.java
 ##########
 @@ -375,6 +428,11 @@ public RemoteBundle getBundle(
         }
       }
 
+      // Ensure client is referenced for this bundle, unref in close()
+      client.ref();
+      // Cleanup list of clients which were active during eviction but now do 
not hold references
+      evictedActiveClients.removeIf(c -> c.bundleRefCount.get() <= 0);
 
 Review comment:
   This is a cheap operation. I don't think we can move it because we need to 
run this cleanup for all branches.

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

Reply via email to