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 3dd8e62b759 Test fix testDistributedQueryDoesNotReadFromZk (#4429)
3dd8e62b759 is described below
commit 3dd8e62b75935572e8ccef2b6e5479af4767a09d
Author: Matthew Biscocho <[email protected]>
AuthorDate: Mon May 25 09:21:02 2026 -0400
Test fix testDistributedQueryDoesNotReadFromZk (#4429)
My suspicion is that there is a race condition making it flaky where the
jetty node has not yet seen the updated state of the collection that it is
ready but the client has because we were waiting on separate zkStateReader
which is separate from the cached state from the actually jetty node and
collection. So instead, we wait on that jetty nodes ready state using it's
zkStateReader and not clients.
---
.../component/DistributedQueryComponentOptimizationTest.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java
b/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java
index 9387d8680b7..04edcd9c7f9 100644
---
a/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java
+++
b/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java
@@ -724,7 +724,12 @@ public class DistributedQueryComponentOptimizationTest
extends SolrCloudTestCase
CollectionAdminRequest.createCollection(secondColl, "conf", 1, 1)
.setCreateNodeSet(jettys.get(0).getNodeName())
.processAndWait(cluster.getSolrClient(), DEFAULT_TIMEOUT);
- cluster
+
+ // Wait on node 1's ZkStateReader (not the cluster client's) to check for
ready state
+ JettySolrRunner nodeWithoutSecondColl = jettys.get(1);
+ nodeWithoutSecondColl
+ .getCoreContainer()
+ .getZkController()
.getZkStateReader()
.waitForState(
secondColl,
@@ -735,7 +740,6 @@ public class DistributedQueryComponentOptimizationTest
extends SolrCloudTestCase
try {
// Node 1 hosts COLLECTION but not secondColl.
// Send a multi-collection query to trigger LazyCollectionRef get call
- JettySolrRunner nodeWithoutSecondColl = jettys.get(1);
try (SolrClient client =
new
HttpJettySolrClient.Builder(nodeWithoutSecondColl.getBaseUrl().toString()).build())
{