Skip to content

[Streams] Fix null exceptions being propagated on downstream completion#7497

Merged
Aaronontheweb merged 3 commits into
akkadotnet:devfrom
Arkatufus:streams/Fix-null-exception-bug
Feb 6, 2025
Merged

[Streams] Fix null exceptions being propagated on downstream completion#7497
Aaronontheweb merged 3 commits into
akkadotnet:devfrom
Arkatufus:streams/Fix-null-exception-bug

Conversation

@Arkatufus
Copy link
Copy Markdown
Contributor

@Arkatufus Arkatufus commented Feb 6, 2025

Fixes akkadotnet/Akka.Persistence.Sql#498

Changes

Replace null Exception with an empty exception to prevent stages from dying from improper task continuation handling.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Copy link
Copy Markdown
Contributor Author

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

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

Self-review

Comment on lines +1303 to +1306
// Some stages might propagate null exceptions due to improper Task continuation handling
// (see https://github.com/akkadotnet/Akka.Persistence.Sql/issues/498)
// This is a stop gap solution to make sure that Akka.Streams doesn't behave improperly
// until we can fix all of those
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Document the reason in the code for future developers

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +1303 to +1306
// Some stages might propagate null exceptions due to improper Task continuation handling
// (see https://github.com/akkadotnet/Akka.Persistence.Sql/issues/498)
// This is a stop gap solution to make sure that Akka.Streams doesn't behave improperly
// until we can fix all of those
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Aaronontheweb Aaronontheweb added this to the 1.5.38 milestone Feb 6, 2025
@Aaronontheweb
Copy link
Copy Markdown
Member

Well the code looks good in spirit sans the compilation error :p

@Arkatufus
Copy link
Copy Markdown
Contributor Author

It should be fixed now

@Aaronontheweb Aaronontheweb merged commit 1b52686 into akkadotnet:dev Feb 6, 2025
Arkatufus added a commit to Arkatufus/akka.net that referenced this pull request Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stream cancellation exception can be null

2 participants