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: avoid call finalizeStage more times than once. #1650

Merged
merged 1 commit into from
Dec 31, 2024
Merged

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Dec 31, 2024

Motivation:
fix #1646

Modification:
Avoid calling finalizeStage(logic) many times.

Result:
No NPE on 1.1.x

forward port, there is no NPE on 1.1.x, but the finalizeStage can still be called many times.

@He-Pin He-Pin added bug Something isn't working t:stream Pekko Streams labels Dec 31, 2024
@He-Pin He-Pin added this to the 1.1.3 milestone Dec 31, 2024
@pjfanning pjfanning modified the milestones: 1.1.3, 1.2.0 Dec 31, 2024
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

@samueleresca
Copy link
Member

Overall, it looks good. Shouldn't the change also be applied to the finish finalizeStage call?

if (!isStageCompleted(logic)) finalizeStage(logic)

@He-Pin He-Pin merged commit 7fef5b7 into apache:main Dec 31, 2024
8 checks passed
@He-Pin He-Pin deleted the npe branch December 31, 2024 12:17
He-Pin added a commit to He-Pin/incubator-pekko that referenced this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Something isn't working t:stream Pekko Streams
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed : java.lang.NullPointerException: IN ActorGraphInterpreterSpec
3 participants