Skip to content

Fix DeferAsync causing CircuitBreaker to open during Persist#457

Open
Arkatufus wants to merge 1 commit intoakkadotnet:devfrom
Arkatufus:fix-DeferAsync-CircuitBreaker-failure
Open

Fix DeferAsync causing CircuitBreaker to open during Persist#457
Arkatufus wants to merge 1 commit intoakkadotnet:devfrom
Arkatufus:fix-DeferAsync-CircuitBreaker-failure

Conversation

@Arkatufus
Copy link
Contributor

@Arkatufus Arkatufus commented Feb 20, 2026

Fixes #455

The bug is here. When messages is empty, .ContinueWhenAll() throws because it requires at least one task, this causes circuit breaker to fail. If this happens multiple times, this will cause the circuit breaker to open and blocks all further persist calls.

Changes

Add empty message guard. Just return immediately if there are no messages to persist.

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.

DeferAsync causes circuit breaker failure

1 participant