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 2020/08/13 21:46:33 UTC

[GitHub] [beam] pabloem commented on a change in pull request #12558: [BEAM-10695] Fix InteractiveEnvironment cannot evict PCollection

pabloem commented on a change in pull request #12558:
URL: https://github.com/apache/beam/pull/12558#discussion_r470267221



##########
File path: sdks/python/apache_beam/runners/interactive/interactive_environment.py
##########
@@ -501,9 +501,11 @@ def evict_computed_pcollections(self, pipeline=None):
     is specified, evicts for all pipelines.
     """
     if pipeline:
+      discarded = set()
       for pcoll in self._computed_pcolls:
         if pcoll.pipeline is pipeline:
-          self._computed_pcolls.discard(pcoll)
+          discarded.add(pcoll)
+      self._computed_pcolls -= discarded

Review comment:
       Don't you need to call discard on `_computed_pcolls`?




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