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 2025/10/23 20:26:24 UTC
(solr) branch branch_10_0 updated (0f1882c25d5 -> 551f20ca656)
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a change to branch branch_10_0
in repository https://gitbox.apache.org/repos/asf/solr.git
from 0f1882c25d5 Reference SOLR-16903 once in CHANGES.txt (#3804)
new 0b75f468c33 Logs: don't add webapp=/solr (#3758)
new a270ba74419 SOLR-17069: update solr-jetty-context.xml (#3760)
new c403855b400 SOLR-17712: Deprecating waitForFinalState parameter (#3756)
new 86f68331806 SOLR-17963: Don't lock: COLLECTIONPROP, ADDREPLICAPROP, DELETEREPLICAPROP (#3786)
new 738f68fbd94 SOLR-17884: Don't depend on Apache HttpClient (#3792)
new 551f20ca656 SOLR-17897: CloudSolrClient: treat UnknownHostException as retry-able (#3791)
The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
solr/CHANGES.txt | 11 ++++
.../api/model/BalanceReplicasRequestBody.java | 1 +
.../api/model/CreateCollectionRequestBody.java | 4 +-
.../client/api/model/CreateReplicaRequestBody.java | 6 +-
.../client/api/model/CreateShardRequestBody.java | 4 +-
.../api/model/MigrateReplicasRequestBody.java | 1 +
.../client/api/model/ReplaceNodeRequestBody.java | 1 +
.../java/org/apache/solr/cloud/ZkController.java | 13 +++--
.../src/java/org/apache/solr/core/SolrCore.java | 13 ++---
.../org/apache/solr/rest/BaseSolrResource.java | 7 ---
.../java/org/apache/solr/servlet/HttpSolrCall.java | 4 --
.../test/org/apache/solr/cli/PostLogsToolTest.java | 14 ++---
.../apache/solr/cloud/CollectionsAPISolrJTest.java | 64 +++++++++++-----------
.../test/org/apache/solr/cloud/TestLockTree.java | 5 +-
solr/server/contexts/solr-jetty-context.xml | 9 +--
.../configuration-guide/pages/config-api.adoc | 1 -
.../pages/package-manager-internals.adoc | 2 -
.../pages/major-changes-in-solr-10.adoc | 7 ++-
.../client/solrj/io/sql/DatabaseMetaDataImpl.java | 4 +-
.../client/solrj/impl/CloudHttp2SolrClient.java | 5 --
.../client/solrj/impl/CloudLegacySolrClient.java | 3 +-
.../solr/client/solrj/impl/CloudSolrClient.java | 12 ++--
.../impl/ConcurrentUpdateHttp2SolrClient.java | 12 ++--
.../solrj/request/CollectionAdminRequest.java | 1 +
.../solrj/request/beans/CreateShardPayload.java | 4 +-
.../solrj/request/beans/MoveReplicaPayload.java | 4 +-
.../solrj/request/beans/SplitShardPayload.java | 4 +-
.../solr/common/params/CollectionParams.java | 6 +-
.../solr/common/params/CommonAdminParams.java | 1 +
29 files changed, 117 insertions(+), 106 deletions(-)
(solr) 04/06: SOLR-17963: Don't lock: COLLECTIONPROP, ADDREPLICAPROP, DELETEREPLICAPROP (#3786)
Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_10_0
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 86f68331806bf612a05bd2455279c3ea9deaf457
Author: David Smiley <ds...@apache.org>
AuthorDate: Sun Oct 19 10:33:08 2025 -0400
SOLR-17963: Don't lock: COLLECTIONPROP, ADDREPLICAPROP, DELETEREPLICAPROP (#3786)
These SolrCloud commands no longer aquire locks (waiting or blocking on other commands that do):
COLLECTIONPROP, ADDREPLICAPROP, DELETEREPLICAPROP.
They are atomic/transactional and are not believed to interfere with commands that need locks.
---
solr/CHANGES.txt | 3 +++
solr/core/src/test/org/apache/solr/cloud/TestLockTree.java | 5 ++---
.../src/java/org/apache/solr/common/params/CollectionParams.java | 6 +++---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index c729d365b2c..952b33034d3 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -527,6 +527,9 @@ Other Changes
* PR#3758: Logs: removed webapp=/solr and also removed from internal context map.
+* SOLR-17963: These SolrCloud commands no longer aquire locks (waiting or blocking on other commands that do):
+ COLLECTIONPROP, ADDREPLICAPROP, DELETEREPLICAPROP. (David Smiley)
+
================== 9.10.0 ==================
New Features
---------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestLockTree.java b/solr/core/src/test/org/apache/solr/cloud/TestLockTree.java
index 33455cc2f0c..2604feadd65 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestLockTree.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestLockTree.java
@@ -19,6 +19,7 @@ package org.apache.solr.cloud;
import static org.apache.solr.common.params.CollectionParams.CollectionAction.ADDREPLICAPROP;
import static org.apache.solr.common.params.CollectionParams.CollectionAction.DELETEREPLICA;
+import static org.apache.solr.common.params.CollectionParams.CollectionAction.MOCK_REPLICA_TASK;
import static org.apache.solr.common.params.CollectionParams.CollectionAction.MODIFYCOLLECTION;
import static org.apache.solr.common.params.CollectionParams.CollectionAction.SPLITSHARD;
@@ -48,8 +49,6 @@ public class TestLockTree extends SolrTestCaseJ4 {
.getSession()
.lock(CollectionAction.BALANCESHARDUNIQUE, Arrays.asList("coll1", "shard1")));
- assertNull(
- lockTree.getSession().lock(ADDREPLICAPROP, Arrays.asList("coll1", "shard1", "core_node2")));
coll1Lock.unlock();
Lock shard1Lock =
lockTree
@@ -62,7 +61,7 @@ public class TestLockTree extends SolrTestCaseJ4 {
assertNotNull(replica1Lock);
List<Pair<CollectionAction, List<String>>> operations = new ArrayList<>();
- operations.add(new Pair<>(ADDREPLICAPROP, Arrays.asList("coll1", "shard1", "core_node2")));
+ operations.add(new Pair<>(MOCK_REPLICA_TASK, Arrays.asList("coll1", "shard1", "core_node2")));
operations.add(new Pair<>(MODIFYCOLLECTION, Arrays.asList("coll1")));
operations.add(new Pair<>(SPLITSHARD, Arrays.asList("coll1", "shard1")));
operations.add(new Pair<>(SPLITSHARD, Arrays.asList("coll2", "shard2")));
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java
index 73e2e9518a1..6ae82508df4 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java
@@ -101,7 +101,7 @@ public interface CollectionParams {
ADDROLE(true, LockLevel.NONE),
REMOVEROLE(true, LockLevel.NONE),
CLUSTERPROP(true, LockLevel.NONE),
- COLLECTIONPROP(true, LockLevel.COLLECTION),
+ COLLECTIONPROP(true, LockLevel.NONE), // atomic; no lock
REQUESTSTATUS(false, LockLevel.NONE),
DELETESTATUS(false, LockLevel.NONE),
ADDREPLICA(true, LockLevel.SHARD),
@@ -111,8 +111,8 @@ public interface CollectionParams {
DISTRIBUTEDAPIPROCESSING(false, LockLevel.NONE),
LIST(false, LockLevel.NONE),
CLUSTERSTATUS(false, LockLevel.NONE),
- ADDREPLICAPROP(true, LockLevel.REPLICA),
- DELETEREPLICAPROP(true, LockLevel.REPLICA),
+ ADDREPLICAPROP(true, LockLevel.NONE), // atomic; no lock
+ DELETEREPLICAPROP(true, LockLevel.NONE), // atomic; no lock
BALANCESHARDUNIQUE(true, LockLevel.COLLECTION),
REBALANCELEADERS(true, LockLevel.COLLECTION),
MODIFYCOLLECTION(true, LockLevel.COLLECTION),
(solr) 05/06: SOLR-17884: Don't depend on Apache HttpClient (#3792)
Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_10_0
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 738f68fbd94de11303c32a06175ff34eef7d6166
Author: David Smiley <ds...@apache.org>
AuthorDate: Mon Oct 20 23:00:21 2025 -0400
SOLR-17884: Don't depend on Apache HttpClient (#3792)
* ZkController. Unfortunately using longer connection timeout (30 not 8) but at least now we re-use an internal client; get listeners for observability & security.
* SolrJ ConcurrentUpdateHttp2SolrClient (jetty). Used an inner class of a deprecated client.
* solrj-streaming DatabaseMetaDataImpl
---
solr/core/src/java/org/apache/solr/cloud/ZkController.java | 13 +++++++------
.../solr/client/solrj/io/sql/DatabaseMetaDataImpl.java | 4 ++--
.../client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java | 12 +++++++-----
3 files changed, 16 insertions(+), 13 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 bc41a64136e..4cb6a598432 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -62,7 +62,7 @@ import org.apache.solr.client.solrj.SolrClient;
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.HttpSolrClient.Builder;
+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;
@@ -2306,12 +2306,13 @@ public class ZkController implements Closeable {
}
// short timeouts, we may be in a storm and this is just best effort, and maybe we should be
- // the
- // leader now
+ // the leader now
+ // TODO ideally want 8sec connection timeout but can't easily also share the client
+ // listeners
try (SolrClient client =
- new Builder(leaderBaseUrl)
- .withConnectionTimeout(8000, TimeUnit.MILLISECONDS)
- .withSocketTimeout(30000, TimeUnit.MILLISECONDS)
+ new Http2SolrClient.Builder(leaderBaseUrl)
+ .withHttpClient(getCoreContainer().getDefaultHttpSolrClient())
+ .withIdleTimeout(30000, TimeUnit.MILLISECONDS)
.build()) {
WaitForState prepCmd = new WaitForState();
prepCmd.setCoreName(leaderCoreName);
diff --git a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/sql/DatabaseMetaDataImpl.java b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/sql/DatabaseMetaDataImpl.java
index d5b71d57219..5228f98dae3 100644
--- a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/sql/DatabaseMetaDataImpl.java
+++ b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/sql/DatabaseMetaDataImpl.java
@@ -28,7 +28,7 @@ import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
-import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder;
+import org.apache.solr.client.solrj.impl.Http2SolrClient;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.util.SimpleOrderedMap;
@@ -124,7 +124,7 @@ class DatabaseMetaDataImpl implements DatabaseMetaData {
for (String node : liveNodes) {
try {
String nodeURL = Utils.getBaseUrlForNodeName(node, urlScheme);
- solrClient = new Builder(nodeURL).build();
+ solrClient = new Http2SolrClient.Builder(nodeURL).build();
QueryResponse rsp = solrClient.query(sysQuery);
return String.valueOf(
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 58f59eb8eaf..91f57fe55cc 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
@@ -32,7 +32,6 @@ import java.util.concurrent.TimeUnit;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.Update;
import org.apache.solr.client.solrj.request.UpdateRequest;
import org.apache.solr.client.solrj.util.ClientUtils;
import org.apache.solr.common.SolrException;
@@ -177,6 +176,9 @@ public class ConcurrentUpdateHttp2SolrClient extends SolrClient {
// processedCount is now managed by StallDetection
}
+ /** Class representing an UpdateRequest and an optional collection. */
+ private record Update(UpdateRequest request, String collection) {}
+
/** Opens a connection and sends everything... */
class Runner implements Runnable {
@@ -237,16 +239,16 @@ public class ConcurrentUpdateHttp2SolrClient extends SolrClient {
InputStreamResponseListener responseListener = null;
try (Http2SolrClient.OutStream out =
- client.initOutStream(basePath, update.getRequest(), update.getCollection())) {
+ client.initOutStream(basePath, update.request(), update.collection())) {
Update upd = update;
while (upd != null) {
- UpdateRequest req = upd.getRequest();
- if (!out.belongToThisStream(req, upd.getCollection())) {
+ UpdateRequest req = upd.request();
+ if (!out.belongToThisStream(req, upd.collection())) {
// Request has different params or destination core/collection, return to queue
queue.add(upd);
break;
}
- client.send(out, upd.getRequest(), upd.getCollection());
+ client.send(out, upd.request(), upd.collection());
out.flush();
notifyQueueAndRunnersIfEmptyQueue();
(solr) 02/06: SOLR-17069: update solr-jetty-context.xml (#3760)
Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_10_0
in repository https://gitbox.apache.org/repos/asf/solr.git
commit a270ba74419e9f1849f17b2e8a899cc568535054
Author: David Smiley <ds...@apache.org>
AuthorDate: Thu Oct 16 16:30:59 2025 -0400
SOLR-17069: update solr-jetty-context.xml (#3760)
To replace deprecated config/API with newer.
Addresses a warning log message about this problem.
---
solr/server/contexts/solr-jetty-context.xml | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/solr/server/contexts/solr-jetty-context.xml b/solr/server/contexts/solr-jetty-context.xml
index bd281afaacf..b6ac292c226 100644
--- a/solr/server/contexts/solr-jetty-context.xml
+++ b/solr/server/contexts/solr-jetty-context.xml
@@ -16,17 +16,14 @@
Therefore, if we want to deduplicate these Jetty jars, we need to remove the class packages that Solr uses from the
Jetty "server" class matcher, using the "-" prefix in from of the sub-package name.
- The default server class matcher can be found here:
- https://github.com/eclipse/jetty.project/blob/jetty-10.0.12/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java#L178
-
Setting parentLoaderPriority=true is also necessary in order to be able to use these classes from the server classloader.
- Documentation for this can be found here: https://www.eclipse.org/jetty/documentation/jetty-10/old_docs/index.html#jetty-classloading
+ Documentation for this can be found here: https://jetty.org/docs/jetty/12.1/programming-guide/server/http.html#handler-use-webapp-context-class-loading
-->
<Set name="parentLoaderPriority">true</Set>
- <Call name="addServerClassMatcher">
+ <Call name="addHiddenClassMatcher">
<Arg>
- <New id="removeServerClasses" class="org.eclipse.jetty.ee10.webapp.ClassMatcher">
+ <New id="removeServerClasses" class="org.eclipse.jetty.util.ClassMatcher">
<Arg>
<Array type="java.lang.String">
<Item>-org.eclipse.jetty.</Item>
(solr) 03/06: SOLR-17712: Deprecating waitForFinalState parameter (#3756)
Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_10_0
in repository https://gitbox.apache.org/repos/asf/solr.git
commit c403855b40061ff89b031f73b62fc18a34a938f0
Author: David Smiley <ds...@apache.org>
AuthorDate: Thu Oct 16 20:01:34 2025 -0400
SOLR-17712: Deprecating waitForFinalState parameter (#3756)
* SOLR-17712: Deprecating waitForFinalState parameter
in any SolrCloud command that accepts it.
It remains defaulted to false in 9, but will become true and likely removed.
---
solr/CHANGES.txt | 3 +
.../api/model/BalanceReplicasRequestBody.java | 1 +
.../api/model/CreateCollectionRequestBody.java | 4 +-
.../client/api/model/CreateReplicaRequestBody.java | 6 +-
.../client/api/model/CreateShardRequestBody.java | 4 +-
.../api/model/MigrateReplicasRequestBody.java | 1 +
.../client/api/model/ReplaceNodeRequestBody.java | 1 +
.../apache/solr/cloud/CollectionsAPISolrJTest.java | 64 +++++++++++-----------
.../solrj/request/CollectionAdminRequest.java | 1 +
.../solrj/request/beans/CreateShardPayload.java | 4 +-
.../solrj/request/beans/MoveReplicaPayload.java | 4 +-
.../solrj/request/beans/SplitShardPayload.java | 4 +-
.../solr/common/params/CommonAdminParams.java | 1 +
13 files changed, 61 insertions(+), 37 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 15fee445e5c..c729d365b2c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -586,6 +586,9 @@ Other Changes
* SOLR-17879: A Solr node will now fail to start if it's major.minor version (e.g. 9.10) is *lower* than that of any existing
Solr node in a SolrCloud cluster (as reported by info in "live_node"). (David Smiley)
+* SOLR-17712: Deprecating waitForFinalState parameter in any SolrCloud command that accepts it.
+ It remains defaulted to false in 9, but will become true and likely removed. (Abhishek Umarjikar, David Smiley)
+
* SOLR-17956: XLSXResponseWriter has been deprecated and will be removed in a future release. (Jan Høydahl)
* SOLR-17958: The Tika Language Identifier is deprecated. Use one of the other detectors instead. (Jan Høydahl)
diff --git a/solr/api/src/java/org/apache/solr/client/api/model/BalanceReplicasRequestBody.java b/solr/api/src/java/org/apache/solr/client/api/model/BalanceReplicasRequestBody.java
index f270a48b269..508e5288cd4 100644
--- a/solr/api/src/java/org/apache/solr/client/api/model/BalanceReplicasRequestBody.java
+++ b/solr/api/src/java/org/apache/solr/client/api/model/BalanceReplicasRequestBody.java
@@ -42,6 +42,7 @@ public class BalanceReplicasRequestBody {
+ "If false, the API will return the status of the single action, which may be "
+ "before the new replica is online and active.")
@JsonProperty("waitForFinalState")
+ @Deprecated(since = "9.10")
public Boolean waitForFinalState = false;
@Schema(description = "Request ID to track this action which will be processed asynchronously.")
diff --git a/solr/api/src/java/org/apache/solr/client/api/model/CreateCollectionRequestBody.java b/solr/api/src/java/org/apache/solr/client/api/model/CreateCollectionRequestBody.java
index 5dce5840102..5b49d59d72a 100644
--- a/solr/api/src/java/org/apache/solr/client/api/model/CreateCollectionRequestBody.java
+++ b/solr/api/src/java/org/apache/solr/client/api/model/CreateCollectionRequestBody.java
@@ -38,7 +38,9 @@ public class CreateCollectionRequestBody {
@JsonProperty public Integer nrtReplicas;
- @JsonProperty public Boolean waitForFinalState;
+ @JsonProperty
+ @Deprecated(since = "9.10")
+ public Boolean waitForFinalState;
@JsonProperty public Boolean perReplicaState;
diff --git a/solr/api/src/java/org/apache/solr/client/api/model/CreateReplicaRequestBody.java b/solr/api/src/java/org/apache/solr/client/api/model/CreateReplicaRequestBody.java
index a669cdaf414..03e0a3751f2 100644
--- a/solr/api/src/java/org/apache/solr/client/api/model/CreateReplicaRequestBody.java
+++ b/solr/api/src/java/org/apache/solr/client/api/model/CreateReplicaRequestBody.java
@@ -30,7 +30,11 @@ public class CreateReplicaRequestBody {
@JsonProperty public Integer nrtReplicas;
@JsonProperty public Integer tlogReplicas;
@JsonProperty public Integer pullReplicas;
- @JsonProperty public Boolean waitForFinalState;
+
+ @JsonProperty
+ @Deprecated(since = "9.10")
+ public Boolean waitForFinalState;
+
@JsonProperty public Boolean followAliases;
@JsonProperty public String async;
diff --git a/solr/api/src/java/org/apache/solr/client/api/model/CreateShardRequestBody.java b/solr/api/src/java/org/apache/solr/client/api/model/CreateShardRequestBody.java
index ea871998cca..ed73bd5b9a0 100644
--- a/solr/api/src/java/org/apache/solr/client/api/model/CreateShardRequestBody.java
+++ b/solr/api/src/java/org/apache/solr/client/api/model/CreateShardRequestBody.java
@@ -40,7 +40,9 @@ public class CreateShardRequestBody {
@JsonProperty("nodeSet")
public List<String> nodeSet;
- @JsonProperty public Boolean waitForFinalState;
+ @JsonProperty
+ @Deprecated(since = "9.10")
+ public Boolean waitForFinalState;
@JsonProperty public Boolean followAliases;
diff --git a/solr/api/src/java/org/apache/solr/client/api/model/MigrateReplicasRequestBody.java b/solr/api/src/java/org/apache/solr/client/api/model/MigrateReplicasRequestBody.java
index 8970d6b7c4d..a0a7e3afd9b 100644
--- a/solr/api/src/java/org/apache/solr/client/api/model/MigrateReplicasRequestBody.java
+++ b/solr/api/src/java/org/apache/solr/client/api/model/MigrateReplicasRequestBody.java
@@ -48,6 +48,7 @@ public class MigrateReplicasRequestBody {
+ "If false, the API will return the status of the single action, which may be "
+ "before the new replicas are online and active.")
@JsonProperty
+ @Deprecated(since = "9.10")
public Boolean waitForFinalState = false;
@Schema(description = "Request ID to track this action which will be processed asynchronously.")
diff --git a/solr/api/src/java/org/apache/solr/client/api/model/ReplaceNodeRequestBody.java b/solr/api/src/java/org/apache/solr/client/api/model/ReplaceNodeRequestBody.java
index 303fd64e8db..95f7cb380d2 100644
--- a/solr/api/src/java/org/apache/solr/client/api/model/ReplaceNodeRequestBody.java
+++ b/solr/api/src/java/org/apache/solr/client/api/model/ReplaceNodeRequestBody.java
@@ -42,6 +42,7 @@ public class ReplaceNodeRequestBody {
+ "If false, the API will return the status of the single action, which may be "
+ "before the new replica is online and active.")
@JsonProperty("waitForFinalState")
+ @Deprecated(since = "9.10")
public Boolean waitForFinalState = false;
@Schema(description = "Request ID to track this action which will be processed asynchronously.")
diff --git a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
index e3aa232f768..992ec12f450 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
@@ -230,9 +230,10 @@ public class CollectionsAPISolrJTest extends SolrCloudTestCase {
@Test
public void testCreateAndDeleteCollection() throws Exception {
String collectionName = getSaferTestName();
- CollectionAdminResponse response =
- CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2)
- .process(cluster.getSolrClient());
+ CollectionAdminRequest.Create createREq =
+ CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2);
+ createREq.setWaitForFinalState(false);
+ CollectionAdminResponse response = createREq.process(cluster.getSolrClient());
assertEquals(0, response.getStatus());
assertTrue(response.isSuccess());
@@ -245,34 +246,35 @@ public class CollectionsAPISolrJTest extends SolrCloudTestCase {
}
// Sometimes multiple cores land on the same node so it's less than 4
- int nodesCreated = response.getCollectionNodesStatus().size();
- response =
- CollectionAdminRequest.deleteCollection(collectionName).process(cluster.getSolrClient());
-
- assertEquals(0, response.getStatus());
- assertTrue(response.isSuccess());
- Map<String, NamedList<Integer>> nodesStatus = response.getCollectionNodesStatus();
- // Delete could have been sent before the collection was finished coming online
- assertEquals(nodesStatus.toString(), nodesCreated, nodesStatus.size());
-
- waitForState(
- "Expected " + collectionName + " to disappear from cluster state",
- collectionName,
- Objects::isNull);
-
- // Test Creating a new collection.
- collectionName = "solrj_test2";
-
- response =
- CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2)
- .process(cluster.getSolrClient());
- assertEquals(0, response.getStatus());
- assertTrue(response.isSuccess());
-
- waitForState(
- "Expected " + collectionName + " to appear in cluster state",
- collectionName,
- Objects::nonNull);
+ // int nodesCreated = response.getCollectionNodesStatus().size();
+ // response =
+ //
+ // CollectionAdminRequest.deleteCollection(collectionName).process(cluster.getSolrClient());
+ //
+ // assertEquals(0, response.getStatus());
+ // assertTrue(response.isSuccess());
+ // Map<String, NamedList<Integer>> nodesStatus = response.getCollectionNodesStatus();
+ // // Delete could have been sent before the collection was finished coming online
+ // assertEquals(nodesStatus.toString(), nodesCreated, nodesStatus.size());
+ //
+ // waitForState(
+ // "Expected " + collectionName + " to disappear from cluster state",
+ // collectionName,
+ // Objects::isNull);
+ //
+ // // Test Creating a new collection.
+ // collectionName = "solrj_test2";
+ //
+ // response =
+ // CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2)
+ // .process(cluster.getSolrClient());
+ // assertEquals(0, response.getStatus());
+ // assertTrue(response.isSuccess());
+ //
+ // waitForState(
+ // "Expected " + collectionName + " to appear in cluster state",
+ // collectionName,
+ // Objects::nonNull);
}
@Test
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
index 3bff75b840e..635a6a38a25 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
@@ -167,6 +167,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
return asyncId;
}
+ @Deprecated(since = "9.10")
public void setWaitForFinalState(boolean waitForFinalState) {
this.waitForFinalState = waitForFinalState;
}
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/CreateShardPayload.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/CreateShardPayload.java
index 85b70eb183b..eaa2cb804ae 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/CreateShardPayload.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/CreateShardPayload.java
@@ -34,7 +34,9 @@ public class CreateShardPayload implements ReflectMapWriter {
@JsonProperty public String async;
- @JsonProperty public Boolean waitForFinalState;
+ @JsonProperty
+ @Deprecated(since = "9.10")
+ public Boolean waitForFinalState;
@JsonProperty public Integer replicationFactor;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/MoveReplicaPayload.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/MoveReplicaPayload.java
index 1bec9516cbe..4c075b12a46 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/MoveReplicaPayload.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/MoveReplicaPayload.java
@@ -29,7 +29,9 @@ public class MoveReplicaPayload implements ReflectMapWriter {
@JsonProperty public String sourceNode;
- @JsonProperty public Boolean waitForFinalState = false;
+ @JsonProperty
+ @Deprecated(since = "9.10")
+ public Boolean waitForFinalState = false;
@JsonProperty public Integer timeout = 600;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/SplitShardPayload.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/SplitShardPayload.java
index 677f1b25539..8b7e783e41b 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/SplitShardPayload.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/SplitShardPayload.java
@@ -46,5 +46,7 @@ public class SplitShardPayload implements ReflectMapWriter {
@JsonProperty public String async;
- @JsonProperty public Boolean waitForFinalState;
+ @JsonProperty
+ @Deprecated(since = "9.10")
+ public Boolean waitForFinalState;
}
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonAdminParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonAdminParams.java
index c8745125341..b77516daf08 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonAdminParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonAdminParams.java
@@ -22,6 +22,7 @@ public interface CommonAdminParams {
String ASYNC = "async";
/** Wait for final state of the operation. */
+ @Deprecated(since = "9.10")
String WAIT_FOR_FINAL_STATE = "waitForFinalState";
/** Allow in-place move of replicas that use shared filesystems. */
(solr) 01/06: Logs: don't add webapp=/solr (#3758)
Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_10_0
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 0b75f468c33610272f9c8c01555166f6df98effd
Author: David Smiley <ds...@apache.org>
AuthorDate: Wed Oct 15 16:48:59 2025 -0400
Logs: don't add webapp=/solr (#3758)
And remove webapp from the context map as well.
---
solr/CHANGES.txt | 2 ++
solr/core/src/java/org/apache/solr/core/SolrCore.java | 13 ++++---------
.../src/java/org/apache/solr/rest/BaseSolrResource.java | 7 -------
.../src/java/org/apache/solr/servlet/HttpSolrCall.java | 4 ----
.../src/test/org/apache/solr/cli/PostLogsToolTest.java | 14 +++++++-------
.../modules/configuration-guide/pages/config-api.adoc | 1 -
.../pages/package-manager-internals.adoc | 2 --
.../upgrade-notes/pages/major-changes-in-solr-10.adoc | 7 +++++--
8 files changed, 18 insertions(+), 32 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index af57601313e..15fee445e5c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -525,6 +525,8 @@ Other Changes
apparently has negligible impact on search performance so it's used now for all queries regardless of
their query limits params. (Andrzej Bialecki)
+* PR#3758: Logs: removed webapp=/solr and also removed from internal context map.
+
================== 9.10.0 ==================
New Features
---------------------
diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java
index 57e7fc528c1..5beca634fe3 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java
@@ -2981,18 +2981,13 @@ public class SolrCore implements SolrInfoBean, Closeable {
final NamedList<Object> responseHeader = new SimpleOrderedMap<>();
rsp.addResponseHeader(responseHeader);
- // toLog is a local ref to the same NamedList used by the response
- NamedList<Object> toLog = rsp.getToLog();
-
- // for back compat, we set these now just in case other code
- // are expecting them during handleRequest
- toLog.add("webapp", req.getContext().get("webapp"));
- toLog.add(PATH, req.getContext().get(PATH));
+ rsp.addToLog(PATH, req.getContext().get(PATH));
+ // params:
final SolrParams params = req.getParams();
final String lpList = params.get(CommonParams.LOG_PARAMS_LIST);
if (lpList == null) {
- toLog.add("params", "{" + req.getParamString() + "}");
+ rsp.addToLog("params", "{" + req.getParamString() + "}");
} else if (lpList.length() > 0) {
// Filter params by those in LOG_PARAMS_LIST so that we can then call toString
@@ -3022,7 +3017,7 @@ public class SolrCore implements SolrInfoBean, Closeable {
} // assume in lpSet
};
- toLog.add("params", "{" + filteredParams + "}");
+ rsp.addToLog("params", "{" + filteredParams + "}");
}
}
diff --git a/solr/core/src/java/org/apache/solr/rest/BaseSolrResource.java b/solr/core/src/java/org/apache/solr/rest/BaseSolrResource.java
index 0ecb8b4f101..2591a9f1fe3 100644
--- a/solr/core/src/java/org/apache/solr/rest/BaseSolrResource.java
+++ b/solr/core/src/java/org/apache/solr/rest/BaseSolrResource.java
@@ -92,13 +92,6 @@ public abstract class BaseSolrResource {
String responseWriterName = solrRequest.getParams().get(CommonParams.WT, JSON);
responseWriter = solrCore.getQueryResponseWriter(responseWriterName);
contentType = responseWriter.getContentType(solrRequest, solrResponse);
- final String path = solrRequest.getPath();
- if (!RestManager.SCHEMA_BASE_PATH.equals(path)) {
- // don't set webapp property on the request when context and core/collection are excluded
- final int cutoffPoint = path.indexOf('/', 1);
- final String firstPathElement = -1 == cutoffPoint ? path : path.substring(0, cutoffPoint);
- solrRequest.getContext().put("webapp", firstPathElement); // Context path
- }
// client application can set a timeout for update requests
String updateTimeoutSecsParam = solrRequest.getParams().get(UPDATE_TIMEOUT_SECS);
diff --git a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
index c0b78fc1a9f..24ec79d1e5f 100644
--- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
+++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
@@ -719,10 +719,6 @@ public class HttpSolrCall {
}
protected void executeCoreRequest(SolrQueryResponse rsp) {
- // a custom filter could add more stuff to the request before passing it on.
- // for example: sreq.getContext().put( "HttpServletRequest", req );
- // used for logging query stats in SolrCore.execute()
- solrReq.getContext().put("webapp", req.getContextPath());
solrReq.getCore().execute(handler, solrReq, rsp);
}
diff --git a/solr/core/src/test/org/apache/solr/cli/PostLogsToolTest.java b/solr/core/src/test/org/apache/solr/cli/PostLogsToolTest.java
index dfde71b4bda..5f2089bb5f0 100644
--- a/solr/core/src/test/org/apache/solr/cli/PostLogsToolTest.java
+++ b/solr/core/src/test/org/apache/solr/cli/PostLogsToolTest.java
@@ -46,7 +46,7 @@ public class PostLogsToolTest extends SolrTestCaseJ4 {
public void testQueryRecord() throws Exception {
String record =
sometimesSolr9Format(
- "2019-12-09 15:05:11.931 INFO (qtp2103763750-21) [c:logs4 s:shard1 r:core_node2 x:logs4_shard1_replica_n1] o.a.s.c.S.Request [logs4_shard1_replica_n1] webapp=/solr path=/select params={q=*:*&_=1575835181759&shards.purpose=36&isShard=true&wt=javabin&distrib=false} hits=234868 status=0 QTime=8\n");
+ "2019-12-09 15:05:11.931 INFO (qtp2103763750-21) [c:logs4 s:shard1 r:core_node2 x:logs4_shard1_replica_n1] o.a.s.c.S.Request [logs4_shard1_replica_n1] path=/select params={q=*:*&_=1575835181759&shards.purpose=36&isShard=true&wt=javabin&distrib=false} hits=234868 status=0 QTime=8\n");
List<SolrInputDocument> docs = readDocs(record);
assertEquals(docs.size(), 1);
SolrInputDocument doc = docs.get(0);
@@ -99,7 +99,7 @@ public class PostLogsToolTest extends SolrTestCaseJ4 {
public void testRecordsFirstInstanceOfSingleValuedParams() throws Exception {
final String record =
sometimesSolr9Format(
- "2019-12-09 15:05:01.931 INFO (qtp2103763750-21) [c:logs4 s:shard1 r:core_node2 x:logs4_shard1_replica_n1] o.a.s.c.S.Request [logs4_shard1_replica_n1] webapp=/solr path=/select params={q=*:*&q=inStock:true&_=1575835181759&shards.purpose=36&isShard=true&wt=javabin&wt=xml&distrib=false} hits=234868 status=0 QTime=8\n");
+ "2019-12-09 15:05:01.931 INFO (qtp2103763750-21) [c:logs4 s:shard1 r:core_node2 x:logs4_shard1_replica_n1] o.a.s.c.S.Request [logs4_shard1_replica_n1] path=/select params={q=*:*&q=inStock:true&_=1575835181759&shards.purpose=36&isShard=true&wt=javabin&wt=xml&distrib=false} hits=234868 status=0 QTime=8\n");
List<SolrInputDocument> docs = readDocs(record);
assertEquals(docs.size(), 1);
@@ -116,7 +116,7 @@ public class PostLogsToolTest extends SolrTestCaseJ4 {
public void testRTGRecord() throws Exception {
final String record =
sometimesSolr9Format(
- "2020-03-19 20:00:30.845 INFO (qtp1635378213-20354) [c:logs4 s:shard8 r:core_node63 x:logs4_shard8_replica_n60] o.a.s.c.S.Request [logs4_shard8_replica_n60] webapp=/solr path=/get params={qt=/get&_stateVer_=logs4:104&ids=id1&ids=id2&ids=id3&wt=javabin} status=0 QTime=61");
+ "2020-03-19 20:00:30.845 INFO (qtp1635378213-20354) [c:logs4 s:shard8 r:core_node63 x:logs4_shard8_replica_n60] o.a.s.c.S.Request [logs4_shard8_replica_n60] path=/get params={qt=/get&_stateVer_=logs4:104&ids=id1&ids=id2&ids=id3&wt=javabin} status=0 QTime=61");
List<SolrInputDocument> docs = readDocs(record);
assertEquals(docs.size(), 1);
@@ -139,8 +139,8 @@ public class PostLogsToolTest extends SolrTestCaseJ4 {
public void testUpdateRecords() throws Exception {
String record =
sometimesSolr9Format(
- "2019-12-25 20:38:23.498 INFO (qtp2103763750-126) [c:logs3 s:shard1 r:core_node2 x:logs3_shard1_replica_n1] o.a.s.u.p.LogUpdateProcessorFactory [logs3_shard1_replica_n1] webapp=/solr path=/update params={commitWithin=1000&overwrite=true&wt=json&_=1577306114481}{deleteByQuery=*:* (-1653925534487281664)} 0 11\n"
- + "2019-12-25 20:42:13.411 INFO (qtp2103763750-303) [c:logs5 s:shard1 r:core_node2 x:logs5_shard1_replica_n1] o.a.s.u.p.LogUpdateProcessorFactory [logs5_shard1_replica_n1] webapp=/solr path=/update params={commitWithin=1000&overwrite=true&wt=json&_=1577306114481}{delete=[03bbe975-728a-4df8-aa25-fe25049dc0ef (-1653925775577972736)]} 0 1\n");
+ "2019-12-25 20:38:23.498 INFO (qtp2103763750-126) [c:logs3 s:shard1 r:core_node2 x:logs3_shard1_replica_n1] o.a.s.u.p.LogUpdateProcessorFactory [logs3_shard1_replica_n1] path=/update params={commitWithin=1000&overwrite=true&wt=json&_=1577306114481}{deleteByQuery=*:* (-1653925534487281664)} 0 11\n"
+ + "2019-12-25 20:42:13.411 INFO (qtp2103763750-303) [c:logs5 s:shard1 r:core_node2 x:logs5_shard1_replica_n1] o.a.s.u.p.LogUpdateProcessorFactory [logs5_shard1_replica_n1] path=/update params={commitWithin=1000&overwrite=true&wt=json&_=1577306114481}{delete=[03bbe975-728a-4df8-aa25-fe25049dc0ef (-1653925775577972736)]} 0 1\n");
List<SolrInputDocument> docs = readDocs(record);
assertEquals(docs.size(), 2);
SolrInputDocument doc = docs.get(0);
@@ -238,7 +238,7 @@ public class PostLogsToolTest extends SolrTestCaseJ4 {
+ "\tat org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:262)\n"
+ "\t... 44 more\n"
+ "\n"
- + "2019-12-09 15:05:01.931 INFO (qtp2103763750-21) [c:logs4 s:shard1 r:core_node2 x:logs4_shard1_replica_n1] o.a.s.c.S.Request [logs4_shard1_replica_n1] webapp=/solr path=/select params={q=*:*&_=1575835181759&isShard=true&wt=javabin&distrib=false} hits=234868 status=0 QTime=8\n";
+ + "2019-12-09 15:05:01.931 INFO (qtp2103763750-21) [c:logs4 s:shard1 r:core_node2 x:logs4_shard1_replica_n1] o.a.s.c.S.Request [logs4_shard1_replica_n1] path=/select params={q=*:*&_=1575835181759&isShard=true&wt=javabin&distrib=false} hits=234868 status=0 QTime=8\n";
List<SolrInputDocument> docs = readDocs(record);
assertEquals(docs.size(), 2);
SolrInputDocument doc = docs.get(0);
@@ -270,7 +270,7 @@ public class PostLogsToolTest extends SolrTestCaseJ4 {
@Test
public void testCommit() throws Exception {
String record =
- "2021-10-08 16:42:10.636 INFO (qtp1080476785-26) [c:collection1 s:shard1 r:core_node2 x:collection1_shard1_replica_n1] o.a.s.u.p.LogUpdateProcessorFactory [collection1_shard1_replica_n1] webapp=/solr path=/update params={waitSearcher=true&commit=true&softCommit=false&wt=javabin}{commit=} 0 152";
+ "2021-10-08 16:42:10.636 INFO (qtp1080476785-26) [c:collection1 s:shard1 r:core_node2 x:collection1_shard1_replica_n1] o.a.s.u.p.LogUpdateProcessorFactory [collection1_shard1_replica_n1] path=/update params={waitSearcher=true&commit=true&softCommit=false&wt=javabin}{commit=} 0 152";
List<SolrInputDocument> docs = readDocs(record);
assertEquals(docs.size(), 1);
SolrInputDocument doc = docs.get(0);
diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/config-api.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/config-api.adoc
index 57799adab95..27bc358782b 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/config-api.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/config-api.adoc
@@ -442,7 +442,6 @@ And you should see the following as output:
"x": "y",
"rows": "10"},
"context":{
- "webapp": "/solr",
"path": "/mypath",
"httpMethod": "GET"}}
----
diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/package-manager-internals.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/package-manager-internals.adoc
index e7aa4703e46..323aa9a3bfe 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/package-manager-internals.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/package-manager-internals.adoc
@@ -311,7 +311,6 @@ curl http://localhost:8983/solr/gettingstarted/test?omitHeader=true
"params":{
"omitHeader":"true"},
"context":{
- "webapp":"/solr",
"path":"/test",
"httpMethod":"GET"},
"class":"org.apache.solr.core.RuntimeLibReqHandler",
@@ -396,7 +395,6 @@ curl http://localhost:8983/solr/gettingstarted/test?omitHeader=true
"omitHeader": "true"
},
"context": {
- "webapp": "/solr",
"path": "/test",
"httpMethod": "GET"
},
diff --git a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc
index 3d3a23f55e1..e809b9e8d8f 100644
--- a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc
+++ b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc
@@ -116,8 +116,6 @@ Solr now lets you access models encoded in ONNX format, commonly sourced from Hu
The DocumentCategorizerUpdateProcessorFactorythat lets you perform sentiment and other classification tasks on fields.
It is available as part of the `analysis-extras` module.
-
-
=== Deprecation removals
* The `jaegertracer-configurator` module, which was deprecated in 9.2, is removed. Users should migrate to the `opentelemetry` module.
@@ -185,6 +183,7 @@ Nowadays, the HTTP request is available via internal APIs: `SolrQueryRequest.get
* There is no longer a distinction between trusted and untrusted configSets; all configSets are now considered trusted. To ensure security, Solr should be properly protected using authentication and authorization mechanisms, allowing only authorized users with administrative privileges to publish them.
=== Upgrade to Jetty 12.x
+
Solr upgraded to Jetty 12.x from 10.x as Jetty 10 and 11 have reached end-of-life support. Jetty 12.x requires Java 17 or newer and is fully compatible with Solr's new minimum requirement of Java 21. This upgrade brings support for modern HTTP protocols and adopts the Jakarta EE 10 namespace. For more details, see https://webtide.com/jetty-12-has-arrived/.
=== Open Telemetry
@@ -197,6 +196,10 @@ Solr upgraded to Jetty 12.x from 10.x as Jetty 10 and 11 have reached end-of-lif
The OS version of the official Docker image and provided Dockerfile has been upgraded to Ubuntu 24 (noble) from Ubuntu 22 (jammy). The Docker base image is `eclipse-temurin:25-jre-noble`.
+=== Miscellaneous
+
+Solr logs no longer include webapp=/solr and there's no longer a "webapp" key-value pair in the internal context.
+
=== Analysis and Tokenizers
==== PathHierarchyTokenizer Behavior Change
(solr) 06/06: SOLR-17897: CloudSolrClient: treat UnknownHostException as retry-able (#3791)
Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_10_0
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 551f20ca656ec2fe24795a01bbcb88cefa504361
Author: David Smiley <ds...@apache.org>
AuthorDate: Thu Oct 23 11:12:01 2025 -0400
SOLR-17897: CloudSolrClient: treat UnknownHostException as retry-able (#3791)
CloudSolrClient now recognizes UnknownHostException as a case to refetch the cluster state and retry. A "commError".
---
solr/CHANGES.txt | 3 +++
.../apache/solr/client/solrj/impl/CloudHttp2SolrClient.java | 5 -----
.../apache/solr/client/solrj/impl/CloudLegacySolrClient.java | 3 ++-
.../org/apache/solr/client/solrj/impl/CloudSolrClient.java | 12 ++++++------
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 952b33034d3..a4aafdf11c4 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -555,6 +555,9 @@ Improvements
* SOLR-17921: SolrJ CloudSolrClient configured with a Solr URL (not ZK) now refreshes liveNodes in the background.
This will reduce spikes in request latency when the cached liveNodes have expired. (Houston Putman, David Smiley)
+* SOLR-17897: CloudSolrClient now recognizes UnknownHostException as a case to refetch the cluster
+ state and retry. (David Smiley)
+
Optimizations
---------------------
(No changes)
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
index 4b3ac046ac2..0bb4d3eb67a 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
@@ -182,11 +182,6 @@ public class CloudHttp2SolrClient extends CloudSolrClient {
return myClient;
}
- @Override
- protected boolean wasCommError(Throwable rootCause) {
- return false;
- }
-
/** Constructs {@link CloudHttp2SolrClient} instances from provided configuration. */
public static class Builder {
protected Collection<String> zkHosts = new ArrayList<>();
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudLegacySolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudLegacySolrClient.java
index e8aecc8a88b..2c660c63228 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudLegacySolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudLegacySolrClient.java
@@ -140,7 +140,8 @@ public class CloudLegacySolrClient extends CloudSolrClient {
@Override
protected boolean wasCommError(Throwable rootCause) {
- return rootCause instanceof ConnectTimeoutException
+ return super.wasCommError(rootCause)
+ || rootCause instanceof ConnectTimeoutException
|| rootCause instanceof NoHttpResponseException;
}
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
index ebe1fddf0ee..ac12e5b5722 100644
--- 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
@@ -21,8 +21,8 @@ import static org.apache.solr.common.params.CommonParams.ID;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
-import java.net.ConnectException;
import java.net.SocketException;
+import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -221,7 +221,10 @@ public abstract class CloudSolrClient extends SolrClient {
return getClusterStateProvider().getClusterState();
}
- protected abstract boolean wasCommError(Throwable t);
+ /** Is this a communication error? We will retry if so. */
+ protected boolean wasCommError(Throwable t) {
+ return t instanceof SocketException || t instanceof UnknownHostException;
+ }
@Override
public void close() throws IOException {
@@ -813,10 +816,7 @@ public abstract class CloudSolrClient extends SolrClient {
? ((SolrException) rootCause).code()
: SolrException.ErrorCode.UNKNOWN.code;
- boolean wasCommError =
- (rootCause instanceof ConnectException
- || rootCause instanceof SocketException
- || wasCommError(rootCause));
+ final boolean wasCommError = wasCommError(rootCause);
if (wasCommError
|| (exc instanceof RouteException