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 b9be5737969 SOLR-17877: fix: don't eagerly fetch 
DistributedCollectionCommandContext
b9be5737969 is described below

commit b9be5737969ab614e54abe0f1a23e2fe32e8ec6a
Author: David Smiley <[email protected]>
AuthorDate: Sun Aug 31 23:48:13 2025 -0400

    SOLR-17877: fix: don't eagerly fetch DistributedCollectionCommandContext
    
    And we don't need to create yet another instance either; there's already 
one in ZkController.  DistributedClusterStateUpdater is stateless.
---
 .../cloud/api/collections/DistributedCollectionCommandContext.java  | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionCommandContext.java
 
b/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionCommandContext.java
index 1e440a534fc..386778b886b 100644
--- 
a/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionCommandContext.java
+++ 
b/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionCommandContext.java
@@ -27,16 +27,12 @@ import org.apache.solr.handler.component.ShardHandler;
 
 public class DistributedCollectionCommandContext implements 
CollectionCommandContext {
   private final CoreContainer coreContainer;
-  private final DistributedClusterStateUpdater distributedClusterStateUpdater;
   private final ExecutorService executorService;
 
   public DistributedCollectionCommandContext(
       CoreContainer coreContainer, ExecutorService executorService) {
     // note: coreContainer.getZkController() is not yet instantiated; don't 
call it right now
     this.coreContainer = coreContainer;
-    this.distributedClusterStateUpdater =
-        new DistributedClusterStateUpdater(
-            
coreContainer.getConfig().getCloudConfig().getDistributedClusterStateUpdates());
     this.executorService = executorService;
   }
 
@@ -69,7 +65,7 @@ public class DistributedCollectionCommandContext implements 
CollectionCommandCon
 
   @Override
   public DistributedClusterStateUpdater getDistributedClusterStateUpdater() {
-    return this.distributedClusterStateUpdater;
+    return 
this.coreContainer.getZkController().getDistributedClusterStateUpdater();
   }
 
   @Override

Reply via email to