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

chore: Require parallelism >= 1 in MapAsync and MapAsyncUnordered #1700

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Jan 10, 2025

Motivation:
require parallelism >= 1 in MapAsync and MapAsyncUnordered

Modification:
Add requirements

@He-Pin He-Pin added the t:stream Pekko Streams label Jan 10, 2025
@He-Pin He-Pin added this to the 1.2.0 milestone Jan 10, 2025
@pjfanning
Copy link
Contributor

  • is it really possible to end up in a position where the requirement fails?
  • if so, can we add a test?
  • also, what would users of older versions see in this case? an exception, a nonsensical result?

@He-Pin
Copy link
Member Author

He-Pin commented Jan 10, 2025

@pjfanning The code is the same as it is in MapAsyncPartitioned

@pjfanning
Copy link
Contributor

pjfanning commented Jan 10, 2025

@pjfanning The code is the same as it is in MapAsyncPartitioned

  • this is still a change that reduces performance by adding a check that needs evaluation
  • we have lived with this for many years (Pekko and Akka)

Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

lgtm - I guess it is better to have to check even if it has a small perf impact

@He-Pin
Copy link
Member Author

He-Pin commented Jan 10, 2025

@pjfanning Thanks.

@He-Pin He-Pin merged commit b160861 into apache:main Jan 10, 2025
9 checks passed
@He-Pin He-Pin deleted the atLeast1 branch January 10, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:stream Pekko Streams
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants