-
Notifications
You must be signed in to change notification settings - Fork 1k
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
enable ChannelTaskScheduler
to work inside Akka.Cluster without causing errors inside /system
actors
#5861
Merged
Aaronontheweb
merged 12 commits into
akkadotnet:v1.4
from
Aaronontheweb:fix-channel-executor-startup
May 5, 2022
Merged
enable ChannelTaskScheduler
to work inside Akka.Cluster without causing errors inside /system
actors
#5861
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7b2fe34
close #5498
Aaronontheweb f4e5e11
fix `HeartbeatSender`
Aaronontheweb 66ddd88
cleaned up SBR internals (style)
Aaronontheweb 70f7248
cleaned up some comments
Aaronontheweb 5c648eb
Merge branch 'v1.4' into fix-channel-executor-startup
Aaronontheweb 26d12af
asynchronously attempt to acquire `Cluster` inside SBR
Aaronontheweb 3745a51
Merge branch 'fix-channel-executor-startup' of https://github.com/Aar…
Aaronontheweb 1002e2b
fixed SBR compilation
Aaronontheweb 5966640
Update SplitBrainResolver.cs
Aaronontheweb d6195aa
Merge branch 'v1.4' into fix-channel-executor-startup
Aaronontheweb cffd195
Merge branch 'v1.4' into fix-channel-executor-startup
Aaronontheweb 08a7b5c
subscribe on PreStart
Aaronontheweb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,16 +26,16 @@ internal sealed class ClusterHeartbeatReceiver : UntypedActor | |
{ | ||
// Important - don't use Cluster.Get(Context.System) in constructor because that would | ||
// cause deadlock. See startup sequence in ClusterDaemon. | ||
private readonly Lazy<Cluster> _cluster; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No real reason for a |
||
private readonly Cluster _cluster; | ||
|
||
public bool VerboseHeartbeat => _cluster.Value.Settings.VerboseHeartbeatLogging; | ||
public bool VerboseHeartbeat => _cluster.Settings.VerboseHeartbeatLogging; | ||
|
||
/// <summary> | ||
/// TBD | ||
/// </summary> | ||
public ClusterHeartbeatReceiver(Func<Cluster> getCluster) | ||
public ClusterHeartbeatReceiver(Cluster cluster) | ||
{ | ||
_cluster = new Lazy<Cluster>(getCluster); | ||
_cluster = cluster; | ||
} | ||
|
||
protected override void OnReceive(object message) | ||
|
@@ -44,8 +44,8 @@ protected override void OnReceive(object message) | |
{ | ||
case ClusterHeartbeatSender.Heartbeat hb: | ||
// TODO log the sequence nr once serializer is enabled | ||
if(VerboseHeartbeat) _cluster.Value.CurrentInfoLogger.LogDebug("Heartbeat from [{0}]", hb.From); | ||
Sender.Tell(new ClusterHeartbeatSender.HeartbeatRsp(_cluster.Value.SelfUniqueAddress, | ||
if(VerboseHeartbeat) _cluster.CurrentInfoLogger.LogDebug("Heartbeat from [{0}]", hb.From); | ||
Sender.Tell(new ClusterHeartbeatSender.HeartbeatRsp(_cluster.SelfUniqueAddress, | ||
hb.SequenceNr, hb.CreationTimeNanos)); | ||
break; | ||
default: | ||
|
@@ -54,7 +54,7 @@ protected override void OnReceive(object message) | |
} | ||
} | ||
|
||
public static Props Props(Func<Cluster> getCluster) | ||
public static Props Props(Cluster getCluster) | ||
{ | ||
return Akka.Actor.Props.Create(() => new ClusterHeartbeatReceiver(getCluster)); | ||
} | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid creating a delegate for the
Lazy<Cluster>
that we're removing from theHeartbeatReceiver