TanuSharma2511 commented on code in PR #35373:
URL: https://github.com/apache/beam/pull/35373#discussion_r2182237254


##########
sdks/python/apache_beam/io/gcp/bigquery.py:
##########
@@ -1712,9 +1712,15 @@ def _flush_batch(self, destination):
         # The log level is:
         # - WARNING when we are continuing to retry, and have a deadline.
         # - ERROR when we will no longer retry, or MAY retry forever.
-        log_level = (
-            logging.WARN if should_retry or self._retry_strategy
-            != RetryStrategy.RETRY_ALWAYS else logging.ERROR)
+        if (self._retry_strategy == RetryStrategy.RETRY_ON_TRANSIENT_ERROR and
+            not should_retry):
+          log_level = logging.ERROR
+        elif self._retry_strategy == RetryStrategy.RETRY_NEVER:
+          log_level = logging.ERROR
+        elif should_retry or self._retry_strategy != 
RetryStrategy.RETRY_ALWAYS:

Review Comment:
   Warning will show for RETRY_ON_TRANSIENT_ERROR(with should retry) and for 
should_retry errors but as per the original comments: # - WARNING when we are 
continuing to retry, and have a deadline.
           # - ERROR when we will no longer retry, or MAY retry forever.
   
   RETRY_ALWAYS comes in retry forever category, thats why Retry_ALWAYS is 
classified as error logs. Please let me know if there are any changes needed.



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