Skip to content

Commit

Permalink
Merge branch 'dev' into 6927-Akka.Persistence.Query
Browse files Browse the repository at this point in the history
  • Loading branch information
YariSPB authored Oct 29, 2023
2 parents 30cf459 + f2867df commit 6987f02
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 10 deletions.
3 changes: 3 additions & 0 deletions docs/articles/actors/receive-actor-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,9 @@ Task.WhenAll(tasks).PipeTo(actorC, Self);

This example demonstrates `Ask` together with the `Pipe` Pattern on tasks, because this is likely to be a common combination. Please note that all of the above is completely non-blocking and asynchronous: `Ask` produces a `Task`, two of which are awaited until both are completed, and when that happens, a new `Result` object is forwarded to another actor.

> [!NOTE]
> While `Ask` waits for a response, that does not ensure it receives any kind of priority. Messages sent via `Ask` queue in actor mailboxes the same way that messages sent via `Tell` do. You may need to adapt your actor hierarchy if `Ask` messages might be impeded by a large queue in an actor's mailbox.
Using `Ask` will send a message to the receiving Actor as with `Tell`, and the receiving actor must reply with `Sender.Tell(reply, Self)` in order to complete the returned `Task` with a value. The `Ask` operation involves creating an internal actor for handling this reply, which needs to have a timeout after which it is destroyed in order not to leak resources; see more below.

> [!WARNING]
Expand Down
6 changes: 3 additions & 3 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Copyright>Copyright © 2013-2023 Akka.NET Team</Copyright>
<Authors>Akka.NET Team</Authors>
<VersionPrefix>1.5.7</VersionPrefix>
<VersionPrefix>1.5.14</VersionPrefix>
<PackageIcon>akkalogo.png</PackageIcon>
<PackageProjectUrl>https://github.com/akkadotnet/akka.net</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/akkadotnet/akka.net/blob/master/LICENSE</PackageLicenseUrl>
Expand All @@ -24,7 +24,7 @@
<HyperionVersion>0.12.2</HyperionVersion>
<NewtonsoftJsonVersion>[13.0.1,)</NewtonsoftJsonVersion>
<NBenchVersion>2.0.1</NBenchVersion>
<ProtobufVersion>3.24.3</ProtobufVersion>
<ProtobufVersion>3.24.4</ProtobufVersion>
<BenchmarkDotNetVersion>0.13.9</BenchmarkDotNetVersion>
<NetTestVersion>net7.0</NetTestVersion>
<FsharpVersion>6.0.5</FsharpVersion>
Expand Down Expand Up @@ -67,4 +67,4 @@
<Message Text="@(none)">
</Message>
</Target>
</Project>
</Project>
2 changes: 1 addition & 1 deletion src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.dotTrace" Version="0.13.8" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.dotTrace" Version="0.13.9" />
<!-- FluentAssertions is used in some benchmarks to validate internal behaviors -->
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.dotTrace" Version="0.13.8" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.dotTrace" Version="0.13.9" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/contrib/cluster/Akka.Cluster.Sharding/ClusterSharding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1415,10 +1415,13 @@ public IShardAllocationStrategy DefaultShardAllocationStrategy(ClusterShardingSe
}
else
{
// TODO: remove this in v1.6 and force all users to use only the new strategy going forward
// old algorithm
var threshold = settings.TuningParameters.LeastShardAllocationRebalanceThreshold;
var maxSimultaneousRebalance = settings.TuningParameters.LeastShardAllocationMaxSimultaneousRebalance;
#pragma warning disable CS0618 // Type or member is obsolete
return new LeastShardAllocationStrategy(threshold, maxSimultaneousRebalance);
#pragma warning restore CS0618 // Type or member is obsolete
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public static IShardAllocationStrategy LeastShardAllocationStrategy(int absolute
/// The number of ongoing rebalancing processes can be limited by `maxSimultaneousRebalance`.
/// </summary>
[Serializable]
[Obsolete("Use ShardAllocationStrategy.LeastShardAllocationStrategy instead. This will be removed in v1.6.")]
public class LeastShardAllocationStrategy : AbstractLeastShardAllocationStrategy
{
private readonly int _rebalanceThreshold;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyTitle>Akka.DistributedData.LightningDB</AssemblyTitle>
Expand All @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="LightningDB" Version="0.15.0"/>
<PackageReference Include="LightningDB" Version="0.16.0"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.SQLite" Version="7.0.11"/>
<PackageReference Include="Microsoft.Data.SQLite" Version="7.0.13"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ namespace Akka.Cluster.Sharding
{
void Start();
}
[System.ObsoleteAttribute("Use ShardAllocationStrategy.LeastShardAllocationStrategy instead. This will be re" +
"moved in v1.6.")]
public class LeastShardAllocationStrategy : Akka.Cluster.Sharding.Internal.AbstractLeastShardAllocationStrategy
{
public LeastShardAllocationStrategy(int rebalanceThreshold, int maxSimultaneousRebalance) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ namespace Akka.Cluster.Sharding
{
void Start();
}
[System.ObsoleteAttribute("Use ShardAllocationStrategy.LeastShardAllocationStrategy instead. This will be re" +
"moved in v1.6.")]
public class LeastShardAllocationStrategy : Akka.Cluster.Sharding.Internal.AbstractLeastShardAllocationStrategy
{
public LeastShardAllocationStrategy(int rebalanceThreshold, int maxSimultaneousRebalance) { }
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka/Util/SpanHacks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static int Parse(ReadOnlySpan<char> str)
if (int.TryParse(str, out var i))
return i;
#endif
throw new FormatException($"[{str.ToString()}] is now a valid numeric format");
throw new FormatException($"[{str.ToString()}] is not a valid numeric format");
}

private const char Negative = '-';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.SQLite" Version="7.0.11" />
<PackageReference Include="Microsoft.Data.SQLite" Version="7.0.13" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 6987f02

Please sign in to comment.