ZipLatestWith backpressures if no elements are available from zipped sources #27416
Labels
1 - triaged
Tickets that are safe to pick up for contributing in terms of likeliness of being accepted
t:stream
zipLatestWith
operator promisses it will backpressure only when downstream backpressures. According my observations, this is true, but only after initial elements become available in both sources. This is really bad: say you have real data sourceS1
and a user inputs sourceS2
. You want tuples (data, user input) on output, so you usezipWithLatest
. But this will backpressure real data until first user input comes (someone may want this, but should be warned).The documentation
Backpressures when downstream backpressures
implieszipWithLatest
should drop latest elements from one stream if no element are available in the second one.I understand this is possibly breaking change, but at least documentation should be explicit about the operator behavior in its initial state and possibly mention recommended way to achieve drop-the-latest behavior in initial state.
This test fails. If I write 5 instead of 1000, I see
(1, 1), ... (5, 1)
instead of expected(5, 1)
(but that may be the design as discussed above)The text was updated successfully, but these errors were encountered: