You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2024/12/03 09:01:05 UTC
(ignite-3) branch main updated: IGNITE-23827 .NET: Fix IgniteClientGroupConfiguration.Size default value (#4818)
This is an automated email from the ASF dual-hosted git repository.
ptupitsyn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 27b2e1d81c IGNITE-23827 .NET: Fix IgniteClientGroupConfiguration.Size default value (#4818)
27b2e1d81c is described below
commit 27b2e1d81cf624c2524136f251cd00d13029323e
Author: Pavel Tupitsyn <pt...@apache.org>
AuthorDate: Tue Dec 3 11:01:00 2024 +0200
IGNITE-23827 .NET: Fix IgniteClientGroupConfiguration.Size default value (#4818)
---
.../platforms/dotnet/Apache.Ignite.Tests/IgniteClientGroupTests.cs | 4 +++-
modules/platforms/dotnet/Apache.Ignite/IIgnite.cs | 2 ++
modules/platforms/dotnet/Apache.Ignite/IIgniteClient.cs | 4 ++--
.../dotnet/Apache.Ignite/IgniteClientGroupConfiguration.cs | 7 +++++--
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/modules/platforms/dotnet/Apache.Ignite.Tests/IgniteClientGroupTests.cs b/modules/platforms/dotnet/Apache.Ignite.Tests/IgniteClientGroupTests.cs
index 1137bb7b9b..e4c25c10f5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Tests/IgniteClientGroupTests.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Tests/IgniteClientGroupTests.cs
@@ -40,7 +40,9 @@ public class IgniteClientGroupTests
[Test]
public async Task TestGetClient()
{
- using IgniteClientGroup group = CreateGroup();
+ using var group = new IgniteClientGroup(
+ new IgniteClientGroupConfiguration { ClientConfiguration = new(_server.Endpoint) });
+
IIgnite client = await group.GetIgniteAsync();
IIgnite client2 = await group.GetIgniteAsync();
diff --git a/modules/platforms/dotnet/Apache.Ignite/IIgnite.cs b/modules/platforms/dotnet/Apache.Ignite/IIgnite.cs
index 593c4cd814..71823a7a0f 100644
--- a/modules/platforms/dotnet/Apache.Ignite/IIgnite.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/IIgnite.cs
@@ -28,6 +28,8 @@ namespace Apache.Ignite
/// <summary>
/// Ignite API entry point.
/// <para />
+ /// All Ignite APIs are thread-safe, unless noted otherwise.
+ /// <para />
/// Implementation can be a thin client (see <see cref="IIgniteClient"/> and <see cref="IgniteClient.StartAsync"/>),
/// or a direct IPC connection for server-side functionality like compute.
/// </summary>
diff --git a/modules/platforms/dotnet/Apache.Ignite/IIgniteClient.cs b/modules/platforms/dotnet/Apache.Ignite/IIgniteClient.cs
index 71de18fc2c..6f4b5069e6 100644
--- a/modules/platforms/dotnet/Apache.Ignite/IIgniteClient.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/IIgniteClient.cs
@@ -22,9 +22,9 @@ namespace Apache.Ignite
using Network;
/// <summary>
- /// Ignite client.
+ /// Ignite client. Extends <see cref="IIgnite"/> with client-specific functionality.
/// <para />
- /// Extends <see cref="IIgnite"/> with client-specific functionality.
+ /// All Ignite APIs are thread-safe, unless noted otherwise.
/// </summary>
public interface IIgniteClient : IIgnite, IDisposable
{
diff --git a/modules/platforms/dotnet/Apache.Ignite/IgniteClientGroupConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite/IgniteClientGroupConfiguration.cs
index 90b569df8a..ce12b6751b 100644
--- a/modules/platforms/dotnet/Apache.Ignite/IgniteClientGroupConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/IgniteClientGroupConfiguration.cs
@@ -23,9 +23,12 @@ namespace Apache.Ignite;
public sealed record IgniteClientGroupConfiguration
{
/// <summary>
- /// Gets or sets the group size (maximum number of clients).
+ /// Gets or sets the group size (maximum number of client instances - see <see cref="IIgniteClient"/>).
+ /// <para />
+ /// Defaults to 1.
+ /// One client is enough for most use cases: it is thread-safe, implements request multiplexing, and connects to multiple cluster nodes.
/// </summary>
- public int Size { get; set; }
+ public int Size { get; set; } = 1;
/// <summary>
/// Gets or sets the client configuration.