damccorm commented on code in PR #30679:
URL: https://github.com/apache/beam/pull/30679#discussion_r1532352373


##########
sdks/python/apache_beam/runners/worker/sdk_worker.py:
##########
@@ -607,12 +607,18 @@ def _schedule_periodic_shutdown(self):
     # type: () -> None
     def shutdown_inactive_bundle_processors():
       # type: () -> None
+      inactive_descriptor_ids = []
+      cur_time = time.time()
       with self._lock:
-        for descriptor_id, last_access_time in self.last_access_times.items():
-          if (time.time() - last_access_time >
+        # Shutdown can be expensive, keep out of lock
+        for descriptor_id, last_access_time in access_times:

Review Comment:
   Good catch got lost in my second round of changes



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to