Skip to content
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

ShardCoordinator: misc cleanup #7295

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public ClusterShardingGuardian(
{
// with the deprecated persistence state store mode we always use the event sourced provider for shard regions
// and no store for coordinator (the coordinator is a PersistentActor in that case)
RememberEntitiesStore rememberEntitiesProvider =
var rememberEntitiesProvider =
(settings.StateStoreMode == StateStoreMode.Persistence) ?
RememberEntitiesStore.Eventsourced : settings.RememberEntitiesStore;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public DDataShardCoordinator(
else
_stateWriteConsistency = new WriteMajorityPlus(settings.TuningParameters.UpdatingStateTimeout, settings.TuningParameters.CoordinatorStateWriteMajorityPlus, majorityMinCap);

Cluster node = Cluster.Get(Context.System);
var node = Cluster.Get(Context.System);
_selfUniqueAddress = node.SelfUniqueAddress;

_coordinatorStateKey = new LWWRegisterKey<CoordinatorState>(typeName + "CoordinatorState");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ public static Props Props(

private ILoggingAdapter Log { get { return _log ??= Context.GetLogger(); } }

public ITimerScheduler Timers { get; set; }
public ITimerScheduler Timers { get; set; } = null!;
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed a nullability warning here


/// <summary>
/// TBD
Expand Down
2 changes: 1 addition & 1 deletion src/contrib/cluster/Akka.Cluster.Sharding/ShardRegion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ internal static Props Props(
string coordinatorPath,
IMessageExtractor messageExtractor,
object handOffStopMessage,
IRememberEntitiesProvider rememberEntitiesProvider)
IRememberEntitiesProvider? rememberEntitiesProvider)
Copy link
Member Author

Choose a reason for hiding this comment

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

Another null warning fix here

{
return Actor.Props.Create(() => new ShardRegion(
typeName,
Expand Down