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

Deprecate ClusterSingleton.Init() and add missing singleton feature to ClusterSingletonSettings #7387

Merged

Conversation

Arkatufus
Copy link
Contributor

Changes

  • Deprecate ClusterSingleton.Init() method and all of its supporting classes
  • Add missing singleton detection feature to ClusterSingletonSettings

@Aaronontheweb
Copy link
Member

@Arkatufus looks like API approvals are missing

/// <summary>
/// Returns default HOCON configuration for the cluster singleton.
/// </summary>
/// <returns>TBD</returns>
Copy link
Member

Choose a reason for hiding this comment

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

Remove the TBD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Need to add API approvals and do one other minor bit of cleanup

"Akka.Cluster.Tools.Singleton.reference.conf");
}

// Cache for singleton proxies, remove in v1.6
private readonly ConcurrentDictionary<string, IActorRef> _proxies = new();
Copy link
Member

Choose a reason for hiding this comment

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

Yeah I agree we don't really need a cache for this - that's a little too clever for its own good.

@@ -40,6 +54,10 @@ public ClusterSingleton(ExtendedActorSystem system)
/// <para>If there already is a proxy running for the given `singletonName` on this node, an <see cref="IActorRef"/> to that is returned.</para>
/// </summary>
/// <returns>A proxy actor that can be used to communicate with the singleton in the cluster</returns>
[Obsolete("This convenience method is deprecated and will be removed in v1.6, " +
"please use ClusterSingletonManager.Props and ClusterSingletonProxy.Props directly instead. " +
"See https://getakka.net/community/whats-new/akkadotnet-v1.5-upgrade-advisories.html#upgrading-to-akkanet-v1532. " +
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@Arkatufus
Copy link
Contributor Author

Updated the API Approval list

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) November 14, 2024 15:30
@Aaronontheweb Aaronontheweb merged commit 36b0ec6 into akkadotnet:dev Nov 15, 2024
10 of 12 checks passed
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.

2 participants