scwhittle commented on issue #26465:
URL: https://github.com/apache/beam/issues/26465#issuecomment-1764155906

   The issue here is that Latest.globally() is a separate triggered global 
Combine than the global Combine contained in View.asSingleton.  Thus if Latest 
triggers multiple times, the subsequent singleton combine may observe more than 
1 element when firing and fail.
   
   See
   https://www.mail-archive.com/user@beam.apache.org/msg02129.html
   
   A workaround is to use View.asIterable and take the last element of the 
iterable when consuming the side input.  There will be more than 1 element only 
if Latest triggers multiple times before the side input combine processes the 
output.
   
   @kennknowles What do you think about adding a new transform View.asLatest() 
that is logically the same as Latest.globally() + View.asSingleton() but is 
implemented with a single combine and thus the side input view will always be a 
single latest value each time it is calculated?


-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to