This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new d24fd7f0e91 SOLR-17884: fix 9x backport
d24fd7f0e91 is described below

commit d24fd7f0e91a54f8c213ed125897e8821a738458
Author: David Smiley <[email protected]>
AuthorDate: Wed Oct 22 10:22:41 2025 -0400

    SOLR-17884: fix 9x backport
---
 .../java/org/apache/solr/cloud/ZkController.java   |  4 ++--
 .../impl/ConcurrentUpdateHttp2SolrClient.java      | 22 +++++++++++++++++++++-
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java 
b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index 528f5cc5015..78d3267023c 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -65,7 +65,6 @@ import org.apache.solr.client.solrj.cloud.SolrCloudManager;
 import org.apache.solr.client.solrj.impl.CloudHttp2SolrClient;
 import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.client.solrj.impl.Http2SolrClient;
-import org.apache.solr.client.solrj.impl.Http2SolrClient;
 import org.apache.solr.client.solrj.impl.SolrClientCloudManager;
 import org.apache.solr.client.solrj.impl.SolrZkClientTimeout;
 import org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider;
@@ -2256,7 +2255,8 @@ public class ZkController implements Closeable {
               leaderProps.getCoreUrl());
         }
 
-        // short timeouts, we may be in a storm and this is best effort, and 
maybe we should be the leader now
+        // short timeouts, we may be in a storm and this is best effort, and 
maybe we should be the
+        // leader now
         // TODO ideally want 8sec connection timeout but can't easily also 
share the client
         // listeners
         try (SolrClient client =
diff --git 
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
 
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
index ccfc98fa2ba..ae79909e212 100644
--- 
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
+++ 
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
@@ -178,7 +178,27 @@ public class ConcurrentUpdateHttp2SolrClient extends 
SolrClient {
   }
 
   /** Class representing an UpdateRequest and an optional collection. */
-  private record Update(UpdateRequest request, String collection) {}
+  private static class Update {
+    final UpdateRequest request;
+    final String collection;
+
+    /**
+     * @param request the update request.
+     * @param collection The collection, can be null.
+     */
+    Update(UpdateRequest request, String collection) {
+      this.request = request;
+      this.collection = collection;
+    }
+
+    UpdateRequest request() {
+      return request;
+    }
+
+    String collection() {
+      return collection;
+    }
+  }
 
   /** Opens a connection and sends everything... */
   class Runner implements Runnable {

Reply via email to