You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/06/23 00:18:51 UTC

[GitHub] [beam] boyuanzz commented on a change in pull request #15062: [BEAM-12524] Ensure that failed BundleProcessor objects are not re-added to the cache.

boyuanzz commented on a change in pull request #15062:
URL: https://github.com/apache/beam/pull/15062#discussion_r656665867



##########
File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
##########
@@ -665,6 +667,11 @@ void release(String bundleDescriptorId, BundleProcessor bundleProcessor) {
       }
     }
 
+    /** Discard an active {@link BundleProcessor} instead of being re-used. */
+    void discard(BundleProcessor bundleProcessor) {
+      activeBundleProcessors.remove(bundleProcessor.getInstructionId());

Review comment:
       Do we want to do `bundleProcessor.setInstructionId(null);` before discarding it to avoid the same race condition as `reset`?




-- 
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:
users@infra.apache.org