druid/processing
Kashif Faraz f4ad5d001b
FrameChannelMerger: Fix incorrect behavior of finished(). (#17088) (#17194)
Previously, the processor used "remainingChannels" to track the number of
non-null entries of currentFrame. Now, "remainingChannels" tracks the
number of channels that are unfinished.

The difference is subtle. In the previous code, when an input channel
was blocked upon exiting nextFrame(), the "currentFrames" entry would be
null, and therefore the "remainingChannels" variable would be decremented.
After the next await and call to populateCurrentFramesAndTournamentTree(),
"remainingChannels" would be incremented if the channel had become
unblocked after awaiting.

This means that finished(), which returned true if remainingChannels was
zero, would not be reliable if called between nextFrame() and the
next await + populateCurrentFramesAndTournamentTree().

This patch changes things such that finished() is always reliable. This
fixes a regression introduced in PR #16911, which added a call to
finished() that was, at that time, unsafe.

Co-authored-by: Gian Merlino <gianmerlino@gmail.com>
2024-09-30 19:47:10 +05:30
..
src FrameChannelMerger: Fix incorrect behavior of finished(). (#17088) (#17194) 2024-09-30 19:47:10 +05:30
pom.xml Fix the maven warning during build (#16746) 2024-07-18 14:56:15 +08:00