Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correctly handle sequential calls to SingleFlightGroup #1251

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ianbotsf
Copy link
Contributor

Issue #

(none)

Description of changes

Fixes a bug that caused subsequent invocations of SingleFlightGroup.singleFlight to reuse previously-completed jobs even when they'd completed before the subsequent call began.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ianbotsf ianbotsf requested a review from a team as a code owner February 28, 2025 17:12

This comment has been minimized.

assertEquals("Foo", first)

val second = group.singleFlight { "Bar" }
assertEquals("Bar", second) // Fails; second == "Foo"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Stray comment? This command no longer fails

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep forgot to remove that.

This comment has been minimized.

Copy link

github-actions bot commented Mar 1, 2025

Affected Artifacts

Changed in size
Artifact Pull Request (bytes) Latest Release (bytes) Delta (bytes) Delta (percentage)
runtime-core-jvm.jar 827,326 827,267 59 0.01%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants