Skip to content

v1.4.8 Release #4479

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

Merged
merged 20 commits into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d69ddd0
added v1.4.8 placeholder for nightlies
Aaronontheweb May 27, 2020
27ecc47
Fix dotnet SDK to 3.1.100 on all Azure Pipelines script (#4450)
Arkatufus Jun 3, 2020
48ce8e9
Bump Google.Protobuf from 3.12.1 to 3.12.2 (#4445)
dependabot-preview[bot] Jun 3, 2020
c0affa7
Mute deadletter logging of cluster events (#4456)
ismaelhamed Jun 8, 2020
b49123f
Add PR validation support for feature/* branches (#4461)
Aaronontheweb Jun 8, 2020
d7c8c85
Update pr-validation.yaml for Azure Pipelines
Aaronontheweb Jun 8, 2020
dd90e05
added ActorSystemSetup overload for TestKits (#4464)
Aaronontheweb Jun 9, 2020
5a62272
Bump Microsoft.Extensions.DependencyModel from 3.1.4 to 3.1.5 (#4466)
dependabot-preview[bot] Jun 10, 2020
be7ec95
Bump FsCheck from 2.14.2 to 2.14.3 (#4467)
dependabot-preview[bot] Jun 10, 2020
08d3b95
Bump Microsoft.Data.SQLite from 3.1.4 to 3.1.5 (#4468)
dependabot-preview[bot] Jun 10, 2020
60b5537
Bump FsCheck.Xunit from 2.14.2 to 2.14.3 (#4469)
dependabot-preview[bot] Jun 10, 2020
3a6ddc8
Bump Google.Protobuf from 3.12.2 to 3.12.3 (#4452)
dependabot-preview[bot] Jun 11, 2020
8bc2a1c
Changed Akka.Streams backoff error logging to include full exception …
Horusiath Jun 16, 2020
d7d8df4
added spec to validate programmatic ActorSystem override (#4473)
Aaronontheweb Jun 16, 2020
d76f406
Upgrade donet SDK to 3.1.105 (#4475)
Arkatufus Jun 17, 2020
5e559f7
Backport of the feature called ClusterDistribution in Lagom (#4455)
ismaelhamed Jun 17, 2020
7592725
Fix/4434 idle cpu - removing unused #if compile time conditionals (#4…
Aaronontheweb Jun 17, 2020
21736fd
Idle CPU fixes (#4476)
Aaronontheweb Jun 17, 2020
8762958
Bump Hyperion from 0.9.15 to 0.9.16 (#4477)
dependabot-preview[bot] Jun 17, 2020
f43f370
added v1.4.8 release notes (#4478)
Aaronontheweb Jun 17, 2020
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
20 changes: 20 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
#### 1.4.8 June 17 2020 ####
**Maintenance Release for Akka.NET 1.4**

Akka.NET v1.4.8 features some important bug fixes for Akka.NET v1.4:

* [Akka: fix issue with setting IActorRefProvider via BootstrapSetup](https://github.com/akkadotnet/akka.net/pull/4473)
* [Akka.Cluster: Akka v1.4 Idle CPU usage increased comparing v1.3](https://github.com/akkadotnet/akka.net/issues/4434)
* [Akka.Cluster.Sharding: Backport of the feature called ClusterDistribution in Lagom](https://github.com/akkadotnet/akka.net/pull/4455)
* [Akka.TestKit: added ActorSystemSetup overload for TestKits](https://github.com/akkadotnet/akka.net/pull/4464)

To see the [full set of fixes in Akka.NET v1.4.8, please see the milestone on Github](https://github.com/akkadotnet/akka.net/milestone/39).

| COMMITS | LOC+ | LOC- | AUTHOR |
| --- | --- | --- | --- |
| 7 | 310 | 24 | Aaron Stannard |
| 6 | 8 | 8 | dependabot-preview[bot] |
| 2 | 669 | 10 | Ismael Hamed |
| 2 | 38 | 27 | Gregorius Soedharmo |
| 1 | 1 | 1 | Bartosz Sypytkowski |

#### 1.4.7 May 26 2020 ####
**Maintenance Release for Akka.NET 1.4**

Expand Down
5 changes: 5 additions & 0 deletions build-system/azure-pipeline.mntr-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 3.1.105'
inputs:
packageType: sdk
version: 3.1.105
- task: Bash@3
displayName: Linux / OSX Build
inputs:
Expand Down
5 changes: 5 additions & 0 deletions build-system/azure-pipeline.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 3.1.105'
inputs:
packageType: sdk
version: 3.1.105
- task: Bash@3
displayName: Linux / OSX Build
inputs:
Expand Down
5 changes: 5 additions & 0 deletions build-system/nightly-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ variables:
- group: nugetKeys #create this group with SECRET variables `nugetKey`

steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 3.1.105'
inputs:
packageType: sdk
version: 3.1.105
- task: BatchScript@1
displayName: 'FAKE Build'
inputs:
Expand Down
8 changes: 7 additions & 1 deletion build-system/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ trigger:
- dev
- v1.*
- master
- feature/*

pr:
autoCancel: true # indicates whether additional pushes to a PR should cancel in-progress runs for the same PR. Defaults to true
branches:
include: [ dev, v1.*, master ] # branch names which will trigger a build
include: [ dev, v1.*, master, feature/* ] # branch names which will trigger a build

name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

Expand All @@ -25,6 +26,11 @@ jobs:
clean: false # whether to fetch clean each time
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: true
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 3.1.105'
inputs:
packageType: sdk
version: 3.1.105
- task: BatchScript@1
displayName: Windows Build
inputs:
Expand Down
5 changes: 5 additions & 0 deletions build-system/windows-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ variables:
- name: githubRepositoryName
value: akkadotnet/akka.net
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 3.1.105'
inputs:
packageType: sdk
version: 3.1.105
- task: BatchScript@1
displayName: 'FAKE Build'
inputs:
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Param(

$FakeVersion = "4.63.0"
$DotNetChannel = "LTS";
$DotNetVersion = "3.1.100";
$DotNetVersion = "3.1.105";
$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";
$NugetVersion = "4.3.0";
$NugetUrl = "https://dist.nuget.org/win-x86-commandline/v$NugetVersion/nuget.exe"
Expand Down
31 changes: 31 additions & 0 deletions docs/articles/clustering/cluster-sharded-daemon-process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Sharded Daemon Process

> [!WARNING]
>This module is currently marked as [may change](../utilities/may-change.md) because it is a new feature that
>needs feedback from real usage before finalizing the API. This means that API or semantics can change without
>warning or deprecation period. It is also not recommended to use this module in production just yet.

## Introduction

Sharded Daemon Process provides a way to run `N` actors, each given a numeric id starting from `0` that are then kept alive
and balanced across the cluster. When a rebalance is needed the actor is stopped and, triggered by a keep alive running on
all nodes, started on a new node (the keep alive should be seen as an implementation detail and may change in future versions).

The intended use case is for splitting data processing workloads across a set number of workers that each get to work on a subset
of the data that needs to be processed. This is commonly needed to create projections based on the event streams available
from all the [Persistent Actors](../persistence/event-sourcing.md) in a CQRS application. Events are tagged with one out of `N` tags
used to split the workload of consuming and updating a projection between `N` workers.

For cases where a single actor needs to be kept alive see [Cluster Singleton](cluster-singleton.md)

## Basic example

To set up a set of actors running with Sharded Daemon process each node in the cluster needs to run the same initialization
when starting up:

[!code-csharp[ShardedDaemonProcessSpec.cs](../../../src/contrib/cluster/Akka.Cluster.Sharding.Tests/ShardedDaemonProcessSpec.cs?name=tag-processing)]

## Scalability

This cluster tool is intended for small numbers of consumers and will not scale well to a large set. In large clusters
it is recommended to limit the nodes the sharded daemon process will run on using a role.
2 changes: 2 additions & 0 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
href: clustering/cluster-client.md
- name: Cluster Sharding
href: clustering/cluster-sharding.md
- name: Sharded Daemon Process
href: clustering/cluster-sharded-daemon-process.md
- name: Cluster Metrics
href: clustering/cluster-metrics.md
- name: Distributed Data
Expand Down
24 changes: 5 additions & 19 deletions src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Copyright>Copyright © 2013-2020 Akka.NET Team</Copyright>
<Authors>Akka.NET Team</Authors>
<VersionPrefix>1.4.4</VersionPrefix>
<VersionPrefix>1.4.8</VersionPrefix>
<PackageIconUrl>http://getakka.net/images/akkalogo.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/akkadotnet/akka.net</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/akkadotnet/akka.net/blob/master/LICENSE</PackageLicenseUrl>
Expand All @@ -11,16 +11,16 @@
<PropertyGroup>
<XunitVersion>2.4.1</XunitVersion>
<TestSdkVersion>16.6.1</TestSdkVersion>
<HyperionVersion>0.9.15</HyperionVersion>
<HyperionVersion>0.9.16</HyperionVersion>
<NewtonsoftJsonVersion>12.0.3</NewtonsoftJsonVersion>
<NBenchVersion>2.0.1</NBenchVersion>
<ProtobufVersion>3.12.1</ProtobufVersion>
<ProtobufVersion>3.12.3</ProtobufVersion>
<NetCoreTestVersion>netcoreapp3.1</NetCoreTestVersion>
<NetFrameworkTestVersion>net461</NetFrameworkTestVersion>
<NetStandardLibVersion>netstandard2.0</NetStandardLibVersion>
<NetFrameworkLibVersion>net452</NetFrameworkLibVersion>
<FluentAssertionsVersion>4.14.0</FluentAssertionsVersion>
<FsCheckVersion>2.14.2</FsCheckVersion>
<FsCheckVersion>2.14.3</FsCheckVersion>
<HoconVersion>2.0.3</HoconVersion>
<ConfigurationManagerVersion>4.7.0</ConfigurationManagerVersion>
<AkkaPackageTags>akka;actors;actor model;Akka;concurrency</AkkaPackageTags>
Expand All @@ -29,21 +29,7 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup>
<PackageReleaseNotes>Maintenance Release for Akka.NET 1.4**
Akka.NET v1.4.4 includes one major fix for HOCON fallback configurations, a new module (Akka.Coordination), and some major improvements to Akka.Cluster.Tools / Akka.Cluster.Sharding:
[Akka.Coordination: Lease API &amp; integration](https://github.com/akkadotnet/akka.net/pull/4344)
[Akka: Timers for self scheduled messages added, FSM timers fixes](https://github.com/akkadotnet/akka.net/pull/3778)
[Akka **Important** Bugfix: Config.WithFallback is acting inconsistently](https://github.com/akkadotnet/akka.net/pull/4358)
[Akka.Cluster.Sharding: Updates](https://github.com/akkadotnet/akka.net/pull/4354)
To see the full set of changes for Akka.NET 1.4.4, please [see the 1.4.4 milestone](https://github.com/akkadotnet/akka.net/milestone/35).
| COMMITS | LOC+ | LOC- | AUTHOR |
| --- | --- | --- | --- |
| 3 | 4845 | 225 | zbynek001 |
| 2 | 3 | 3 | dependabot-preview[bot] |
| 2 | 159 | 0 | Aaron Stannard |
| 2 | 1099 | 23 | Gregorius Soedharmo |
| 1 | 34 | 5 | Petri Kero |
| 1 | 1 | 1 | Felix Reisinger |</PackageReleaseNotes>
<PackageReleaseNotes>Placeholder for nightlies**</PackageReleaseNotes>
</PropertyGroup>
<!-- SourceLink support for all Akka.NET projects -->
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
//-----------------------------------------------------------------------
// <copyright file="ClusterShardingSpec.cs" company="Akka.NET Project">
// Copyright (C) 2009-2020 Lightbend Inc. <http://www.lightbend.com>
// Copyright (C) 2013-2020 .NET Foundation <https://github.com/akkadotnet/akka.net>
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Linq;
using Akka.Actor;
using Akka.Cluster.TestKit;
using Akka.Cluster.Tools.Singleton;
using Akka.Configuration;
using Akka.Remote.TestKit;
using FluentAssertions;

namespace Akka.Cluster.Sharding.Tests.MultiNode
{
public class ShardedDaemonProcessSpecConfig : MultiNodeConfig
{
public RoleName First { get; }
public RoleName Second { get; }
public RoleName Third { get; }

public ShardedDaemonProcessSpecConfig()
{
First = Role("first");
Second = Role("second");
Third = Role("third");

CommonConfig = DebugConfig(false)
.WithFallback(ConfigurationFactory.ParseString(@"
akka.loglevel = INFO
akka.cluster.sharded-daemon-process {{
sharding {{
# First is likely to be ignored as shard coordinator not ready
retry-interval = 0.2s
}}
# quick ping to make test swift
keep-alive-interval = 1s
}}
"))
.WithFallback(ClusterSharding.DefaultConfig())
.WithFallback(ClusterSingletonManager.DefaultConfig())
.WithFallback(MultiNodeClusterSpec.ClusterConfig());
}
}

public class ShardedDaemonProcessMultiNode : ShardedDaemonProcessSpec
{
public ShardedDaemonProcessMultiNode() : this(new ShardedDaemonProcessSpecConfig()) { }
protected ShardedDaemonProcessMultiNode(ShardedDaemonProcessSpecConfig config) : base(config, typeof(ShardedDaemonProcessMultiNode)) { }
}

public abstract class ShardedDaemonProcessSpec : MultiNodeClusterSpec
{
private readonly ShardedDaemonProcessSpecConfig _config;

protected ShardedDaemonProcessSpec(ShardedDaemonProcessSpecConfig config, Type type)
: base(config, type)
{
_config = config;
}

[MultiNodeFact]
public void ShardedDaemonProcess_Specs()
{
ShardedDaemonProcess_Should_Init_Actor_Set();
}

public void ShardedDaemonProcess_Should_Init_Actor_Set()
{
// HACK
RunOn(() => FormCluster(_config.First, _config.Second, _config.Third), _config.First);

var probe = CreateTestProbe();
ShardedDaemonProcess.Get(Sys).Init("the-fearless", 4, id => ProcessActor.Props(id, probe.Ref));
EnterBarrier("actor-set-initialized");

RunOn(() =>
{
var startedIds = Enumerable.Range(0, 4).Select(_ =>
{
var evt = probe.ExpectMsg<ProcessActorEvent>(TimeSpan.FromSeconds(5));
evt.Event.Should().Be("Started");
return evt.Id;
}).ToList();
startedIds.Count.Should().Be(4);
}, _config.First);
EnterBarrier("actor-set-started");
}

private void FormCluster(RoleName first, params RoleName[] rest)
{
RunOn(() =>
{
Cluster.Join(GetAddress(first));
AwaitAssert(() =>
{
Cluster.State.Members.Select(i => i.UniqueAddress).Should().Contain(Cluster.SelfUniqueAddress);
Cluster.State.Members.Select(i => i.Status).Should().OnlyContain(i => i == MemberStatus.Up);
});
}, first);
EnterBarrier(first.Name + "-joined");

foreach (var node in rest)
{
RunOn(() =>
{
Cluster.Join(GetAddress(first));
AwaitAssert(() =>
{
Cluster.State.Members.Select(i => i.UniqueAddress).Should().Contain(Cluster.SelfUniqueAddress);
Cluster.State.Members.Select(i => i.Status).Should().OnlyContain(i => i == MemberStatus.Up);
});
}, node);
}
EnterBarrier("all-joined");
}
}

internal class ProcessActor : UntypedActor
{
#region Protocol

[Serializable]
public sealed class Stop
{
public static readonly Stop Instance = new Stop();
private Stop() { }
}

#endregion

public static Props Props(int id, IActorRef probe) =>
Actor.Props.Create(() => new ProcessActor(id, probe));

public ProcessActor(int id, IActorRef probe)
{
Probe = probe;
Id = id;
}

public IActorRef Probe { get; }
public int Id { get; }

protected override void PreStart()
{
base.PreStart();
Probe.Tell(new ProcessActorEvent(Id, "Started"));
}

protected override void OnReceive(object message)
{
if (message is Stop)
{
Probe.Tell(new ProcessActorEvent(Id, "Stopped"));
Context.Stop(Self);
}
}
}

internal sealed class ProcessActorEvent
{
public ProcessActorEvent(int id, object @event)
{
Id = id;
Event = @event;
}

public int Id { get; }
public object Event { get; }
}
}
Loading