rohdesamuel commented on a change in pull request #12799:
URL: https://github.com/apache/beam/pull/12799#discussion_r489790682



##########
File path: sdks/python/apache_beam/runners/interactive/recording_manager.py
##########
@@ -314,15 +330,55 @@ def cancel(self):
       r.wait_until_finish()
     self._recordings = set()
 
+    # The recordings rely on a reference to the BCJ to correctly finish. So we
+    # evict the BCJ after they complete.
+    ie.current_env().evict_background_caching_job(self.user_pipeline)
+
   def describe(self):
     # type: () -> dict[str, int]
 
     """Returns a dictionary describing the cache and recording."""
 
+    cache_manager = ie.current_env().get_cache_manager(self.user_pipeline)
+    capture_size = getattr(cache_manager, 'capture_size', 0)
+
     descriptions = [r.describe() for r in self._recordings]
-    size = sum(d['size'] for d in descriptions)
-    start = min(d['start'] for d in descriptions)
-    return {'size': size, 'start': start}
+    if descriptions:
+      size = sum(d['size'] for d in descriptions) + capture_size
+    else:
+      size = capture_size

Review comment:
       Done




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


Reply via email to