Skip to content

Commit 3475b54

Browse files
Merge pull request #4607 from akkadotnet/dev
v1.4.11 Production Release
2 parents ad8ab55 + b1481bc commit 3475b54

File tree

142 files changed

+3832
-1091
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+3832
-1091
lines changed

RELEASE_NOTES.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
1-
#### 1.4.10 August 20th 2020 ####
1+
#### 1.4.11 November 5 2020 ####
2+
**Maintenance Release for Akka.NET 1.4**
3+
4+
Akka.NET v1.4.11 includes some significant additions to Akka.NET:
5+
6+
* [Akka: How prevent "Scheduled sending of heartbeat was delayed" and occasionally network partitions](https://github.com/akkadotnet/akka.net/issues/4432) - all `/system` actors now run on a dedicated dispatcher. This should significantly improve reliablity for Akka.Cluster, Akka.Persistence, and other built-in Akka.NET systems inside heavily utilized environments.
7+
* [Akka: Double wildcard implementation for ActorSelection](https://github.com/akkadotnet/akka.net/pull/4375)
8+
* [Akka.Remote: Null reference exception due to RemoteActorRefProvider.RemoteInternals](https://github.com/akkadotnet/akka.net/issues/4579)
9+
* [Akka.Persistence: Fix premature reset of the 'writeInProgress' flag in case of persistence failure](https://github.com/akkadotnet/akka.net/pull/4556)
10+
* [Akka.Cluster: disseminate downing decisions faste](https://github.com/akkadotnet/akka.net/pull/4598)
11+
* [Cluster - Add app-version to the Member information](https://github.com/akkadotnet/akka.net/pull/4577) - you can now specify which version of your software is running on each node.
12+
* [Akka.Cluster.Sharding: Bring ShardedDaemonProcess up to date](https://github.com/akkadotnet/akka.net/pull/4571)
13+
14+
To see the [full set of fixes in Akka.NET v1.4.11, please see the milestone on Github](https://github.com/akkadotnet/akka.net/milestone/42).
15+
16+
| COMMITS | LOC+ | LOC- | AUTHOR |
17+
| --- | --- | --- | --- |
18+
| 8 | 1020 | 164 | Gregorius Soedharmo |
19+
| 7 | 399 | 178 | Ismael Hamed |
20+
| 4 | 5 | 5 | dependabot-preview[bot] |
21+
| 4 | 108 | 104 | Aaron Stannard |
22+
| 2 | 232 | 26 | to11mtm |
23+
| 2 | 2 | 2 | Pierre Irrmann |
24+
| 2 | 1969 | 269 | zbynek001 |
25+
| 2 | 155 | 445 | huysentruitw |
26+
| 1 | 1 | 1 | Guillaume Caya-Letourneau |
27+
28+
#### 1.4.10 August 20 2020 ####
229
**Maintenance Release for Akka.NET 1.4**
330

431
Akka.NET v1.4.10 includes some minor bug fixes and some major feature additions to Akka.Persistence.Query:

build.fsx

+82-79
Large diffs are not rendered by default.

build.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $DotNetVersion = "3.1.105";
3535
$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";
3636
$NugetVersion = "4.3.0";
3737
$NugetUrl = "https://dist.nuget.org/win-x86-commandline/v$NugetVersion/nuget.exe"
38-
$ProtobufVersion = "3.4.0"
38+
$ProtobufVersion = "3.13.0"
3939
$DocfxVersion = "2.48.1"
4040

4141
$IncrementalistVersion = "0.2.2";

docs/articles/actors/dispatchers.md

+8
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ system.ActorOf(Props.Create<MyActor>().WithDispatcher("my-dispatcher"), "my-acto
7070
Some dispatcher configurations are available out-of-the-box for convenience. You can use them during actor deployment, [as described above](#configuring-dispatchers).
7171

7272
* **default-dispatcher** - A configuration that uses the [ThreadPoolDispatcher](#threadpooldispatcher). As the name says, this is the default dispatcher configuration used by the global dispatcher, and you don't need to define anything during deployment to use it.
73+
* **internal-dispatcher** - To protect the internal Actors that is spawned by the various Akka modules, a separate internal dispatcher is used by default.
7374
* **task-dispatcher** - A configuration that uses the [TaskDispatcher](#taskdispatcher).
7475
* **default-fork-join-dispatcher** - A configuration that uses the [ForkJoinDispatcher](#forkjoindispatcher).
7576
* **synchronized-dispatcher** - A configuration that uses the [SynchronizedDispatcher](#synchronizeddispatcher).
@@ -174,3 +175,10 @@ The following configuration keys are available for any dispatcher configuration:
174175

175176
> [!NOTE]
176177
> The throughput-deadline-time is used as a *best effort*, not as a *hard limit*. This means that if a message takes more time than the deadline allows, Akka.NET won't interrupt the process. Instead it will wait for it to finish before giving turn to the next actor.
178+
179+
## Dispatcher aliases
180+
181+
When a dispatcher is looked up, and the given setting contains a string rather than a dispatcher config block,
182+
the lookup will treat it as an alias, and follow that string to an alternate location for a dispatcher config.
183+
If the dispatcher config is referenced both through an alias and through the absolute path only one dispatcher will
184+
be used and shared among the two ids.

docs/articles/persistence/persistence-query.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The predefined queries are:
5050

5151
**AllPersistenceIdsQuery (PersistentIds) and CurrentPersistenceIdsQuery**
5252

53-
`AllPersistenceIds`, or `PersistenceIds` in `IPersistenceIdsQuery`, is used to retrieve all cached persistenceIds of all persistent actors inside the `ActorSystem` where the journal actor is instantiated. Note that since this is a cached value, this query will only report `PersistentIds` that passed to the journal since the journal creation time (local cache).
53+
`AllPersistenceIds` or `PersistenceIds`, and `CurrentPersistenceIds` in `IPersistenceIdsQuery` is used for retrieving all persistenceIds of all persistent actors.
5454

5555
```csharp
5656
var queries = PersistenceQuery.Get(actorSystem)
@@ -64,7 +64,7 @@ The returned event stream is unordered and you can expect different order for mu
6464

6565
The stream is not completed when it reaches the end of the currently used `PersistenceIds`, but it continues to push new `PersistenceIds` when new persistent actors are created. Corresponding query that is completed when it reaches the end of the currently used `PersistenceIds` is provided by `CurrentPersistenceIds`.
6666

67-
The write journal is notifying the query side as soon as new `PersistenceIds` are created and there is no periodic polling or batching involved in this query.
67+
Periodic polling of new `PersistenceIds` are done on the query side by retrieving the events in batches that sometimes can be delayed up to the configured `refresh-interval` or given `RefreshInterval` hint.
6868

6969
The stream is completed with failure if there is a failure in executing the query in the backend journal.
7070

docs/articles/remoting/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ akka {
9797
See [Akka Remote Reference Config File](https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka.Remote/Configuration/Remote.conf) for additional information on HOCON settings available in akka remote.
9898

9999
## Addresses, Transports, Endpoints, and Associations
100-
In the above section we mentioned that you have to bind a *transport* to an IP address and port, we did in that in HOCON inside the `dot-netty.tcp` section. Why did we have to do any of that?
100+
In the above section we mentioned that you have to bind a *transport* to an IP address and port, we did that in HOCON inside the `dot-netty.tcp` section. Why did we have to do any of that?
101101

102102
Well, let's take a step back to define some key terms you'll need to be familiar with in order to use Akka.Remote:
103103

docs/articles/utilities/circuit-breaker.md

+11-16
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,20 @@ The Akka.NET library provides an implementation of a circuit breaker called `Akk
1616
## What do they do?
1717

1818
* During normal operation, a circuit breaker is in the `Closed` state:
19-
* Exceptions or calls exceeding the configured `СallTimeout` increment a
20-
failure counter
21-
* Successes reset the failure count to zero
22-
* When the failure counter reaches a `MaxFailures` count, the breaker is
23-
tripped into `Open` state
19+
* Exceptions or calls exceeding the configured `СallTimeout` increment a failure counter
20+
* Successes reset the failure count to zero
21+
* When the failure counter reaches a `MaxFailures` count, the breaker is tripped into `Open` state
2422
* While in `Open` state:
25-
* All calls fail-fast with a `OpenCircuitException`
26-
* After the configured `ResetTimeout`, the circuit breaker enters a
27-
`Half-Open` state
23+
* All calls fail-fast with a `OpenCircuitException`
24+
* After the configured `ResetTimeout`, the circuit breaker enters a `Half-Open` state
2825
* In `Half-Open` state:
29-
* The first call attempted is allowed through without failing fast
30-
* All other calls fail-fast with an exception just as in `Open` state
31-
* If the first call succeeds, the breaker is reset back to `Closed` state
32-
* If the first call fails, the breaker is tripped again into the `Open` state
33-
for another full `ResetTimeout`
26+
* The first call attempted is allowed through without failing fast
27+
* All other calls fail-fast with an exception just as in `Open` state
28+
* If the first call succeeds, the breaker is reset back to `Closed` state and the `ResetTimeout` is reset
29+
* If the first call fails, the breaker is tripped again into the `Open` state (as for exponential backoff circuit breaker, the `ResetTimeout` is multiplied by the exponential backoff factor)
3430
* State transition listeners:
35-
* Callbacks can be provided for every state entry via `OnOpen`, `OnClose`,
36-
and `OnHalfOpen`
37-
* These are executed in the `ExecutionContext` provided.
31+
* Callbacks can be provided for every state entry via `OnOpen`, `OnClose`, and `OnHalfOpen`
32+
* These are executed in the `ExecutionContext` provided.
3833

3934
![Circuit breaker states](/images/circuit-breaker-states.png)
4035

src/common.props

+24-5
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@
22
<PropertyGroup>
33
<Copyright>Copyright © 2013-2020 Akka.NET Team</Copyright>
44
<Authors>Akka.NET Team</Authors>
5-
<VersionPrefix>1.4.8</VersionPrefix>
6-
<PackageIconUrl>http://getakka.net/images/akkalogo.png</PackageIconUrl>
5+
<VersionPrefix>1.4.11</VersionPrefix>
6+
<PackageIconUrl>https://getakka.net/images/akkalogo.png</PackageIconUrl>
77
<PackageProjectUrl>https://github.com/akkadotnet/akka.net</PackageProjectUrl>
88
<PackageLicenseUrl>https://github.com/akkadotnet/akka.net/blob/master/LICENSE</PackageLicenseUrl>
99
<NoWarn>$(NoWarn);CS1591;xUnit1013</NoWarn>
1010
</PropertyGroup>
1111
<PropertyGroup>
1212
<XunitVersion>2.4.1</XunitVersion>
13-
<TestSdkVersion>16.7.0</TestSdkVersion>
13+
<TestSdkVersion>16.7.1</TestSdkVersion>
1414
<HyperionVersion>0.9.16</HyperionVersion>
1515
<NewtonsoftJsonVersion>12.0.3</NewtonsoftJsonVersion>
1616
<NBenchVersion>2.0.1</NBenchVersion>
1717
<ProtobufVersion>3.13.0</ProtobufVersion>
1818
<NetCoreTestVersion>netcoreapp3.1</NetCoreTestVersion>
1919
<NetFrameworkTestVersion>net461</NetFrameworkTestVersion>
2020
<NetStandardLibVersion>netstandard2.0</NetStandardLibVersion>
21-
<NetFrameworkLibVersion>net452</NetFrameworkLibVersion>
2221
<FluentAssertionsVersion>4.14.0</FluentAssertionsVersion>
2322
<FsCheckVersion>2.14.3</FsCheckVersion>
2423
<HoconVersion>2.0.3</HoconVersion>
@@ -29,7 +28,27 @@
2928
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
3029
</PropertyGroup>
3130
<PropertyGroup>
32-
<PackageReleaseNotes>Placeholder for nightlies**</PackageReleaseNotes>
31+
<PackageReleaseNotes>Maintenance Release for Akka.NET 1.4**
32+
Akka.NET v1.4.11 includes some significant additions to Akka.NET:
33+
[Akka: How prevent "Scheduled sending of heartbeat was delayed" and occasionally network partitions](https://github.com/akkadotnet/akka.net/issues/4432) - all `/system` actors now run on a dedicated dispatcher. This should significantly improve reliablity for Akka.Cluster, Akka.Persistence, and other built-in Akka.NET systems inside heavily utilized environments.
34+
[Akka: Double wildcard implementation for ActorSelection](https://github.com/akkadotnet/akka.net/pull/4375)
35+
[Akka.Remote: Null reference exception due to RemoteActorRefProvider.RemoteInternals](https://github.com/akkadotnet/akka.net/issues/4579)
36+
[Akka.Persistence: Fix premature reset of the 'writeInProgress' flag in case of persistence failure](https://github.com/akkadotnet/akka.net/pull/4556)
37+
[Akka.Cluster: disseminate downing decisions faste](https://github.com/akkadotnet/akka.net/pull/4598)
38+
[Cluster - Add app-version to the Member information](https://github.com/akkadotnet/akka.net/pull/4577) - you can now specify which version of your software is running on each node.
39+
[Akka.Cluster.Sharding: Bring ShardedDaemonProcess up to date](https://github.com/akkadotnet/akka.net/pull/4571)
40+
To see the [full set of fixes in Akka.NET v1.4.11, please see the milestone on Github](https://github.com/akkadotnet/akka.net/milestone/42).
41+
| COMMITS | LOC+ | LOC- | AUTHOR |
42+
| --- | --- | --- | --- |
43+
| 8 | 1020 | 164 | Gregorius Soedharmo |
44+
| 7 | 399 | 178 | Ismael Hamed |
45+
| 4 | 5 | 5 | dependabot-preview[bot] |
46+
| 4 | 108 | 104 | Aaron Stannard |
47+
| 2 | 232 | 26 | to11mtm |
48+
| 2 | 2 | 2 | Pierre Irrmann |
49+
| 2 | 1969 | 269 | zbynek001 |
50+
| 2 | 155 | 445 | huysentruitw |
51+
| 1 | 1 | 1 | Guillaume Caya-Letourneau |</PackageReleaseNotes>
3352
</PropertyGroup>
3453
<!-- SourceLink support for all Akka.NET projects -->
3554
<ItemGroup>

src/contrib/cluster/Akka.Cluster.Metrics/Akka.Cluster.Metrics.csproj

+2-8
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,14 @@
44
<PropertyGroup>
55
<AssemblyTitle>Akka.Cluster.Metrics</AssemblyTitle>
66
<Description>
7-
The member nodes of the cluster can collect system health metrics and publish that to other cluster nodes
7+
The member nodes of the cluster can collect system health metrics and publish that to other cluster nodes
88
and to the registered subscribers on the system event bus with the help of Cluster Metrics Extension.
99
</Description>
1010
<TargetFramework>$(NetStandardLibVersion)</TargetFramework>
1111
<PackageTags>$(AkkaPackageTags);network;cluster;sharding</PackageTags>
1212
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1313
</PropertyGroup>
1414

15-
<ItemGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkLibVersion)' ">
16-
<Reference Include="System.Core" />
17-
<Reference Include="System.Xml.Linq" />
18-
<Reference Include="System.Data.DataSetExtensions" />
19-
</ItemGroup>
20-
2115
<ItemGroup>
2216
<ProjectReference Include="..\..\..\core\Akka.Cluster\Akka.Cluster.csproj" />
2317
</ItemGroup>
@@ -34,4 +28,4 @@
3428
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
3529
</PropertyGroup>
3630

37-
</Project>
31+
</Project>

src/contrib/cluster/Akka.Cluster.Sharding.Tests.MultiNode/ShardedDaemonProcessSpec.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void ShardedDaemonProcess_Should_Init_Actor_Set()
7575

7676
var probe = CreateTestProbe();
7777
ShardedDaemonProcess.Get(Sys).Init("the-fearless", 4, id => ProcessActor.Props(id, probe.Ref));
78-
EnterBarrier("actor-set-initialized");
78+
EnterBarrier("sharded-daemon-process-initialized");
7979

8080
RunOn(() =>
8181
{
@@ -87,7 +87,7 @@ public void ShardedDaemonProcess_Should_Init_Actor_Set()
8787
}).ToList();
8888
startedIds.Count.Should().Be(4);
8989
}, _config.First);
90-
EnterBarrier("actor-set-started");
90+
EnterBarrier("sharded-daemon-process-started");
9191
}
9292

9393
private void FormCluster(RoleName first, params RoleName[] rest)

src/contrib/cluster/Akka.Cluster.Sharding.Tests/ShardedDaemonProcessSpec.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public void ShardedDaemonProcess_must_start_N_actors_with_unique_ids()
100100

101101
var started = probe.ReceiveN(5);
102102
started.Count.ShouldBe(5);
103+
probe.ExpectNoMsg();
103104
}
104105

105106
[Fact]
@@ -123,7 +124,7 @@ public void ShardedDaemonProcess_must_not_run_if_the_role_does_not_match_node_ro
123124
Cluster.Get(Sys).Join(Cluster.Get(Sys).SelfAddress);
124125

125126
var probe = CreateTestProbe();
126-
var settings = ShardedDaemonProcessSettings.Create(Sys).WithShardingSettings(ClusterShardingSettings.Create(Sys).WithRole("workers"));
127+
var settings = ShardedDaemonProcessSettings.Create(Sys).WithRole("workers");
127128
ShardedDaemonProcess.Get(Sys).Init("roles", 3, id => MyActor.Props(id, probe.Ref), settings);
128129

129130
probe.ExpectNoMsg();

src/contrib/cluster/Akka.Cluster.Sharding/Akka.Cluster.Sharding.csproj

+1-11
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@
1818
<ProjectReference Include="..\Akka.DistributedData\Akka.DistributedData.csproj" />
1919
</ItemGroup>
2020

21-
<ItemGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkLibVersion)' ">
22-
<Reference Include="System.Core" />
23-
<Reference Include="System.Xml.Linq" />
24-
<Reference Include="System.Data.DataSetExtensions" />
25-
</ItemGroup>
26-
27-
<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkLibVersion)' ">
28-
<DefineConstants>$(DefineConstants);SERIALIZATION</DefineConstants>
29-
</PropertyGroup>
30-
3121
<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
3222
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
3323
</PropertyGroup>
@@ -36,4 +26,4 @@
3626
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
3727
</PropertyGroup>
3828

39-
</Project>
29+
</Project>

src/contrib/cluster/Akka.Cluster.Sharding/ClusterSharding.cs

+12-16
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public ClusterSharding(ExtendedActorSystem system)
262262
{
263263
var guardianName = system.Settings.Config.GetString("akka.cluster.sharding.guardian-name");
264264
var dispatcher = system.Settings.Config.GetString("akka.cluster.sharding.use-dispatcher");
265-
if (string.IsNullOrEmpty(dispatcher)) dispatcher = Dispatchers.DefaultDispatcherId;
265+
if (string.IsNullOrEmpty(dispatcher)) dispatcher = Dispatchers.InternalDispatcherId;
266266
return system.SystemActorOf(Props.Create(() => new ClusterShardingGuardian()).WithDispatcher(dispatcher), guardianName);
267267
});
268268
}
@@ -1253,15 +1253,9 @@ internal class RebalanceWorker : ActorBase, IWithTimers
12531253
/// <param name="from">TBD</param>
12541254
/// <param name="handOffTimeout">TBD</param>
12551255
/// <param name="regions">TBD</param>
1256-
/// <param name="shuttingDownRegions">TBD</param>
12571256
/// <returns>TBD</returns>
1258-
public static Props Props(string shard, IActorRef @from, TimeSpan handOffTimeout, IEnumerable<IActorRef> regions, IEnumerable<IActorRef> shuttingDownRegions)
1259-
{
1260-
if (shuttingDownRegions.Count() > regions.Count())
1261-
throw new ArgumentException($"'shuttingDownRegions' must be a subset of 'regions'.", nameof(shuttingDownRegions));
1262-
1263-
return Actor.Props.Create(() => new RebalanceWorker(shard, @from, handOffTimeout, regions, shuttingDownRegions));
1264-
}
1257+
public static Props Props(string shard, IActorRef @from, TimeSpan handOffTimeout, IEnumerable<IActorRef> regions) =>
1258+
Actor.Props.Create(() => new RebalanceWorker(shard, @from, handOffTimeout, regions));
12651259

12661260
private readonly ShardId _shard;
12671261
private readonly IActorRef _from;
@@ -1279,18 +1273,19 @@ public static Props Props(string shard, IActorRef @from, TimeSpan handOffTimeout
12791273
/// <param name="from">TBD</param>
12801274
/// <param name="handOffTimeout">TBD</param>
12811275
/// <param name="regions">TBD</param>
1282-
/// <param name="shuttingDownRegions">TBD</param>
1283-
public RebalanceWorker(string shard, IActorRef @from, TimeSpan handOffTimeout, IEnumerable<IActorRef> regions, IEnumerable<IActorRef> shuttingDownRegions)
1276+
public RebalanceWorker(string shard, IActorRef @from, TimeSpan handOffTimeout, IEnumerable<IActorRef> regions)
12841277
{
12851278
_shard = shard;
12861279
_from = @from;
12871280

1288-
foreach (var region in shuttingDownRegions)
1289-
Context.Watch(region);
1290-
12911281
_remaining = new HashSet<IActorRef>(regions);
12921282
foreach (var region in _remaining)
1283+
{
1284+
Context.Watch(region);
12931285
region.Tell(new PersistentShardCoordinator.BeginHandOff(shard));
1286+
}
1287+
1288+
Log.Debug("Rebalance [{0}] from region [{1}]", shard, regions);
12941289

12951290
Timers.StartSingleTimer("hand-off-timeout", ReceiveTimeout.Instance, handOffTimeout);
12961291
}
@@ -1305,14 +1300,15 @@ protected override bool Receive(object message)
13051300
switch (message)
13061301
{
13071302
case PersistentShardCoordinator.BeginHandOffAck hoa when _shard == hoa.Shard:
1308-
Log.Debug("BeginHandOffAck for shard [{0}] received from {1}.", _shard, Sender);
1303+
Log.Debug("BeginHandOffAck for shard [{0}] received from [{1}].", _shard, Sender);
13091304
Acked(Sender);
13101305
return true;
13111306
case Terminated t:
1312-
Log.Debug("ShardRegion {0} terminated while waiting for BeginHandOffAck for shard [{1}].", t.ActorRef, _shard);
1307+
Log.Debug("ShardRegion [{0}] terminated while waiting for BeginHandOffAck for shard [{1}].", t.ActorRef, _shard);
13131308
Acked(t.ActorRef);
13141309
return true;
13151310
case ReceiveTimeout _:
1311+
Log.Debug("Rebalance of [{0}] from [{1}] timed out", _shard, _from);
13161312
Done(false);
13171313
return true;
13181314
}

0 commit comments

Comments
 (0)