ahmedabu98 commented on code in PR #41531:
URL: https://github.com/apache/beam/pull/41531#discussion_r4673571267


##########
sdks/python/apache_beam/runners/portability/portable_runner.py:
##########
@@ -218,15 +217,18 @@ def run(
              Iterator[beam_job_api_pb2.JobMessagesResponse]]:
     """Run the job"""
     try:
+      # Use a timeout only for the check below to keep it from hanging.
       state_stream = self.job_service.GetStateStream(
           beam_job_api_pb2.GetJobStateRequest(job_id=preparation_id),
           timeout=self.timeout)
       # If there's an error, we don't always get it until we try to read.
       # Fortunately, there's always an immediate current state published.
-      state_stream = itertools.chain([next(state_stream)], state_stream)
+      next(state_stream)

Review Comment:
   Not needed cuz the reference gets dropped when rebind. gRPC will cancel the 
call in __del__



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