markrmiller commented on PR #4312:
URL: https://github.com/apache/solr/pull/4312#issuecomment-4290703121
> Please give your 5 cents.
I think Claude likely botched this and it's not the right fix.
You can give something like this a shot and see if the tests reliably pass
for you.
I kind of prefer this, but I suppose one could also make sure the
sequential, parallel, and fallback paths all throw a RouteException rather than
just the parallel path.
```
Subject: [PATCH] try this
---
Index:
solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderWithPullReplicasTest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git
a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderWithPullReplicasTest.java
b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderWithPullReplicasTest.java
---
a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderWithPullReplicasTest.java
(revision fb7377cc11c2cbcd7f7259427699690d9ff15a50)
+++
b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderWithPullReplicasTest.java
(date 1776789070865)
@@ -246,6 +246,7 @@
zkServer.shutdown();
zkServer = new ZkTestServer(zkServer.getZkDir(), zkServer.getPort());
zkServer.run(false);
+ waitForRecoveriesToFinish(true, 30);
}
try (CloudSolrClient client = createCloudClient("collection1")) {
Index:
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
---
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
(revision fb7377cc11c2cbcd7f7259427699690d9ff15a50)
+++
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
(date 1776788165074)
@@ -1270,10 +1270,7 @@
final boolean wasCommError = wasCommError(rootCause);
if (wasCommError
- || (exc instanceof RouteException
- && (errorCode == 503)) // 404 because the core does not exist
503 service unavailable
- // TODO there are other reasons for 404. We need to change the solr
response format from HTML
- // to structured data to know that
+ || errorCode == 503 // service unavailable - Loss of a node can
cause this via any path
) {
// it was a communication error. it is likely that
// the node to which the request to be sent is down . So , expire
the state
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]