From ddb76d85ba1b06430f7fbfb03e4b83be722fe05c Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 2 Nov 2018 13:11:04 -0500 Subject: [PATCH 01/14] added v1.3.11 placeholder for nightlies (#3644) --- RELEASE_NOTES.md | 3 +++ src/common.props | 31 ++----------------------------- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 55a95c55ac9..b0e529046e6 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 1.3.11 November 2 2018 #### +*Placholder for nightlies* + #### 1.3.10 November 1 2018 #### **Maintenance Release for Akka.NET 1.3** diff --git a/src/common.props b/src/common.props index f12320588d2..87ae0083a7c 100644 --- a/src/common.props +++ b/src/common.props @@ -2,7 +2,7 @@ Copyright © 2013-2018 Akka.NET Team Akka.NET Team - 1.3.10 + 1.3.11 http://getakka.net/images/akkalogo.png https://github.com/akkadotnet/akka.net https://github.com/akkadotnet/akka.net/blob/master/LICENSE @@ -17,33 +17,6 @@ true - Maintenance Release for Akka.NET 1.3** -Akka.NET v1.3.10 consists mostly of bug fixes and patches to various parts of Akka.NET: -[Akka.Remote: add support for using installed certificates with thumbprints](https://github.com/akkadotnet/akka.net/issues/3632) -[Akka.IO: fix TCP sockets leak](https://github.com/akkadotnet/akka.net/issues/3630) -[Akka.DI.Core: Check if Dependency Resolver is configured to avoid a `NullReferenceException`](https://github.com/akkadotnet/akka.net/pull/3619) -[Akka.Streams: Interop between Akka.Streams and IObservable](https://github.com/akkadotnet/akka.net/pull/3112) -[HOCON: Parse size in bytes format. Parse microseconds and nanoseconds.](https://github.com/akkadotnet/akka.net/pull/3600) -[Akka.Cluster: Don't automatically down quarantined nodes](https://github.com/akkadotnet/akka.net/pull/3605) -To [see the full set of changes for Akka.NET 1.3.10, click here](https://github.com/akkadotnet/akka.net/milestone/28). -| COMMITS | LOC+ | LOC- | AUTHOR | -| --- | --- | --- | --- | -| 8 | 887 | 220 | Bartosz Sypytkowski | -| 5 | 67 | 174 | Aaron Stannard | -| 4 | 15 | 7 | Caio Proiete | -| 3 | 7 | 4 | Maciek Misztal | -| 2 | 60 | 8 | Marcus Weaver | -| 2 | 57 | 12 | moerwald | -| 2 | 278 | 16 | Peter Shrosbree | -| 2 | 2 | 2 | Fábio Beirão | -| 1 | 71 | 71 | Sean Gilliam | -| 1 | 6 | 0 | basbossinkdivverence | -| 1 | 24 | 5 | Ismael Hamed | -| 1 | 193 | 8 | to11mtm | -| 1 | 17 | 33 | zbynek001 | -| 1 | 12 | 3 | Oleksandr Bogomaz | -| 1 | 1 | 1 | MelnikovIG | -| 1 | 1 | 1 | Alex Villarreal | -| 1 | 1 | 0 | Yongjie Ma | + Placholder for nightlies* \ No newline at end of file From cc83915b294f5b4a41ec2f0608364141e5656258 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Mon, 5 Nov 2018 15:35:37 -0800 Subject: [PATCH 02/14] made it easier to generate local beta packages of Akka.NET (#3639) --- build.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.fsx b/build.fsx index 4cf36854224..2108c000062 100644 --- a/build.fsx +++ b/build.fsx @@ -29,7 +29,7 @@ let outputBinariesNet45 = outputBinaries @@ "net45" let outputBinariesNetStandard = outputBinaries @@ "netstandard1.6" let buildNumber = environVarOrDefault "BUILD_NUMBER" "0" -let preReleaseVersionSuffix = "beta" + (if (not (buildNumber = "0")) then (buildNumber) else "") +let preReleaseVersionSuffix = "beta" + (if (not (buildNumber = "0")) then (buildNumber) else DateTime.UtcNow.Ticks.ToString()) let versionSuffix = match (getBuildParam "nugetprerelease") with | "dev" -> preReleaseVersionSuffix From 772aa1704032f814e78c1a6c610327d24bb5e00f Mon Sep 17 00:00:00 2001 From: Oleksandr Kobylianskyi Date: Thu, 15 Nov 2018 11:48:30 +0200 Subject: [PATCH 03/14] Mention a correct test framework --- docs/articles/intro/tutorial-2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/articles/intro/tutorial-2.md b/docs/articles/intro/tutorial-2.md index eab461e6f14..b20ba70ca22 100644 --- a/docs/articles/intro/tutorial-2.md +++ b/docs/articles/intro/tutorial-2.md @@ -154,8 +154,8 @@ our device actor: We maintain the current temperature, initially set to `null`, and we simply report it back if queried. We also added fields for the ID of the device and the group it belongs to, which we will use later. -We can already write a simple test for this functionality @scala[(we use ScalaTest but any other test framework can be -used with the Akka.NET Testkit)]: +We can already write a simple test for this functionality (we are using xUnit but any other test framework can be +used with the Akka.NET Testkit): [!code-csharp[Main](../../examples/Tutorials/Tutorial2/DeviceSpec.cs?name=device-read-test)] From c0f98f3980142f9194c8906616cfd82ac54fab73 Mon Sep 17 00:00:00 2001 From: Ruben Mamo Date: Mon, 26 Nov 2018 23:26:39 +0100 Subject: [PATCH 04/14] Changed copyright and added CSS to fix links issue. #3393 --- docs/docfx.json | 2 +- docs/index.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docfx.json b/docs/docfx.json index 30ec529da74..b3c9aa4fa0e 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -66,7 +66,7 @@ "_appTitle": "Akka.NET Documentation", "_appLogoPath": "/images/akkalogo.png", "_appFaviconPath": "/images/favicon.ico", - "_appFooter": "Copyright © 2013-2017 Akka.NET project
Generated by DocFX", + "_appFooter": "Copyright © 2013-2018 Akka.NET project
Generated by DocFX", "_enableSearch": "true" }, "dest": "_site", diff --git a/docs/index.md b/docs/index.md index 6327e6daf42..9c80d4bbf6f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -16,6 +16,10 @@ img.main-logo{ h2:before{ display: none; } +.featured-box-minimal h4:before { + height: 0px; + margin-top: 0px; +}
From 805647cd7a50605a1ba4a19e8ed71915fdedbdcb Mon Sep 17 00:00:00 2001 From: Ismael Hamed Date: Fri, 30 Nov 2018 18:35:26 +0100 Subject: [PATCH 05/14] Provide minSequenceNr for snapshot deletion (#3641) --- docs/articles/persistence/snapshots.md | 5 ++++- .../Akka.Cluster.Sharding/PersistentShard.cs | 17 +++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/articles/persistence/snapshots.md b/docs/articles/persistence/snapshots.md index 62f9adc4668..3bf3941d390 100644 --- a/docs/articles/persistence/snapshots.md +++ b/docs/articles/persistence/snapshots.md @@ -45,7 +45,10 @@ If not specified, they default to `SnapshotSelectionCriteria.Latest` which selec A persistent actor can delete individual snapshots by calling the `DeleteSnapshot` method with the sequence number of when the snapshot was taken. -To bulk-delete a range of snapshots matching `SnapshotSelectionCriteria`, persistent actors should use the `DeleteSnapshots` method. +To bulk-delete a range of snapshots matching `SnapshotSelectionCriteria`, +persistent actors should use the `deleteSnapshots` method. Depending on the journal used this might be inefficient. It is +best practice to do specific deletes with `deleteSnapshot` or to include a `minSequenceNr` as well as a `maxSequenceNr` +for the `SnapshotSelectionCriteria`. ## Snapshot status handling Saving or deleting snapshots can either succeed or fail – this information is reported back to the persistent actor via status messages as illustrated in the following table. diff --git a/src/contrib/cluster/Akka.Cluster.Sharding/PersistentShard.cs b/src/contrib/cluster/Akka.Cluster.Sharding/PersistentShard.cs index 0b5388c21a4..47d0d23add3 100644 --- a/src/contrib/cluster/Akka.Cluster.Sharding/PersistentShard.cs +++ b/src/contrib/cluster/Akka.Cluster.Sharding/PersistentShard.cs @@ -86,7 +86,7 @@ protected override bool ReceiveCommand(object message) /* * delete old events but keep the latest around because * - * it's not safe to delete all events immediate because snapshots are typically stored with a weaker consistency + * it's not safe to delete all events immediately because snapshots are typically stored with a weaker consistency * level which means that a replay might "see" the deleted events before it sees the stored snapshot, * i.e. it will use an older snapshot and then not replay the full sequence of events * @@ -99,21 +99,22 @@ protected override bool ReceiveCommand(object message) } break; case SaveSnapshotFailure m: - Log.Warning("PersistentShard snapshot failure: {0}", m.Cause.Message); + Log.Warning("PersistentShard snapshot failure: [{0}]", m.Cause.Message); break; case DeleteMessagesSuccess m: - Log.Debug("PersistentShard messages to {0} deleted successfully", m.ToSequenceNr); - DeleteSnapshots(new SnapshotSelectionCriteria(m.ToSequenceNr - 1)); + var deleteTo = m.ToSequenceNr - 1; + var deleteFrom = Math.Max(0, deleteTo - Settings.TunningParameters.KeepNrOfBatches * Settings.TunningParameters.SnapshotAfter); + Log.Debug("PersistentShard messages to [{0}] deleted successfully. Deleting snapshots from [{1}] to [{2}]", m.ToSequenceNr, deleteFrom, deleteTo); + DeleteSnapshots(new SnapshotSelectionCriteria(deleteTo, DateTime.MaxValue, deleteFrom)); break; - case DeleteMessagesFailure m: - Log.Warning("PersistentShard messages to {0} deletion failure: {1}", m.ToSequenceNr, m.Cause.Message); + Log.Warning("PersistentShard messages to [{0}] deletion failure: [{1}]", m.ToSequenceNr, m.Cause.Message); break; case DeleteSnapshotsSuccess m: - Log.Debug("PersistentShard snapshots matching {0} deleted successfully", m.Criteria); + Log.Debug("PersistentShard snapshots matching [{0}] deleted successfully", m.Criteria); break; case DeleteSnapshotsFailure m: - Log.Warning("PersistentShard snapshots matching {0} deletion failure: {1}", m.Criteria, m.Cause.Message); + Log.Warning("PersistentShard snapshots matching [{0}] deletion failure: [{1}]", m.Criteria, m.Cause.Message); break; default: return this.HandleCommand(message); From b4e7ad3cceeddf16957a73030271eb305de3e99f Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Thu, 29 Nov 2018 15:53:55 -0600 Subject: [PATCH 06/14] improved CoordinatedShutdown examples and docs --- docs/articles/actors/coordinated-shutdown.md | 12 +++--- .../Actors/CoordinatedShutdownSpecs.cs | 37 +++++++++++++++++++ 2 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 docs/examples/DocsExamples/Actors/CoordinatedShutdownSpecs.cs diff --git a/docs/articles/actors/coordinated-shutdown.md b/docs/articles/actors/coordinated-shutdown.md index d18bee45930..72d01a94b6e 100644 --- a/docs/articles/actors/coordinated-shutdown.md +++ b/docs/articles/actors/coordinated-shutdown.md @@ -122,14 +122,14 @@ Tasks should be registered as early as possible, preferably at system startup, i ## Running `CoordinatedShutdown` There are a few different ways to start the `CoordinatedShutdown` process. -If you wish to execute the `CoordinatedShutdown` yourself, you can simply call `CoordinatedShutdown.Run()`, which will return a `Task`. +If you wish to execute the `CoordinatedShutdown` yourself, you can simply call `CoordinatedShutdown.Run(CoordinatedShutdown.Reason)`, which takes a [`CoordinatedShutdown.Reason`](/api/Akka.Actor.CoordinatedShutdown.Reason.html) argument will return a `Task`. -```csharp -CoordinatedShutdown.Get(myActorSystem).Run(); -``` +[!code-csharp[CoordinatedShutdownSpecs.cs](../../examples/DocsExamples/Actors/CoordinatedShutdownSpecs.cs?name=coordinated-shutdown-builtin)] It's safe to call this method multiple times as the shutdown process will only be run once and will return the same completion task each time. The `Task` will complete once all phases have run successfully, or a phase with `recover = off` failed. +> It's possible to subclass the `CoordinatedShutdown.Reason` type and pass in a custom implementation which includes custom properties and data. This data is accessible inside the shutdown phases themselves via the [`CoordinatedShutdown.ShutdownReason` property](/api/Akka.Actor.CoordinatedShutdown.html#Akka_Actor_CoordinatedShutdown_ShutdownReason). + ### Automatic `ActorSystem` and Process Termination By default, when the final phase of the `CoordinatedShutdown` executes the calling `ActorSystem` will be terminated. However, the CLR process will still be running even though the `ActorSystem` has been terminated. @@ -148,9 +148,9 @@ If you're using Akka.Cluster, the `CoordinatedShutdown` will automatically regis 2. Gracefully handing over / terminating ClusterSingleton and Cluster.Sharding instances; and 3. Terminating the `Cluster` system itself. -By default, this graceful leave action will by triggered whenever the `CoordinatedShutdown.Run()` method is called. Conversely, calling `Cluster.Leave` on a cluster member will also cause the `CoordinatedShutdown` to run and will terminate the `ActorSystem` once the node has left the cluster. +By default, this graceful leave action will by triggered whenever the `CoordinatedShutdown.Run(Reason)` method is called. Conversely, calling `Cluster.Leave` on a cluster member will also cause the `CoordinatedShutdown` to run and will terminate the `ActorSystem` once the node has left the cluster. -By default, `CoordinatedShutdown.Run()` will also be executed if a node is removed via `Cluster.Down` (non-graceful exit), but this can be disabled by changing the following Akka.Cluster HOCON setting: +`CoordinatedShutdown.Run()` will also be executed if a node is removed via `Cluster.Down` (non-graceful exit), but this can be disabled by changing the following Akka.Cluster HOCON setting: ``` akka.cluster.run-coordinated-shutdown-when-down = off diff --git a/docs/examples/DocsExamples/Actors/CoordinatedShutdownSpecs.cs b/docs/examples/DocsExamples/Actors/CoordinatedShutdownSpecs.cs new file mode 100644 index 00000000000..fd745a4eafb --- /dev/null +++ b/docs/examples/DocsExamples/Actors/CoordinatedShutdownSpecs.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Akka.Actor; +using FluentAssertions; +using Xunit; + +namespace DocsExamples.Actors +{ + public class CoordinatedShutdownSpecs + { + [Fact] + public async Task CoordinatedShutdownBuiltInReason() + { + #region coordinated-shutdown-builtin + var actorSystem = ActorSystem.Create("MySystem"); + + // shutdown with reason "CLR exit" - meaning the process was being terminated + // task completes once node has left cluster and terminated the ActorSystem + Task shutdownTask = CoordinatedShutdown.Get(actorSystem) + .Run(CoordinatedShutdown.ClrExitReason.Instance); + await shutdownTask; + + // shutdown reason gets cached here. + // The`Reason` type can be subclassed with custom properties if needed + CoordinatedShutdown.Get(actorSystem).ShutdownReason.Should() + .Be(CoordinatedShutdown.ClrExitReason.Instance); + + #endregion + + + actorSystem.WhenTerminated.IsCompleted.Should().BeTrue(); + } + } +} From d6192c4eff2e2879d626a92a175d5465c44e6ad5 Mon Sep 17 00:00:00 2001 From: Chris Hoare Date: Fri, 14 Dec 2018 20:10:36 +0000 Subject: [PATCH 07/14] Fix for #3402. Allows spawning an actor via expression. (#3667) * Fix for #3402. Allows spawning an actor via expression. * Change ExprSerializer Identifier to 99 to avoid clash with Cluster pubsub --- .../Akka.FSharp.Tests/Akka.FSharp.Tests.fsproj | 2 +- src/core/Akka.FSharp.Tests/ApiTests.fs | 16 ++++++++++++++++ src/core/Akka.FSharp/Akka.FSharp.fsproj | 4 ++-- src/core/Akka.FSharp/FsApi.fs | 7 ++++--- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/core/Akka.FSharp.Tests/Akka.FSharp.Tests.fsproj b/src/core/Akka.FSharp.Tests/Akka.FSharp.Tests.fsproj index 873305f1922..81b56ea1460 100644 --- a/src/core/Akka.FSharp.Tests/Akka.FSharp.Tests.fsproj +++ b/src/core/Akka.FSharp.Tests/Akka.FSharp.Tests.fsproj @@ -25,7 +25,7 @@ - + diff --git a/src/core/Akka.FSharp.Tests/ApiTests.fs b/src/core/Akka.FSharp.Tests/ApiTests.fs index fdf4691cc91..9d3d8c52ee5 100644 --- a/src/core/Akka.FSharp.Tests/ApiTests.fs +++ b/src/core/Akka.FSharp.Tests/ApiTests.fs @@ -122,6 +122,22 @@ let ``actor that accepts _ will receive string message`` () = response |> equals "SomethingToReturn" + + +type TestActor() = + inherit UntypedActor() + + override x.OnReceive msg = () + +[] +let ``can spawn actor from expression`` () = + + let system = Configuration.load() |> System.create "test" + let actor = spawnObj system "test-actor" <@ fun () -> TestActor() @> + + () + + //[] // FAILS let ``actor that accepts unit will receive unit message`` () = diff --git a/src/core/Akka.FSharp/Akka.FSharp.fsproj b/src/core/Akka.FSharp/Akka.FSharp.fsproj index 4e6a63bbda5..4e9d654a93d 100644 --- a/src/core/Akka.FSharp/Akka.FSharp.fsproj +++ b/src/core/Akka.FSharp/Akka.FSharp.fsproj @@ -20,9 +20,9 @@ - + - + diff --git a/src/core/Akka.FSharp/FsApi.fs b/src/core/Akka.FSharp/FsApi.fs index 4829142dc19..fca4c1b1aa1 100644 --- a/src/core/Akka.FSharp/FsApi.fs +++ b/src/core/Akka.FSharp/FsApi.fs @@ -29,7 +29,7 @@ module Serialization = type ExprSerializer(system) = inherit Serializer(system) let fsp = FsPickler.CreateBinarySerializer() - override __.Identifier = 9 + override __.Identifier = 99 override __.IncludeManifest = true override __.ToBinary(o) = serializeToBinary fsp o override __.FromBinary(bytes, _) = deserializeFromBinary fsp bytes @@ -374,14 +374,15 @@ module Linq = let toExpression<'Actor>(f : System.Linq.Expressions.Expression) = match f with - | Lambda(_, Invoke(Call(null, Method "ToFSharpFunc", Ar [| Lambda(_, p) |]))) + | Lambda(_, (Call(null, Method "ToFSharpFunc", Ar [| Lambda(_, p) |]))) | Call(null, Method "ToFSharpFunc", Ar [| Lambda(_, p) |]) -> Expression.Lambda(p, [||]) :?> System.Linq.Expressions.Expression> | _ -> failwith "Doesn't match" type Expression = static member ToExpression(f : System.Linq.Expressions.Expression>>) = f - static member ToExpression<'Actor>(f : Quotations.Expr<(unit -> 'Actor)>) = toExpression<'Actor> (QuotationEvaluator.ToLinqExpression f) + static member ToExpression<'Actor>(f : Quotations.Expr<(unit -> 'Actor)>) = + toExpression<'Actor> (QuotationEvaluator.ToLinqExpression f) [] module Configuration = From 55875aa11a992963ffe6beba5f3b18c2c392b087 Mon Sep 17 00:00:00 2001 From: Ismael Hamed Date: Sat, 15 Dec 2018 22:48:07 +0100 Subject: [PATCH 08/14] [DOC] Eager initialization of persistence plugins (#3675) --- docs/articles/persistence/storage-plugins.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/articles/persistence/storage-plugins.md b/docs/articles/persistence/storage-plugins.md index 643a5bed2b8..eeaa6499db5 100644 --- a/docs/articles/persistence/storage-plugins.md +++ b/docs/articles/persistence/storage-plugins.md @@ -16,3 +16,23 @@ Snapshot store is a specialized type of actor which exposes an API to handle inc [!code-json[Main](../../../src/core/Akka.Persistence/persistence.conf#L204-L219)] +### Eager initialization of persistence plugin + +By default, persistence plugins are started on-demand, as they are used. In some case, however, it might be beneficial to start a certain plugin eagerly. In order to do that, specify the IDs of plugins you wish to start automatically under `akka.persistence.journal.auto-start-journals` and `akka.persistence.snapshot-store.auto-start-snapshot-stores`. + +For example, if you want eager initialization for the sqlite journal and snapshot store plugin, your configuration should look like this: + +``` +akka { + persistence { + journal { + plugin = "akka.persistence.journal.sqlite" + auto-start-journals = ["akka.persistence.journal.sqlite"] + } + snapshot-store { + plugin = "akka.persistence.snapshot-store.sqlite" + auto-start-snapshot-stores = ["akka.persistence.snapshot-store.sqlite"] + } + } +} +``` \ No newline at end of file From 69e7fa7336cae0d3a6b9794d73286abfc9ad3420 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Sun, 16 Dec 2018 17:38:12 -0600 Subject: [PATCH 09/14] upgraded to DotNetty v0.6.0 and System.Collections.Immutable v1.5.0 (#3633) * upgraded to DotNetty v0.6.0 and System.Collections.Immutable v1.5.0 * synchronized on Hyperion v0.9.8 * skipped tests affected by System.Collections.Immutable bug caused by dotnet-xunit assembly loading --- .../Akka.Benchmarks/Akka.Benchmarks.csproj | 2 +- src/common.props | 1 + .../ReplicatedDataSerializerSpec.cs | 28 +++++++++---------- .../ReplicatorMessageSerializerSpec.cs | 2 +- .../Akka.DistributedData.csproj | 2 +- .../Serialization/ReplicatedDataSerializer.cs | 2 +- .../Akka.Serialization.Hyperion.csproj | 2 +- .../PersistentActorSpec.cs | 6 ++-- .../PersistentActorSpecAsyncAwait.cs | 6 ++-- src/core/Akka.Remote/Akka.Remote.csproj | 2 +- src/core/Akka/Akka.csproj | 2 +- 11 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj b/src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj index 8e84aa80eff..916589fdc84 100644 --- a/src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj +++ b/src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/common.props b/src/common.props index 87ae0083a7c..a1b458f8dbe 100644 --- a/src/common.props +++ b/src/common.props @@ -11,6 +11,7 @@ 2.3.1 15.7.2 + 0.9.8 akka;actors;actor model;Akka;concurrency diff --git a/src/contrib/cluster/Akka.DistributedData.Tests/Serialization/ReplicatedDataSerializerSpec.cs b/src/contrib/cluster/Akka.DistributedData.Tests/Serialization/ReplicatedDataSerializerSpec.cs index 8c8b8e1ed5d..b55601b9217 100644 --- a/src/contrib/cluster/Akka.DistributedData.Tests/Serialization/ReplicatedDataSerializerSpec.cs +++ b/src/contrib/cluster/Akka.DistributedData.Tests/Serialization/ReplicatedDataSerializerSpec.cs @@ -35,7 +35,7 @@ public ReplicatedDataSerializerSpec(ITestOutputHelper output) : base(BaseConfig, { } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_GSet() { CheckSerialization(GSet.Empty); @@ -51,7 +51,7 @@ public void ReplicatedDataSerializer_should_serialize_GSet() CheckSameContent(GSet.Create(_address1, _address2, _address3), GSet.Create(_address3, _address2, _address1)); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_ORSet() { CheckSerialization(ORSet.Empty); @@ -74,7 +74,7 @@ public void ReplicatedDataSerializer_should_serialize_ORSet() CheckSameContent(s3.Merge(s4), s4.Merge(s3)); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_ORSet_delta() { CheckSerialization(ORSet.Empty.Add(_address1, "a").Delta); @@ -84,21 +84,21 @@ public void ReplicatedDataSerializer_should_serialize_ORSet_delta() CheckSerialization(ORSet.Empty.Add(_address1, "a").Clear(_address2).Delta); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_Flag() { CheckSerialization(Flag.False); CheckSerialization(Flag.False.SwitchOn()); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_LWWRegister() { CheckSerialization(new LWWRegister(_address1, "value1")); CheckSerialization(new LWWRegister(_address2, "value2").WithValue(_address2, "value3")); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_GCounter() { CheckSerialization(GCounter.Empty); @@ -113,7 +113,7 @@ public void ReplicatedDataSerializer_should_serialize_GCounter() GCounter.Empty.Increment(_address3, 5).Increment(_address1, 2)); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_PNCounter() { CheckSerialization(PNCounter.Empty); @@ -133,7 +133,7 @@ public void ReplicatedDataSerializer_should_serialize_PNCounter() PNCounter.Empty.Increment(_address3, 5).Increment(_address1, 2).Decrement(_address1, 1)); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_ORDictionary() { CheckSerialization(ORDictionary>.Empty); @@ -141,7 +141,7 @@ public void ReplicatedDataSerializer_should_serialize_ORDictionary() CheckSerialization(ORDictionary>.Empty.SetItem(_address1, "a", GSet.Create("A")).SetItem(_address2, "b", GSet.Create("B"))); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_ORDictionary_delta() { CheckSerialization(ORDictionary>.Empty @@ -172,7 +172,7 @@ public void ReplicatedDataSerializer_should_serialize_ORDictionary_delta() .Delta); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_LWWDictionary() { CheckSerialization(LWWDictionary.Empty); @@ -180,7 +180,7 @@ public void ReplicatedDataSerializer_should_serialize_LWWDictionary() CheckSerialization(LWWDictionary.Empty.SetItem(_address1, "a", "value1").SetItem(_address2, "b", 17)); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_PNCounterDictionary() { CheckSerialization(PNCounterDictionary.Empty); @@ -191,7 +191,7 @@ public void ReplicatedDataSerializer_should_serialize_PNCounterDictionary() .Increment(_address2, "b", 5)); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_ORMultiDictionary() { CheckSerialization(ORMultiValueDictionary.Empty); @@ -206,13 +206,13 @@ public void ReplicatedDataSerializer_should_serialize_ORMultiDictionary() CheckSameContent(m1.Merge(m2), m2.Merge(m1)); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_DeletedData() { CheckSerialization(DeletedData.Instance); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatedDataSerializer_should_serialize_VersionVector() { CheckSerialization(VersionVector.Empty); diff --git a/src/contrib/cluster/Akka.DistributedData.Tests/Serialization/ReplicatorMessageSerializerSpec.cs b/src/contrib/cluster/Akka.DistributedData.Tests/Serialization/ReplicatorMessageSerializerSpec.cs index 4796c6c13e4..89084c77d31 100644 --- a/src/contrib/cluster/Akka.DistributedData.Tests/Serialization/ReplicatorMessageSerializerSpec.cs +++ b/src/contrib/cluster/Akka.DistributedData.Tests/Serialization/ReplicatorMessageSerializerSpec.cs @@ -38,7 +38,7 @@ public ReplicatorMessageSerializerSpec(ITestOutputHelper output) : base(BaseConf { } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void ReplicatorMessageSerializer_should_serialize_Replicator_message() { var ref1 = Sys.ActorOf(Props.Empty, "ref1"); diff --git a/src/contrib/cluster/Akka.DistributedData/Akka.DistributedData.csproj b/src/contrib/cluster/Akka.DistributedData/Akka.DistributedData.csproj index 4b99e3184d5..078bab4bcca 100644 --- a/src/contrib/cluster/Akka.DistributedData/Akka.DistributedData.csproj +++ b/src/contrib/cluster/Akka.DistributedData/Akka.DistributedData.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/contrib/cluster/Akka.DistributedData/Serialization/ReplicatedDataSerializer.cs b/src/contrib/cluster/Akka.DistributedData/Serialization/ReplicatedDataSerializer.cs index dc06662a208..48138afce73 100644 --- a/src/contrib/cluster/Akka.DistributedData/Serialization/ReplicatedDataSerializer.cs +++ b/src/contrib/cluster/Akka.DistributedData/Serialization/ReplicatedDataSerializer.cs @@ -65,7 +65,7 @@ public override object FromBinary(byte[] bytes, Type type) { using (var ms = new MemoryStream(bytes)) { - var res = _serializer.Deserialize(ms); + var res = _serializer.Deserialize(ms); return res; } } diff --git a/src/contrib/serializers/Akka.Serialization.Hyperion/Akka.Serialization.Hyperion.csproj b/src/contrib/serializers/Akka.Serialization.Hyperion/Akka.Serialization.Hyperion.csproj index 53fbf5dbd38..c8c99e51230 100644 --- a/src/contrib/serializers/Akka.Serialization.Hyperion/Akka.Serialization.Hyperion.csproj +++ b/src/contrib/serializers/Akka.Serialization.Hyperion/Akka.Serialization.Hyperion.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/core/Akka.Persistence.Tests/PersistentActorSpec.cs b/src/core/Akka.Persistence.Tests/PersistentActorSpec.cs index d05abc5ae15..2635fcc72dc 100644 --- a/src/core/Akka.Persistence.Tests/PersistentActorSpec.cs +++ b/src/core/Akka.Persistence.Tests/PersistentActorSpec.cs @@ -134,7 +134,7 @@ public void PersistentActor_should_allow_behavior_changes_in_event_handler_as_la ExpectMsgInOrder("a-1", "a-2", "b-0", "c-30", "c-31", "c-32", "d-0", "e-30", "e-31", "e-32"); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void PersistentActor_should_support_snapshotting() { var pref = ActorOf(Props.Create(() => new SnapshottingPersistentActor(Name, TestActor))); @@ -151,7 +151,7 @@ public void PersistentActor_should_support_snapshotting() ExpectMsgInOrder("a-1", "a-2", "b-41", "b-42", "c-41", "c-42"); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void PersistentActor_should_support_Context_Become_during_recovery() { var pref = ActorOf(Props.Create(() => new SnapshottingPersistentActor(Name, TestActor))); @@ -432,7 +432,7 @@ public void PersistentActor_should_invoke_deferred_handlers_preserving_the_origi ExpectNoMsg(TimeSpan.FromMilliseconds(100)); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void PersistentActor_should_receive_RecoveryFinished_if_it_is_handled_after_all_events_have_been_replayed() { var pref = ActorOf(Props.Create(() => new SnapshottingPersistentActor(Name, TestActor))); diff --git a/src/core/Akka.Persistence.Tests/PersistentActorSpecAsyncAwait.cs b/src/core/Akka.Persistence.Tests/PersistentActorSpecAsyncAwait.cs index b65fd979205..57994d99976 100644 --- a/src/core/Akka.Persistence.Tests/PersistentActorSpecAsyncAwait.cs +++ b/src/core/Akka.Persistence.Tests/PersistentActorSpecAsyncAwait.cs @@ -134,7 +134,7 @@ public void PersistentActor_should_allow_behavior_changes_in_event_handler_as_la ExpectMsgInOrder("a-1", "a-2", "b-0", "c-30", "c-31", "c-32", "d-0", "e-30", "e-31", "e-32"); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void PersistentActor_should_support_snapshotting() { var pref = ActorOf(Props.Create(() => new SnapshottingPersistentActor(Name, TestActor))); @@ -151,7 +151,7 @@ public void PersistentActor_should_support_snapshotting() ExpectMsgInOrder("a-1", "a-2", "b-41", "b-42", "c-41", "c-42"); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void PersistentActor_should_support_Context_Become_during_recovery() { var pref = ActorOf(Props.Create(() => new SnapshottingPersistentActor(Name, TestActor))); @@ -432,7 +432,7 @@ public void PersistentActor_should_invoke_deferred_handlers_preserving_the_origi ExpectNoMsg(TimeSpan.FromMilliseconds(100)); } - [Fact] + [Fact(Skip = "Need https://github.com/akkadotnet/akka.net/pull/3668 merged")] public void PersistentActor_should_receive_RecoveryFinished_if_it_is_handled_after_all_events_have_been_replayed() { var pref = ActorOf(Props.Create(() => new SnapshottingPersistentActor(Name, TestActor))); diff --git a/src/core/Akka.Remote/Akka.Remote.csproj b/src/core/Akka.Remote/Akka.Remote.csproj index 357f77aa4c0..4a56a415164 100644 --- a/src/core/Akka.Remote/Akka.Remote.csproj +++ b/src/core/Akka.Remote/Akka.Remote.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/core/Akka/Akka.csproj b/src/core/Akka/Akka.csproj index 9f934758e3a..44d1df7dd6e 100644 --- a/src/core/Akka/Akka.csproj +++ b/src/core/Akka/Akka.csproj @@ -16,7 +16,7 @@ - + From a4d7c7b4bea7f688f22766d89ec057e5abed8b89 Mon Sep 17 00:00:00 2001 From: Ismael Hamed Date: Mon, 17 Dec 2018 16:47:27 +0100 Subject: [PATCH 10/14] Fixes DistributedPubSubMediator not unsubscribing actors when they terminate (#3677) --- .../DistributedPubSubMediatorSpec.cs | 28 +++++++++++++++++++ .../DistributedPubSubMediator.cs | 16 +++++++++++ .../Internal/TopicMessages.cs | 13 +++++++++ .../PublishSubscribe/Internal/Topics.cs | 7 ++++- 4 files changed, 63 insertions(+), 1 deletion(-) diff --git a/src/contrib/cluster/Akka.Cluster.Tools.Tests.MultiNode/PublishSubscribe/DistributedPubSubMediatorSpec.cs b/src/contrib/cluster/Akka.Cluster.Tools.Tests.MultiNode/PublishSubscribe/DistributedPubSubMediatorSpec.cs index 7f6f4847394..458784c7142 100644 --- a/src/contrib/cluster/Akka.Cluster.Tools.Tests.MultiNode/PublishSubscribe/DistributedPubSubMediatorSpec.cs +++ b/src/contrib/cluster/Akka.Cluster.Tools.Tests.MultiNode/PublishSubscribe/DistributedPubSubMediatorSpec.cs @@ -286,6 +286,15 @@ private void AwaitCount(int expected) }); } + private void AwaitCountSubscribers(int expected, string topic) + { + AwaitAssert(() => + { + Mediator.Tell(new CountSubscribers(topic)); + Assert.Equal(expected, ExpectMsg()); + }); + } + #endregion [MultiNodeFact] @@ -306,6 +315,7 @@ public void DistributedPubSubMediatorSpecs() DistributedPubSubMediator_must_remove_entries_when_node_is_removed(); DistributedPubSubMediator_must_receive_proper_UnsubscribeAck_message(); DistributedPubSubMediator_must_get_topics_after_simple_publish(); + DistributedPubSubMediator_must_remove_topic_subscribers_when_they_terminate(); } public void DistributedPubSubMediator_must_startup_2_nodes_cluster() @@ -820,5 +830,23 @@ public void DistributedPubSubMediator_must_get_topics_after_simple_publish() EnterBarrier("after-get-topics"); }); } + + public void DistributedPubSubMediator_must_remove_topic_subscribers_when_they_terminate() + { + Within(TimeSpan.FromSeconds(15), () => + { + RunOn(() => + { + var s1 = new Subscribe("topic_b1", CreateChatUser("u18")); + Mediator.Tell(s1); + ExpectMsg(x => x.Subscribe.Equals(s1)); + + AwaitCountSubscribers(1, "topic_b1"); + ChatUser("u18").Tell(PoisonPill.Instance); + AwaitCountSubscribers(0, "topic_b1"); + }, _first); + EnterBarrier("after-15"); + }); + } } } diff --git a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/DistributedPubSubMediator.cs b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/DistributedPubSubMediator.cs index 12c44ddce98..81020dbffd9 100644 --- a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/DistributedPubSubMediator.cs +++ b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/DistributedPubSubMediator.cs @@ -378,6 +378,22 @@ public DistributedPubSubMediator(DistributedPubSubSettings settings) { Sender.Tell(deltaCount); }); + Receive(msg => + { + var encTopic = Internal.Utils.EncodeName(msg.Topic); + _buffer.BufferOr(Internal.Utils.MakeKey(Self.Path / encTopic), msg, Sender, () => + { + var child = Context.Child(encTopic); + if (!child.IsNobody()) + { + child.Tell(Count.Instance, Sender); + } + else + { + Sender.Tell(0); + } + }); + }); } private bool OtherHasNewerVersions(IDictionary versions) diff --git a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs index 060dfccf1be..1ed8efb75cd 100644 --- a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs +++ b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs @@ -41,6 +41,19 @@ internal sealed class Count private Count() { } } + /// + /// TBD + /// + internal sealed class CountSubscribers + { + public string Topic { get; } + + public CountSubscribers(string topic) + { + Topic = topic; + } + } + /// /// TBD /// diff --git a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/Topics.cs b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/Topics.cs index 2a84525beba..6c014798437 100644 --- a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/Topics.cs +++ b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/Topics.cs @@ -111,6 +111,10 @@ protected bool DefaultReceive(object message) Context.Parent.Tell(NewSubscriberArrived.Instance); } } + else if (message is Count) + { + Sender.Tell(Subscribers.Count); + } else { foreach (var subscriber in Subscribers) @@ -137,7 +141,7 @@ protected override bool Receive(object message) return Business(message) || DefaultReceive(message); } - private void Remove(IActorRef actorRef) + protected void Remove(IActorRef actorRef) { Subscribers.Remove(actorRef); @@ -233,6 +237,7 @@ protected override bool Business(object message) var terminated = (Terminated)message; var key = Utils.MakeKey(terminated.ActorRef); _buffer.RecreateAndForwardMessagesIfNeeded(key, () => NewGroupActor(terminated.ActorRef.Path.Name)); + Remove(terminated.ActorRef); } else return false; return true; From 48e9d22689c2ba12ac4eb0f2bf93b6b1b98a2530 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Mon, 17 Dec 2018 21:25:09 -0600 Subject: [PATCH 11/14] Changed dot-netty.tcp.reuse-addr to default to 'off-for-windows' (#3674) * close #3293 close #2477 - changed dot-netty.tcp.reuse-addr to default to 'off-for-windows' * changed the default config setting to 'off-for-windows' * Fixed RemoteConfigSpec --- .../CoreAPISpec.ApproveCore.approved.txt | 1 + .../Akka.Remote.Tests/RemoteConfigSpec.cs | 2 +- .../Akka.Remote/Configuration/Remote.conf | 4 ++-- .../DotNetty/DotNettyTransportSettings.cs | 23 +++++++++++++++++- src/core/Akka/Util/RuntimeDetector.cs | 24 +++++++++++++++---- 5 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.approved.txt b/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.approved.txt index 13add790593..cdb9b591509 100644 --- a/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.approved.txt +++ b/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.approved.txt @@ -4758,6 +4758,7 @@ namespace Akka.Util public class static RuntimeDetector { public static readonly bool IsMono; + public static readonly bool IsWindows; } public class static StandardOutWriter { diff --git a/src/core/Akka.Remote.Tests/RemoteConfigSpec.cs b/src/core/Akka.Remote.Tests/RemoteConfigSpec.cs index 436c7b6b397..a6a088865ce 100644 --- a/src/core/Akka.Remote.Tests/RemoteConfigSpec.cs +++ b/src/core/Akka.Remote.Tests/RemoteConfigSpec.cs @@ -102,7 +102,7 @@ public void Remoting_should_contain_correct_heliosTCP_values_in_ReferenceConf() Assert.Equal(4096, s.Backlog); Assert.True(s.TcpNoDelay); Assert.True(s.TcpKeepAlive); - Assert.True(s.TcpReuseAddr); + Assert.Equal("off-for-windows", c.GetString("tcp-reuse-addr")); Assert.True(string.IsNullOrEmpty(c.GetString("hostname"))); Assert.Null(s.PublicPort); Assert.Equal(2, s.ServerSocketWorkerPoolSize); diff --git a/src/core/Akka.Remote/Configuration/Remote.conf b/src/core/Akka.Remote/Configuration/Remote.conf index e8c6255bd62..ff207b4e207 100644 --- a/src/core/Akka.Remote/Configuration/Remote.conf +++ b/src/core/Akka.Remote/Configuration/Remote.conf @@ -473,10 +473,10 @@ akka { # Enables SO_REUSEADDR, which determines when an ActorSystem can open # the specified listen port (the meaning differs between *nix and Windows) - # Valid values are "on", "off" and "off-for-windows" + # Valid values are "on", "off", and "off-for-windows" # due to the following Windows bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4476378 # "off-for-windows" of course means that it's "on" for all other platforms - tcp-reuse-addr = on + tcp-reuse-addr = off-for-windows # Used to configure the number of I/O worker threads on server sockets server-socket-worker-pool { diff --git a/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransportSettings.cs b/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransportSettings.cs index 3e8420a6f8a..8aaf23b4776 100644 --- a/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransportSettings.cs +++ b/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransportSettings.cs @@ -29,6 +29,27 @@ public static DotNettyTransportSettings Create(ActorSystem system) return Create(system.Settings.Config.GetConfig("akka.remote.dot-netty.tcp")); } + /// + /// Adds support for the "off-for-windows" option per https://github.com/akkadotnet/akka.net/issues/3293 + /// + /// The HOCON string for the akka.remote.dot-netty.tcp.reuse-addr option + /// true if we should enable REUSE_ADDR for tcp. false otherwise. + internal static bool ResolveTcpReuseAddrOption(string hoconTcpReuseAddr) + { + switch (hoconTcpReuseAddr.ToLowerInvariant()) + { + case "off-for-windows" when RuntimeDetector.IsWindows: + return false; + case "off-for-windows": + return true; + case "on": + return true; + case "off": + default: + return false; + } + } + public static DotNettyTransportSettings Create(Config config) { if (config == null) throw new ArgumentNullException(nameof(config), "DotNetty HOCON config was not found (default path: `akka.remote.dot-netty`)"); @@ -61,7 +82,7 @@ public static DotNettyTransportSettings Create(Config config) maxFrameSize: ToNullableInt(config.GetByteSize("maximum-frame-size")) ?? 128000, ssl: config.HasPath("ssl") ? SslSettings.Create(config.GetConfig("ssl")) : SslSettings.Empty, dnsUseIpv6: config.GetBoolean("dns-use-ipv6", false), - tcpReuseAddr: config.GetBoolean("tcp-reuse-addr", true), + tcpReuseAddr: ResolveTcpReuseAddrOption(config.GetString("tcp-reuse-addr", "off-for-windows")), tcpKeepAlive: config.GetBoolean("tcp-keepalive", true), tcpNoDelay: config.GetBoolean("tcp-nodelay", true), backlog: config.GetInt("backlog", 4096), diff --git a/src/core/Akka/Util/RuntimeDetector.cs b/src/core/Akka/Util/RuntimeDetector.cs index 2dfb06facdd..a5441b8a141 100644 --- a/src/core/Akka/Util/RuntimeDetector.cs +++ b/src/core/Akka/Util/RuntimeDetector.cs @@ -6,10 +6,7 @@ //----------------------------------------------------------------------- using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.InteropServices; namespace Akka.Util { @@ -28,6 +25,25 @@ public static class RuntimeDetector /// Is true if we're running on a Mono VM. false otherwise. /// public static readonly bool IsMono = Type.GetType("Mono.Runtime") != null; + + /// + /// Is true if we've detected Windows as a platform. + /// + public static readonly bool IsWindows = _IsWindows(); + + /// + /// Private implementation method not meant for public consumption + /// + /// true if the current runtime is Windows + private static bool _IsWindows() + { +#if CORECLR + return System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows); +#else + return System.Environment.OSVersion.Platform != PlatformID.MacOSX && + System.Environment.OSVersion.Platform != PlatformID.Unix; +#endif + } } } From a393f0bd05f1daa22a1409ffa2236d96ffb5c8f3 Mon Sep 17 00:00:00 2001 From: Oleksandr Kobylianskyi Date: Tue, 18 Dec 2018 05:26:04 +0200 Subject: [PATCH 12/14] Fix console output example for supervision demo (#3647) --- docs/articles/intro/tutorial-1.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/articles/intro/tutorial-1.md b/docs/articles/intro/tutorial-1.md index 5a268e4f00a..a32b44744bf 100644 --- a/docs/articles/intro/tutorial-1.md +++ b/docs/articles/intro/tutorial-1.md @@ -215,6 +215,7 @@ After running the snippet, we see the following output on the console: supervised actor started supervised actor fails now supervised actor stopped +supervised actor started [ERROR][05.06.2017 13:34:50][Thread 0003][akka://testSystem/user/supervising-actor/supervised-actor] I failed! Cause: System.Exception: I failed! at Tutorials.Tutorial1.SupervisedActor.OnReceive(Object message) @@ -285,4 +286,4 @@ In the following chapters we will grow the application step-by-step: 1. We will create the representation for a device 2. We create the device management component - 3. We add query capabilities to device groups \ No newline at end of file + 3. We add query capabilities to device groups From cd0375f6b30d324a8a96936811afcd5891bf080e Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Tue, 18 Dec 2018 07:33:12 -0600 Subject: [PATCH 13/14] fixed NuGet issue with DocsExamples (#3681) --- docs/examples/DocsExamples/DocsExamples.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/examples/DocsExamples/DocsExamples.csproj b/docs/examples/DocsExamples/DocsExamples.csproj index 49f4c2f886b..904c8769378 100644 --- a/docs/examples/DocsExamples/DocsExamples.csproj +++ b/docs/examples/DocsExamples/DocsExamples.csproj @@ -16,7 +16,6 @@ - From a674f174caf411efcddd98585105116bd44cc9e6 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Tue, 18 Dec 2018 07:33:28 -0600 Subject: [PATCH 14/14] added v1.3.11 release notes (#3680) --- RELEASE_NOTES.md | 27 +++++++++++++++++++++++++-- src/common.props | 19 ++++++++++++++++++- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b0e529046e6..8e843939e94 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,28 @@ -#### 1.3.11 November 2 2018 #### -*Placholder for nightlies* +#### 1.3.11 December 17 2018 #### +**Maintenance Release for Akka.NET 1.3** + +Akka.NET v1.3.11 is a bugfix patch primarily aimed at solving the following issue: [DotNetty Remote Transport Issues with .NET Core 2.1](https://github.com/akkadotnet/akka.net/issues/3506). + +.NET Core 2.1 exposed some issues with the DotNetty connection methods in DotNetty v0.4.8 that have since been fixed in subsequent releases. In Akka.NET v1.3.11 we've resolved this issue by upgrading to DotNetty v0.6.0. + +In addition to the above, we've introduced some additional fixes and changes in Akka.NET v1.3.11: + +* [Akka.FSharp: Akka.Fsharp spawning an actor results in Exception](https://github.com/akkadotnet/akka.net/issues/3402) +* [Akka.Remote: tcp-reuse-addr = off-for-windows prevents actorsystem from starting](https://github.com/akkadotnet/akka.net/issues/3293) +* [Akka.Remote: tcp socket address reuse - default configuration](https://github.com/akkadotnet/akka.net/issues/2477) +* [Akka.Cluster.Tools: +Actor still receiving messages from mediator after termination](https://github.com/akkadotnet/akka.net/issues/3658) +* [Akka.Persistence: Provide minSequenceNr for snapshot deletion](https://github.com/akkadotnet/akka.net/pull/3641) + +To [see the full set of changes for Akka.NET 1.3.11, click here](https://github.com/akkadotnet/akka.net/milestone/29) + +| COMMITS | LOC+ | LOC- | AUTHOR | +| --- | --- | --- | --- | +| 5 | 123 | 71 | Aaron Stannard | +| 3 | 96 | 10 | Ismael Hamed | +| 2 | 4 | 3 | Oleksandr Kobylianskyi | +| 1 | 5 | 1 | Ruben Mamo | +| 1 | 23 | 6 | Chris Hoare | #### 1.3.10 November 1 2018 #### **Maintenance Release for Akka.NET 1.3** diff --git a/src/common.props b/src/common.props index a1b458f8dbe..b6993974ebb 100644 --- a/src/common.props +++ b/src/common.props @@ -18,6 +18,23 @@ true - Placholder for nightlies* + Maintenance Release for Akka.NET 1.3** +Akka.NET v1.3.11 is a bugfix patch primarily aimed at solving the following issue: [DotNetty Remote Transport Issues with .NET Core 2.1](https://github.com/akkadotnet/akka.net/issues/3506). +.NET Core 2.1 exposed some issues with the DotNetty connection methods in DotNetty v0.4.8 that have since been fixed in subsequent releases. In Akka.NET v1.3.11 we've resolved this issue by upgrading to DotNetty v0.6.0. +In addition to the above, we've introduced some additional fixes and changes in Akka.NET v1.3.11: +[Akka.FSharp: Akka.Fsharp spawning an actor results in Exception](https://github.com/akkadotnet/akka.net/issues/3402) +[Akka.Remote: tcp-reuse-addr = off-for-windows prevents actorsystem from starting](https://github.com/akkadotnet/akka.net/issues/3293) +[Akka.Remote: tcp socket address reuse - default configuration](https://github.com/akkadotnet/akka.net/issues/2477) +[Akka.Cluster.Tools: +Actor still receiving messages from mediator after termination](https://github.com/akkadotnet/akka.net/issues/3658) +[Akka.Persistence: Provide minSequenceNr for snapshot deletion](https://github.com/akkadotnet/akka.net/pull/3641) +To [see the full set of changes for Akka.NET 1.3.11, click here](https://github.com/akkadotnet/akka.net/milestone/29) +| COMMITS | LOC+ | LOC- | AUTHOR | +| --- | --- | --- | --- | +| 5 | 123 | 71 | Aaron Stannard | +| 3 | 96 | 10 | Ismael Hamed | +| 2 | 4 | 3 | Oleksandr Kobylianskyi | +| 1 | 5 | 1 | Ruben Mamo | +| 1 | 23 | 6 | Chris Hoare | \ No newline at end of file