You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2026/05/15 18:45:34 UTC

(solr) branch main updated: SOLR-18242: DistribFileStore: refactor, don't use SolrClientCache (#4428)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 336205f4475 SOLR-18242: DistribFileStore: refactor, don't use SolrClientCache (#4428)
336205f4475 is described below

commit 336205f44759c24ca9ab18743579cb7f6ec6cbd5
Author: Jalaz Kumar <ja...@gmail.com>
AuthorDate: Sat May 16 00:15:27 2026 +0530

    SOLR-18242: DistribFileStore: refactor, don't use SolrClientCache (#4428)
    
    SolrClientCache is only needed to pool CloudSolrClient (different clusters)
---
 .../src/java/org/apache/solr/filestore/DistribFileStore.java  | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/filestore/DistribFileStore.java b/solr/core/src/java/org/apache/solr/filestore/DistribFileStore.java
index 7fffd9ebf08..8cdd9a80b19 100644
--- a/solr/core/src/java/org/apache/solr/filestore/DistribFileStore.java
+++ b/solr/core/src/java/org/apache/solr/filestore/DistribFileStore.java
@@ -189,8 +189,7 @@ public class DistribFileStore implements FileStore {
 
       try {
         final var metadataRequest = new FileStoreApi.GetFile(getMetaPath());
-        final var client = coreContainer.getSolrClientCache().getHttpSolrClient(baseUrl);
-        final var response = metadataRequest.process(client);
+        final var response = metadataRequest.processWithBaseUrl(solrClient, baseUrl, null);
         try (final var responseStream = response.getResponseStreamIfSuccessful()) {
           metadata = Utils.newBytesConsumer((int) MAX_PKG_SIZE).accept(responseStream);
           m =
@@ -240,8 +239,8 @@ public class DistribFileStore implements FileStore {
           String baseUrl =
               coreContainer.getZkController().getZkStateReader().getBaseUrlV2ForNodeName(liveNode);
           final var metadataRequest = new FileStoreApi.GetMetadata(path);
-          final var client = coreContainer.getSolrClientCache().getHttpSolrClient(baseUrl);
-          final var metadataResponse = metadataRequest.process(client);
+          final var client = coreContainer.getDefaultHttpSolrClient();
+          final var metadataResponse = metadataRequest.processWithBaseUrl(client, baseUrl, null);
           boolean nodeHasBlob =
               metadataResponse.files != null && metadataResponse.files.containsKey(path);
 
@@ -403,9 +402,9 @@ public class DistribFileStore implements FileStore {
         try {
           final var pullFileRequest = new FileStoreApi.FetchFile(info.path);
           pullFileRequest.setGetFrom(nodeToFetchFrom);
-          final var client = coreContainer.getSolrClientCache().getHttpSolrClient(baseUrl);
+          final var client = coreContainer.getDefaultHttpSolrClient();
           // fire and forget
-          pullFileRequest.process(client);
+          pullFileRequest.processWithBaseUrl(client, baseUrl, null);
         } catch (Exception e) {
           log.info("Node: {} failed to respond for file fetch notification", node, e);
           // ignore the exception