shunping commented on code in PR #38432:
URL: https://github.com/apache/beam/pull/38432#discussion_r3221113523
##########
sdks/python/apache_beam/runners/worker/worker_pool_main.py:
##########
@@ -188,6 +190,15 @@ def StopWorker(
_LOGGER.info("Stopping worker %s" % stop_worker_request.worker_id)
kill_process_gracefully(worker_process)
+ # applicable for thread mode to ensure thread cleanup by
+ # unblocking the harness request stream.
+ worker_thread_harness = self._worker_threads.pop(
+ stop_worker_request.worker_id, None)
+ if worker_thread_harness:
+ _LOGGER.info("Stopping thread worker %s" % stop_worker_request.worker_id)
+ from apache_beam.utils.sentinel import Sentinel
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]