Skip to content

Fix early return from YieldingSequenceBase#accumulate.#9293

Merged
ccaominh merged 1 commit intoapache:masterfrom
gianm:fix-ysb
Jan 30, 2020
Merged

Fix early return from YieldingSequenceBase#accumulate.#9293
ccaominh merged 1 commit intoapache:masterfrom
gianm:fix-ysb

Conversation

@gianm
Copy link
Contributor

@gianm gianm commented Jan 30, 2020

Fixes #9291.

@gianm gianm added the Bug label Jan 30, 2020
*/
public class LimitedSequenceTest
{
private static final List<Integer> NUMS = Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this can also be used in testNoSideEffects()

Copy link
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤘

@gianm
Copy link
Contributor Author

gianm commented Jan 30, 2020

By the way, for the record, I'm not sure if this bug has production impacts. I found it while working on some test cases for a different patch. A LimitedSequence I was using had a threshold of 2 but was only returning 1 element due to this early-return problem.

@ccaominh ccaominh merged commit 07a91f9 into apache:master Jan 30, 2020
gianm added a commit to gianm/druid that referenced this pull request Jan 31, 2020
I think a mid-air collision between apache#9260 and apache#9293 has led to
master being unable to pass insepctions in TeamCity. Hopefully
this fixes it.
gianm added a commit that referenced this pull request Jan 31, 2020
I think a mid-air collision between #9260 and #9293 has led to
master being unable to pass insepctions in TeamCity. Hopefully
this fixes it.
@jihoonson jihoonson added this to the 0.18.0 milestone Mar 26, 2020
@gianm gianm deleted the fix-ysb branch September 23, 2022 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YieldingSequenceBase "accumulate" method returns too early sometimes

4 participants