Backport 1.5.59 fixes#8034
Merged
Aaronontheweb merged 11 commits intoakkadotnet:v1.5from Jan 26, 2026
Merged
Conversation
…tnet#7988) * CoordinatedShutdown: clearly log the reason why we're exiting * fix log message
…7998) (akkadotnet#7999) DeferAsync with an async handler threw "RunTask calls cannot be nested" when called from within a CommandAsync handler after an await, when there were no pending persist operations. The fix removes the immediate RunTask execution optimization for async handlers and always queues them to _pendingInvocations. This avoids the nesting issue since the handler executes after the command handler completes. Added regression tests to verify the fix.
…xception (akkadotnet#8005) * Fix Inbox.AwaitResult throwing AggregateException instead of TimeoutException When FutureActorRef faults the task with a TimeoutException (via Status.Failure), accessing task.Result would throw AggregateException instead of the expected TimeoutException. This caused test assertions expecting TimeoutException to fail intermittently when the internal Kick message timeout won the race against task.Wait(timeout). The fix checks task.IsFaulted after Wait() returns and properly unwraps the exception before throwing, ensuring TimeoutException is thrown directly. * Increase DeltaCount expectation timeout in DistributedPubSubRestartSpec The default 3-second timeout was too tight for CI environments where ActorSystem initialization timing can vary. Increased to 10 seconds to provide more margin for the mediator to respond after a node restart. * Revert "Increase DeltaCount expectation timeout in DistributedPubSubRestartSpec" This reverts commit db14f2a.
…kkadotnet#8018) Ports two fixes from Apache Pekko to resolve flaky BroadcastHub tests: 1. Add startAfterNrOfConsumers parameter (Pekko PR akkadotnet#275 by He-Pin) - Allows BroadcastHub to buffer elements until N consumers connect - Eliminates need for racy Task.Delay in tests 2. Fix race condition in consumer PostStop (Pekko PR akkadotnet#1841) - Only send UnRegister if offsetInitialized is true - Prevents StreamDetachedException when consumer detaches early Both fixes are Apache 2.0 licensed from the Pekko project.
…#8006) * Fix logger initialization continuation race in LoggingBus StartDefaultLoggers was only waiting for the Ask task (logger ACK), not the continuation that publishes "Logger started" message. This caused the continuation to run during test teardown, triggering EventFilter assertions. The fix returns the continuation task from AddLogger and uses TaskContinuationOptions.ExecuteSynchronously to ensure the continuation runs immediately when the Ask completes, before WaitAll returns. * Add IsFaulted check for logger initialization Handle the case where the Ask operation fails with an exception, not just when it's cancelled. This ensures the logger is properly removed and unsubscribed if initialization throws an exception.
…tnet#7995) Captures Activity.Current?.Context at LogEvent creation time, enabling downstream logging backends (like OpenTelemetry) to correlate logs with their parent trace/span even after async dispatch through the actor mailbox. This addresses GitHub issue akkadotnet#6855 where Activity.Current is lost when log events cross actor mailbox boundaries due to AsyncLocal not flowing. Changes: - Add ActivityContext? property to LogEvent base class - Capture context in constructor before mailbox crossing - Add System.Diagnostics.DiagnosticSource package for netstandard2.0 - Add unit tests for trace context capture behavior - Update API approval baselines Co-authored-by: Gregorius Soedharmo <arkatufus@yahoo.com>
akkadotnet#8011) Apply defensive fix to MergeSeen that ensures the invariant Seen ⊆ Members is always maintained. The merged seen set is now intersected with current member addresses, preventing stale entries from corrupting gossip state. Closes akkadotnet#8009
Updates API verification files to reflect: - BroadcastHub.Sink<T>(int startAfterNrOfConsumers, int bufferSize) overload - LogEvent.ActivityContext property - LogEvent property setters changed to protected set
Documents all 8 backported PRs for the 1.5.59 release including: - Critical cluster gossip fix (akkadotnet#8011) - Bug fixes for logging, inbox, persistence, and TestKit - New features: ActivityContext capture and BroadcastHub improvements - CoordinatedShutdown logging enhancement
Version and PackageReleaseNotes updated by build.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picked fixes for 1.5.59 release from
devbranch.Included PRs
Conflict Resolutions
Sink<T>(int startAfterNrOfConsumers, int bufferSize)overloadActivityContextproperty and changed setter visibility toprotected set