From 1215d0f4ede13e8ded236fd96301e6a4fc36a412 Mon Sep 17 00:00:00 2001 From: Jim Aho Date: Fri, 28 Jul 2023 00:58:04 +0200 Subject: [PATCH 1/4] Update member-roles.md (#6784) Co-authored-by: Aaron Stannard --- docs/articles/clustering/member-roles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/articles/clustering/member-roles.md b/docs/articles/clustering/member-roles.md index 80bf89785ec..1e48ef5381d 100644 --- a/docs/articles/clustering/member-roles.md +++ b/docs/articles/clustering/member-roles.md @@ -243,7 +243,7 @@ var storage = system.ActorOf("storage"); var webRouter = system.ActorOf(Props.Empty.WithRouter(FromConfig.Instance),"webdispatcher"); var fraudRouter = system.ActorOf(Props.Empty.WithRouter(FromConfig.Instance),"frauddispatcher"); var orderRouter = system.ActorOf(Props.Empty.WithRouter(FromConfig.Instance),"orderdispatcher"); -var billingRouter = system.ActorOf(Props.Empty.WithRouter(FromConfig.Instance),"billingispatcher"); +var billingRouter = system.ActorOf(Props.Empty.WithRouter(FromConfig.Instance),"billingdispatcher"); var storageRouter = system.ActorOf(Props.Empty.WithRouter(FromConfig.Instance),"storagedispatcher"); ``` From 7ee2dbb4dcfe95657c57e2327eddfcb98b2ecc53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 12:35:33 -0500 Subject: [PATCH 2/4] Bump Polyfill from 1.23.0 to 1.24.1 (#6858) Bumps [Polyfill](https://github.com/SimonCropp/Polyfill) from 1.23.0 to 1.24.1. - [Commits](https://github.com/SimonCropp/Polyfill/commits) --- updated-dependencies: - dependency-name: Polyfill dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/core/Akka/Akka.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Akka/Akka.csproj b/src/core/Akka/Akka.csproj index 21749739aff..96cb0eb0ce1 100644 --- a/src/core/Akka/Akka.csproj +++ b/src/core/Akka/Akka.csproj @@ -13,7 +13,7 @@ - + From 0c437026d785d9d6704b872ba273b3ef8ab1e223 Mon Sep 17 00:00:00 2001 From: Gregorius Soedharmo Date: Mon, 31 Jul 2023 21:08:13 +0700 Subject: [PATCH 3/4] Fix PersistenceQuery ReadJournalFor thread safety issue (#6859) --- .../Akka.Persistence.Query/PersistenceQuery.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/core/Akka.Persistence.Query/PersistenceQuery.cs b/src/core/Akka.Persistence.Query/PersistenceQuery.cs index d8fe409a692..a4914001226 100644 --- a/src/core/Akka.Persistence.Query/PersistenceQuery.cs +++ b/src/core/Akka.Persistence.Query/PersistenceQuery.cs @@ -19,6 +19,7 @@ public sealed class PersistenceQuery : IExtension private readonly ExtendedActorSystem _system; private readonly ConcurrentDictionary _readJournalPluginExtensionIds = new(); private ILoggingAdapter _log; + private readonly object _lock = new (); public static PersistenceQuery Get(ActorSystem system) { @@ -34,8 +35,18 @@ public PersistenceQuery(ExtendedActorSystem system) public TJournal ReadJournalFor(string readJournalPluginId) where TJournal : IReadJournal { - var plugin = _readJournalPluginExtensionIds.GetOrAdd(readJournalPluginId, path => CreatePlugin(path, GetDefaultConfig()).GetReadJournal()); - return (TJournal)plugin; + if(_readJournalPluginExtensionIds.TryGetValue(readJournalPluginId, out var plugin)) + return (TJournal)plugin; + + lock (_lock) + { + if (_readJournalPluginExtensionIds.TryGetValue(readJournalPluginId, out plugin)) + return (TJournal)plugin; + + plugin = CreatePlugin(readJournalPluginId, GetDefaultConfig()).GetReadJournal(); + _readJournalPluginExtensionIds[readJournalPluginId] = plugin; + return (TJournal)plugin; + } } private IReadJournalProvider CreatePlugin(string configPath, Config config) From 4df9a60bec7ab0a256c3e0db95a016911b6c862f Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Mon, 31 Jul 2023 13:49:13 -0500 Subject: [PATCH 4/4] update README to remove Gitter badge (#6861) * update README to remove Gitter badge * Added Discord badge * Added NuGet package version badge * Added NuGet download count badge * fix --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 294fe06c1ba..7a135d06a54 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,10 @@ ![Akka.NET logo](https://raw.githubusercontent.com/akkadotnet/akka.net/dev/docs/shfb/icons/AkkaNetLogo.Normal.png) -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/akkadotnet/akka.net?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Akka.NET Discord server](https://img.shields.io/discord/974500337396375553?label=Discord)](https://discord.gg/GSCfPwhbWP) +[![NuGet](https://img.shields.io/nuget/v/Akka.svg?style=flat-square)](https://www.nuget.org/packages/Akka) +[![Nuget](https://img.shields.io/nuget/dt/Akka)](https://www.nuget.org/packages/Akka) + **[Akka.NET](https://getakka.net/)** is a .NET port of the popular [Akka project](https://akka.io/) from the Scala / Java community. We are an idiomatic [.NET implementation of the actor model](https://petabridge.com/blog/akkadotnet-what-is-an-actor/) built on top of the .NET Common Language Runtime.