tvalentyn commented on code in PR #30639:
URL: https://github.com/apache/beam/pull/30639#discussion_r1525603715


##########
sdks/python/apache_beam/runners/worker/data_plane.py:
##########
@@ -147,6 +148,10 @@ def maybe_flush(self):
   def flush(self):
     # type: () -> None
     if self._flush_callback:
+      if self.size() > _FLUSH_MAX_SIZE:
+        raise ValueError(
+            f'Buffer size {self.size()} exceeds GRPC limit {_FLUSH_MAX_SIZE}. '
+            'This is likely due to a single element that is too large.')

Review Comment:
   ```suggestion
               'This is likely due to a single element that is too large. '
               'To mitigate, store large elements in external storage systems, '
               'and use PCollections to pass their metadata, '
               'or use a custom coder that reduces the element's size.')
   ```



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