Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions logs/log1755969060.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Log 1755969060

## Summary
- Reordered `StartMemberAsync` to call `BeginStartAsync` before `StartGossipActorAsync`, ensuring `MemberList` and `Remote` are initialized before gossip starts.
- Added a clarifying comment documenting the dependency.

## Motivation
`StartGossipActorAsync` accessed `MemberList` and the remote block list before they were initialized, leading to intermittent null-reference failures during cluster startup and tests.
4 changes: 2 additions & 2 deletions src/Proto.Cluster/Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ private void SubscribeToTopologyEvents() =>
/// </summary>
public async Task StartMemberAsync()
{
await BeginStartAsync(false).ConfigureAwait(false); // ensure MemberList and Remote are initialized
await Gossip.StartGossipActorAsync().ConfigureAwait(false);
await BeginStartAsync(false).ConfigureAwait(false);
//gossiper must be started whenever any topology events starts flowing
// gossiper must be started whenever any topology events starts flowing
await Gossip.StartgossipLoopAsync().ConfigureAwait(false);
MemberList.InitializeTopologyConsensus();
await Provider.StartMemberAsync(this).ConfigureAwait(false);
Expand Down
Loading