From 8f727dac74bf7b5c64efa2cc321310cba7dacbf6 Mon Sep 17 00:00:00 2001 From: Alexander Volgunin Date: Fri, 20 Dec 2024 12:44:04 -0700 Subject: [PATCH 1/3] Disable load balancer address detection for localhost --- AerospikeClient/Cluster/NodeValidator.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AerospikeClient/Cluster/NodeValidator.cs b/AerospikeClient/Cluster/NodeValidator.cs index d5599f61..f8cbcd17 100644 --- a/AerospikeClient/Cluster/NodeValidator.cs +++ b/AerospikeClient/Cluster/NodeValidator.cs @@ -230,7 +230,10 @@ private void ValidateAddress(Cluster cluster, IPAddress address, string tlsName, // Disable load balancer detection for localhost. detectLoadBalancer = false; } - + } + + if (detectLoadBalancer) + { // Seed may be load balancer with changing address. Determine real address. addressCommand = (cluster.tlsPolicy != null) ? cluster.useServicesAlternate ? "service-tls-alt" : "service-tls-std" : From cb11a52f062a6178468a69a704f6efd7b3c15d46 Mon Sep 17 00:00:00 2001 From: Alexander Volgunin Date: Fri, 20 Dec 2024 12:44:59 -0700 Subject: [PATCH 2/3] Incorrect behavior of Pool.PeekFirst --- AerospikeClient/Cluster/Pool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AerospikeClient/Cluster/Pool.cs b/AerospikeClient/Cluster/Pool.cs index efb8627c..99be5142 100644 --- a/AerospikeClient/Cluster/Pool.cs +++ b/AerospikeClient/Cluster/Pool.cs @@ -154,7 +154,7 @@ public T PeekFirst() return default; } - return items[head]; + return items[head == 0 ? items.Length - 1 : head - 1]; } finally { From 959f6e4cffa17da00e7802bd9da8d5ef40a93e5e Mon Sep 17 00:00:00 2001 From: Alexander Volgunin Date: Wed, 8 Jan 2025 10:57:09 -0700 Subject: [PATCH 3/3] Listener is not copied when AsyncOperateWrite is cloned --- AerospikeClient/Async/AsyncOperateWrite.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/AerospikeClient/Async/AsyncOperateWrite.cs b/AerospikeClient/Async/AsyncOperateWrite.cs index 11e7209a..a0317b30 100644 --- a/AerospikeClient/Async/AsyncOperateWrite.cs +++ b/AerospikeClient/Async/AsyncOperateWrite.cs @@ -35,6 +35,7 @@ public AsyncOperateWrite(AsyncCluster cluster, RecordListener listener, Key key, public AsyncOperateWrite(AsyncOperateWrite other) : base(other) { + this.listener = other.listener; this.args = other.args; }