Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into SOLR-15771
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Sep 12, 2023
2 parents c302561 + b98d936 commit bfa8039
Show file tree
Hide file tree
Showing 126 changed files with 1,434 additions and 606 deletions.
16 changes: 16 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ New Features
---------------------
* SOLR-16654: Add support for node-level caches (Michael Gibney)

* SOLR-16954: Make Circuit Breakers available for Update Requests (janhoy, Christine Poerschke, Pierre Salagnac)

* SOLR-15771: bin/auth creates reasonable roles and permissions for security: 'search', 'index', 'admin', and 'superadmin' and assigns user superadmin role. (Eric Pugh, janhoy)

Improvements
Expand Down Expand Up @@ -115,6 +117,13 @@ Improvements
dedicated thread pool. Backup, Restore and Split are expensive operations.
(Pierre Salagnac, David Smiley)

* SOLR-16964: The solr.jetty.ssl.sniHostCheck option now defaults to the value of SOLR_SSL_CHECK_PEER_NAME, if it is provided.
This will enable client and server hostName check settings to be governed by the same environment variable.
If users want separate client/server settings, they can manually override the solr.jetty.ssl.sniHostCheck option in SOLR_OPTS. (Houston Putman)

* SOLR-16970: SOLR_OPTS is now able to override options set by the Solr control scripts, "bin/solr" and "bin/solr.cmd". (Houston Putman)


Optimizations
---------------------

Expand Down Expand Up @@ -157,6 +166,13 @@ Bug Fixes

* SOLR-16958: Fix spurious warning about LATEST luceneMatchVersion (Colvin Cowie)

* SOLR-16955: Tracing v2 apis breaks SecurityConfHandler (Alex Deparvu, David Smiley)

* SOLR-16044: SlowRequest logging is no longer disabled if SolrCore logger set to ERROR (janhoy, hossman)

* SOLR-16415: asyncId must not have '/'; enforce this. Enhance ZK cleanup to process directories
instead of fail. (David Smiley, Paul McArthur)

Dependency Upgrades
---------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,19 @@

package org.apache.solr.client.api.endpoint;

import static org.apache.solr.client.api.util.Constants.BINARY_CONTENT_TYPE_V2;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import org.apache.solr.client.api.model.AddReplicaPropertyRequestBody;
import org.apache.solr.client.api.model.SolrJerseyResponse;

@Path("/collections/{collName}/shards/{shardName}/replicas/{replicaName}/properties/{propName}")
public interface AddReplicaPropertyApi {

@PUT
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Adds a property to the specified replica",
tags = {"replica-properties"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*/
package org.apache.solr.client.api.endpoint;

import static org.apache.solr.client.api.util.Constants.BINARY_CONTENT_TYPE_V2;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
Expand All @@ -26,8 +24,6 @@
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.apache.solr.client.api.model.GetAliasPropertyResponse;
import org.apache.solr.client.api.model.GetAllAliasPropertiesResponse;
import org.apache.solr.client.api.model.SolrJerseyResponse;
Expand All @@ -39,7 +35,6 @@
public interface AliasPropertyApis {

@GET
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Get properties for a collection alias.",
tags = {"alias-properties"})
Expand All @@ -49,7 +44,6 @@ GetAllAliasPropertiesResponse getAllAliasProperties(

@GET
@Path("/{propName}")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Get a specific property for a collection alias.",
tags = {"alias-properties"})
Expand All @@ -59,7 +53,6 @@ GetAliasPropertyResponse getAliasProperty(
throws Exception;

@PUT
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Update properties for a collection alias.",
tags = {"alias-properties"})
Expand All @@ -71,7 +64,6 @@ SolrJerseyResponse updateAliasProperties(

@PUT
@Path("/{propName}")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Update a specific property for a collection alias.",
tags = {"alias-properties"})
Expand All @@ -84,7 +76,6 @@ SolrJerseyResponse createOrUpdateAliasProperty(

@DELETE
@Path("/{propName}")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Delete a specific property for a collection alias.",
tags = {"alias-properties"})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.client.api.endpoint;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import org.apache.solr.client.api.model.BalanceReplicasRequestBody;
import org.apache.solr.client.api.model.SolrJerseyResponse;

@Path("cluster/replicas/balance")
public interface BalanceReplicasApi {
@POST
@Operation(
summary = "Balance Replicas across the given set of Nodes.",
tags = {"cluster"})
SolrJerseyResponse balanceReplicas(
@RequestBody(description = "Contains user provided parameters")
BalanceReplicasRequestBody requestBody)
throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@

package org.apache.solr.client.api.endpoint;

import static org.apache.solr.client.api.util.Constants.BINARY_CONTENT_TYPE_V2;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import javax.ws.rs.DELETE;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import org.apache.solr.client.api.model.SolrJerseyResponse;

@Path("/aliases/{aliasName}")
public interface DeleteAliasApi {

@DELETE
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Deletes an alias by its name",
tags = {"aliases"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@

package org.apache.solr.client.api.endpoint;

import static org.apache.solr.client.api.util.Constants.BINARY_CONTENT_TYPE_V2;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import javax.ws.rs.DELETE;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import org.apache.solr.client.api.model.SubResponseAccumulatingJerseyResponse;

@Path("/collections/{collectionName}")
public interface DeleteCollectionApi {

@DELETE
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Deletes a collection from SolrCloud",
tags = {"collections"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@
import static org.apache.solr.client.api.model.Constants.ASYNC;
import static org.apache.solr.client.api.model.Constants.BACKUP_LOCATION;
import static org.apache.solr.client.api.model.Constants.BACKUP_REPOSITORY;
import static org.apache.solr.client.api.util.Constants.BINARY_CONTENT_TYPE_V2;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import javax.ws.rs.DELETE;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import org.apache.solr.client.api.model.BackupDeletionResponseBody;
import org.apache.solr.client.api.model.PurgeUnusedFilesRequestBody;
Expand All @@ -39,7 +37,6 @@ public interface DeleteCollectionBackupApi {

@Path("/versions/{backupId}")
@DELETE
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Delete incremental backup point by ID",
tags = {"collection-backups"})
Expand All @@ -54,7 +51,6 @@ BackupDeletionResponseBody deleteSingleBackupById(

@Path("/versions")
@DELETE
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Delete all incremental backup points older than the most recent N",
tags = {"collection-backups"})
Expand All @@ -69,7 +65,6 @@ BackupDeletionResponseBody deleteMultipleBackupsByRecency(

@Path("/purgeUnused")
@PUT
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Garbage collect orphaned incremental backup files",
tags = {"collection-backups"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@

package org.apache.solr.client.api.endpoint;

import static org.apache.solr.client.api.util.Constants.BINARY_CONTENT_TYPE_V2;

import io.swagger.v3.oas.annotations.Parameter;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import org.apache.solr.client.api.model.DeleteCollectionSnapshotResponse;

Expand All @@ -33,7 +30,6 @@ public interface DeleteCollectionSnapshotApi {
/** This API is analogous to V1's (POST /solr/admin/collections?action=DELETESNAPSHOT) */
@DELETE
@Path("/collections/{collName}/snapshots/{snapshotName}")
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
DeleteCollectionSnapshotResponse deleteSnapshot(
@Parameter(description = "The name of the collection.", required = true)
@PathParam("collName")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,19 @@

package org.apache.solr.client.api.endpoint;

import static org.apache.solr.client.api.util.Constants.BINARY_CONTENT_TYPE_V2;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import org.apache.solr.client.api.model.DeleteNodeRequestBody;
import org.apache.solr.client.api.model.SolrJerseyResponse;

@Path("cluster/nodes/{nodeName}/clear/")
public interface DeleteNodeApi {

@POST
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Delete all replicas off of the specified SolrCloud node",
tags = {"node"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@
import static org.apache.solr.client.api.model.Constants.DELETE_INSTANCE_DIR;
import static org.apache.solr.client.api.model.Constants.FOLLOW_ALIASES;
import static org.apache.solr.client.api.model.Constants.ONLY_IF_DOWN;
import static org.apache.solr.client.api.util.Constants.BINARY_CONTENT_TYPE_V2;

import io.swagger.v3.oas.annotations.Operation;
import javax.ws.rs.DELETE;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import org.apache.solr.client.api.model.ScaleCollectionRequestBody;
import org.apache.solr.client.api.model.SubResponseAccumulatingJerseyResponse;
Expand All @@ -46,7 +44,6 @@ public interface DeleteReplicaApi {

@DELETE
@Path("/shards/{shardName}/replicas/{replicaName}")
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Delete an single replica by name",
tags = {"replicas"})
Expand All @@ -65,7 +62,6 @@ SubResponseAccumulatingJerseyResponse deleteReplicaByName(

@DELETE
@Path("/shards/{shardName}/replicas")
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Delete one or more replicas from the specified collection and shard",
tags = {"replicas"})
Expand All @@ -84,7 +80,6 @@ SubResponseAccumulatingJerseyResponse deleteReplicasByCount(

@PUT
@Path("/scale")
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Scale the replica count for all shards in the specified collection",
tags = {"replicas"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@

package org.apache.solr.client.api.endpoint;

import static org.apache.solr.client.api.util.Constants.BINARY_CONTENT_TYPE_V2;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import javax.ws.rs.DELETE;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import org.apache.solr.client.api.model.SolrJerseyResponse;

/**
Expand All @@ -36,7 +33,6 @@
public interface DeleteReplicaPropertyApi {

@DELETE
@Produces({"application/json", "application/xml", BINARY_CONTENT_TYPE_V2})
@Operation(
summary = "Delete an existing replica property",
tags = {"replica-properties"})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.client.api.endpoint;

import io.swagger.v3.oas.annotations.Operation;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import org.apache.solr.client.api.model.SolrJerseyResponse;

/** V2 API definition for triggering a leader election on a particular collection and shard. */
@Path("/collections/{collectionName}/shards/{shardName}/force-leader")
public interface ForceLeaderApi {
@POST
@Operation(
summary = "Force leader election to occur on the specified collection and shard",
tags = {"shards"})
SolrJerseyResponse forceShardLeader(
@PathParam("collectionName") String collectionName, @PathParam("shardName") String shardName);
}
Loading

0 comments on commit bfa8039

Please sign in to comment.