gemini-code-assist[bot] commented on code in PR #38455:
URL: https://github.com/apache/beam/pull/38455#discussion_r3223526357
##########
sdks/python/apache_beam/utils/subprocess_server.py:
##########
@@ -91,7 +91,11 @@ def purge(self, owner):
to_delete = []
with self._lock:
if owner not in self._live_owners:
- raise ValueError(f"{owner} not in {self._live_owners}")
+ _LOGGER.warning(
+ "Subprocess owner %s already purged. If this occurs during atexit "
+ "shutdown, the subprocess was already cleaned up earlier.",
+ owner)
+ return
Review Comment:

The log message is quite verbose and specific to `atexit` shutdown. While
helpful for debugging the reported issue, it might be noisy if this occurs in
other contexts. Additionally, logging while holding a lock (`self._lock`) can
occasionally lead to performance bottlenecks or deadlocks depending on the
logging handler's implementation. Consider moving the log call outside the lock
block or reducing its severity to `DEBUG` if this is a common and expected
occurrence during shutdown.
--
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]