Skip to content

Commit

Permalink
Merge with origin/main
Browse files Browse the repository at this point in the history
  • Loading branch information
malliaridis committed Oct 12, 2024
2 parents 699480d + a4cc580 commit a0f4d1e
Show file tree
Hide file tree
Showing 145 changed files with 2,122 additions and 708 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,22 @@ jobs:

days-before-pr-stale: 60
days-before-issue-stale: -1 # we don't use issues
days-before-close: -1 # don't close stale PRs/issues
days-before-close: 60 # Close PRs marked as stale after 60 days
exempt-draft-pr: true # don't mark draft PRs as stale
exempt-pr-labels: "exempt-stale" # don't mark PRs with these labels as stale
stale-pr-label: "stale" # label to use when marking as stale
close-pr-label: "closed-stale" # label to use when closing a stale PR

stale-pr-message: >
This PR has had no activity for 60 days and is now labeled as stale.
Any new activity or converting it to draft will remove the stale label.
To attract more reviewers, please tag people who might be familiar with the code area and/or notify the dev@solr.apache.org mailing list.
Any new activity will remove the stale label.
To attract more reviewers, please tag people who might be familiar with the code area and/or notify the dev@solr.apache.org mailing list.
To exempt this PR from being marked as stale, make it a draft PR or add the label "exempt-stale".
If left unattended, this PR will be closed after another 60 days of inactivity.
Thank you for your contribution!
close-pr-message: >
This PR is now closed due to 60 days of inactivity after being marked as stale.
Re-opening this PR is still possible, in which case it will be marked as active again.
operations-per-run: 100 # operations budget
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.function.Supplier;
import org.jetbrains.annotations.NotNull;

public class SpillWriter extends Writer {
private static final int MAX_BUFFERED = 2 * 1024;
Expand All @@ -38,7 +39,7 @@ public SpillWriter(Supplier<Path> spillPathSupplier) {
}

@Override
public void write(char[] cbuf, int off, int len) throws IOException {
public void write(char @NotNull [] cbuf, int off, int len) throws IOException {
getSink(len).write(cbuf, off, len);
}

Expand All @@ -58,7 +59,7 @@ public void write(String str) throws IOException {
}

@Override
public void write(String str, int off, int len) throws IOException {
public void write(@NotNull String str, int off, int len) throws IOException {
getSink(len).write(str, off, len);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.IOException;
import java.io.PrintStream;
import java.io.Writer;
import org.jetbrains.annotations.NotNull;

class StdOutTeeWriter extends Writer {
private final Writer delegate;
Expand All @@ -35,19 +36,19 @@ public void write(int c) throws IOException {
}

@Override
public void write(char[] cbuf) throws IOException {
public void write(char @NotNull [] cbuf) throws IOException {
delegate.write(cbuf);
out.print(cbuf);
}

@Override
public void write(String str) throws IOException {
public void write(@NotNull String str) throws IOException {
delegate.write(str);
out.print(str);
}

@Override
public void write(String str, int off, int len) throws IOException {
public void write(@NotNull String str, int off, int len) throws IOException {
delegate.write(str, off, len);
out.append(str, off, len);
}
Expand All @@ -74,7 +75,7 @@ public Writer append(char c) throws IOException {
}

@Override
public void write(char[] cbuf, int off, int len) throws IOException {
public void write(char @NotNull [] cbuf, int off, int len) throws IOException {
delegate.write(cbuf, off, len);
out.print(new String(cbuf, off, len));
}
Expand Down
24 changes: 12 additions & 12 deletions build-tools/missing-doclet/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
* 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
* 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
* 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.
* 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.
*/

rootProject.name = "missing-doclet"
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ plugins {
}

// Declare default Java versions for the entire project and for SolrJ separately
rootProject.ext.minJavaVersionDefault = JavaVersion.VERSION_11
rootProject.ext.minJavaVersionSolrJ = JavaVersion.VERSION_11
rootProject.ext.minJavaVersionDefault = JavaVersion.toVersion(libs.versions.minJava.get())
rootProject.ext.minJavaVersionSolrJ = JavaVersion.toVersion(libs.versions.minJava.get())

apply from: file('gradle/globals.gradle')

Expand Down
7 changes: 7 additions & 0 deletions dev-tools/doap/solr.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@
<revision>9.0.0</revision>
</Version>
</release>
<release>
<Version>
<name>solr-8.11.4</name>
<created>2024-09-24</created>
<revision>8.11.4</revision>
</Version>
</release>
<release>
<Version>
<name>solr-8.11.3</name>
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/scripts/cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ start(){
echo "Final NUM_NODES is $NUM_NODES"
for i in `seq 1 $NUM_NODES`; do
mkdir -p "${CLUSTER_WD}/n${i}"
argsArray=(-c -s $CLUSTER_WD_FULL/n${i} -z localhost:${ZK_PORT}/solr_${SAFE_DEST} -p 898${i} -m $MEMORY \
argsArray=(-c --solr-home $CLUSTER_WD_FULL/n${i} -z localhost:${ZK_PORT}/solr_${SAFE_DEST} -p 898${i} -m $MEMORY \
-a "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=500${i} \
-Dsolr.log.dir=$CLUSTER_WD_FULL/n${i} $JVM_ARGS")
FINAL_COMMAND="${SOLR}/bin/solr ${argsArray[@]}"
Expand Down
41 changes: 31 additions & 10 deletions dev-tools/scripts/releaseWizard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ groups:
title: Create a new minor branch off the stable branch
description: |
In our case we'll create {{ release_branch }}.
Also edit `.asf.yaml` to add the new branch under `protected_branches`.
types:
- major
- minor
Expand All @@ -417,15 +416,37 @@ groups:
- !Command
cmd: git push --set-upstream origin {{ release_branch }}
tee: true
- !Command
cmd: "{{ editor }} .asf.yaml"
comment: |
Add the new branch {{ release_branch }} under `protected_branches` in `.asf.yaml`. An editor will open.
stdout: true
- !Command
cmd: git add .asf.yaml && git commit -m "Add branch protection for {{ release_branch }}" && git push
logfile: commit-branch-protection.log
tee: true
- !Todo
id: protect_branches
title: Protect the new git branch(es)
vars:
branch_names: "{{ release_branch }}{% if release_type == 'major' %} and {{ stable_branch }}{% endif %}"
description: >
Edit `.asf.yaml` to protect new git branch(es) {{ branch_names }}.
types:
- major
- minor
depends: create_minor_branch
commands: !Commands
root_folder: '{{ git_checkout_folder }}'
commands_text: Run these commands to edit `.asf.yaml` and protect the new branch(es)
commands:
- !Command
cmd: git checkout main
tee: true
- !Command
cmd: git pull --ff-only
tee: true
- !Command
cmd: "{{ editor }} .asf.yaml"
comment: >
Add the newly created branch(es) {{ branch_names }}
under `protected_branches` in `.asf.yaml`. An editor will open.
stdout: true
- !Command
cmd: git add .asf.yaml && git commit -m "Add branch protection for {{ branch_names }}" && git push
logfile: commit-branch-protection.log
tee: true
- !Todo
id: update_minor_branch_prerelease_antora
title: Update Ref Guide Metadata for new Minor Branch
Expand Down
2 changes: 0 additions & 2 deletions gradle/validation/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
* spotless and Google Java Format.
*/

// def resources = scriptResources(buildscript)

configure(allprojects) { prj ->
plugins.withType(JavaPlugin) {
prj.apply plugin: libs.plugins.diffplug.spotless.get().pluginId
Expand Down
16 changes: 16 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,25 @@ Other Changes

* SOLR-17279: Introduce SecurityJson.java file to Test Framework to consolidate setting up authentication in tests. (Rudy Seitz via Eric Pugh)

* SOLR-17285: SolrJ RemoteSolrException moved to SolrClient. (@samuelrivascoding)

================== 9.8.0 ==================
New Features
---------------------
* SOLR-17065: The Solr Cross-DC Project has graduated from the sandbox repository.
It will now be released as a fully supported Solr feature.
This feature closes SIP-13: Cross Data Center Replication. (Mark Miller, Andrzej Bialecki, Jason Gerlowski, Houston Putman)

* SOLR-17150: Implement `memAllowed` parameter to limit per-thread memory allocations during request processing. (Andrzej Bialecki, Gus Heck)

Improvements
---------------------
* SOLR-17158: Users using query limits (timeAllowed, cpuTimeAllowed) for whom partial results are uninteresting
may set partialResults=false. This parameter has been enhanced to reduce time spent processing partial results
and omit partialResults from the response. Since this is requested behavior, no exception is thrown and the
partialResults response header will always exist if the result was short circuited.
(Gus Heck, Andrzej Bialecki, hossman)

* SOLR-17397: SkipExistingDocumentsProcessor now functions correctly with child documents. (Tim Owens via Eric Pugh)

* SOLR-17180: Deprecate snapshotscli.sh in favour of bin/solr snapshot sub commands. Now able to manage Snapshots from the CLI. HDFS module specific snapshot script now ships as part of that module in the modules/hdfs/bin directory. (Eric Pugh)
Expand All @@ -125,6 +135,10 @@ Improvements

* SOLR-17442: Resolve -v flag conflict (version, value, verbose) in bin/solr. (Eric Pugh, Christos Malliaridis)

* SOLR-17256: Deprecate SolrRequest `setBasePath` and `getBasePath` methods. SolrJ users wishing to temporarily
override an HTTP client's base URL may use `Http2SolrClient.requestWithBaseUrl` instead. (Jason Gerlowski,
Sanjay Dutt, David Smiley)

Optimizations
---------------------
* SOLR-14985: Solrj CloudSolrClient with Solr URLs had serious performance regressions (since the
Expand Down Expand Up @@ -159,6 +173,8 @@ Bug Fixes

* SOLR-6962: bin/solr stop/start/restart should complain about missing value for options that expect a value. (Eric Pugh, Rahul Goswami)

* SOLR-17464: Fixed Http2SolrClient bug in that 'requestAsync' triggered NPE when using a shared Jetty client (Jason Gerlowski, James Dyer)

Dependency Upgrades
---------------------
(No changes)
Expand Down
6 changes: 3 additions & 3 deletions solr/bin/solr
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ function print_usage() {

if [[ "$CMD" == "start" || "$CMD" == "restart" ]]; then
echo ""
echo "Usage: solr $CMD [-f] [-c] [--host host] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [-s solr.solr.home] [-t solr.data.home] [--jvm-opts \"jvm-opts\"] [-V]"
echo "Usage: solr $CMD [-f] [-c] [--host host] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [--solr-home solr.solr.home] [--data-home solr.data.home] [--jvm-opts \"jvm-opts\"] [-V]"
echo ""
echo " -f Start Solr in foreground; default starts Solr in the background"
echo " and sends stdout / stderr to solr-PORT-console.log"
Expand All @@ -393,15 +393,15 @@ function print_usage() {
echo " -m/--memory <memory> Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g"
echo " results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m"
echo ""
echo " -s <dir> Sets the solr.solr.home system property; Solr will create core directories under"
echo " --solr-home <dir> Sets the solr.solr.home system property; Solr will create core directories under"
echo " this directory. This allows you to run multiple Solr instances on the same host"
echo " while reusing the same server directory set using the -d parameter. If set, the"
echo " specified directory should contain a solr.xml file, unless solr.xml exists in Zookeeper."
echo " This parameter is ignored when running examples (-e), as the solr.solr.home depends"
echo " on which example is run. The default value is server/solr. If passed relative dir,"
echo " validation with current dir will be done, before trying default server/<dir>"
echo ""
echo " -t/--data-home <dir> Sets the solr.data.home system property, where Solr will store index data in <instance_dir>/data subdirectories."
echo " --data-home <dir> Sets the solr.data.home system property, where Solr will store index data in <instance_dir>/data subdirectories."
echo " If not set, Solr uses solr.solr.home for config and data."
echo ""
echo " -e <example> Name of the example to run; available examples:"
Expand Down
19 changes: 10 additions & 9 deletions solr/bin/solr.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ goto done

:start_usage
@echo.
@echo Usage: solr %SCRIPT_CMD% [-f] [-c] [--host hostname] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [-s solr.solr.home] [-t solr.data.home] [--jvm-opts "jvm-opts"] [-V]
@echo Usage: solr %SCRIPT_CMD% [-f] [-c] [--host hostname] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [--solr-home solr.solr.home] [--data-home solr.data.home] [--jvm-opts "jvm-opts"] [-V]
@echo.
@echo -f Start Solr in foreground; default starts Solr in the background
@echo and sends stdout / stderr to solr-PORT-console.log
Expand All @@ -333,15 +333,15 @@ goto done
@echo -m memory Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g
@echo results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m
@echo.
@echo -s dir Sets the solr.solr.home system property; Solr will create core directories under
@echo --solr.home dir Sets the solr.solr.home system property; Solr will create core directories under
@echo this directory. This allows you to run multiple Solr instances on the same host
@echo while reusing the same server directory set using the -d parameter. If set, the
@echo specified directory should contain a solr.xml file, unless solr.xml exists in Zookeeper.
@echo This parameter is ignored when running examples (-e), as the solr.solr.home depends
@echo on which example is run. The default value is server/solr. If passed a relative dir
@echo validation with the current dir will be done before trying the default server/^<dir^>
@echo.
@echo -t dir Sets the solr.data.home system property, where Solr will store index data in ^<instance_dir^>/data subdirectories.
@echo --data-hone dir Sets the solr.data.home system property, where Solr will store index data in ^<instance_dir^>/data subdirectories.
@echo If not set, Solr uses solr.solr.home for both config and data.
@echo.
@echo -e example Name of the example to run; available examples:
Expand Down Expand Up @@ -410,6 +410,7 @@ IF "%1"=="-s" goto set_solr_home_dir
IF "%1"=="--solr-home" goto set_solr_home_dir
IF "%1"=="-t" goto set_solr_data_dir
IF "%1"=="--solr-data" goto set_solr_data_dir
IF "%1"=="--data-home" goto set_solr_data_dir
IF "%1"=="-e" goto set_example
IF "%1"=="--example" goto set_example
IF "%1"=="--host" goto set_host
Expand Down Expand Up @@ -1294,7 +1295,7 @@ IF "%1"=="-V" (
) ELSE IF "%1"=="-n" (
goto set_config_name
) ELSE IF "%1"=="-r" (
goto set_zk_recurse
goto set_zk_recursive
) ELSE IF "%1"=="-configname" (
goto set_config_name
) ELSE IF "%1"=="-d" (
Expand Down Expand Up @@ -1369,8 +1370,8 @@ set ZK_DST=%~1
SHIFT
goto parse_zk_args

:set_zk_recurse
set ZK_RECURSE="true"
:set_zk_recursive
set ZK_RECURSIVE="true"
SHIFT
goto parse_zk_args

Expand Down Expand Up @@ -1455,7 +1456,7 @@ IF "!ZK_OP!"=="upconfig" (
"%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% %SOLR_TOOL_OPTS% -Dsolr.install.dir="%SOLR_TIP%" ^
-Dlog4j.configurationFile="file:///%DEFAULT_SERVER_DIR%\resources\log4j2-console.xml" ^
-classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
org.apache.solr.cli.SolrCLI !ZK_OP! -z !ZK_HOST! --source !ZK_SRC! --destination !ZK_DST! --recurse !ZK_RECURSE! %ZK_VERBOSE%
org.apache.solr.cli.SolrCLI !ZK_OP! -z !ZK_HOST! --source !ZK_SRC! --destination !ZK_DST! --recursive !ZK_RECURSIVE! %ZK_VERBOSE%
) ELSE IF "!ZK_OP!"=="mv" (
IF "%ZK_SRC%"=="" (
set ERROR_MSG="<src> must be specified for 'mv' command"
Expand All @@ -1477,7 +1478,7 @@ IF "!ZK_OP!"=="upconfig" (
"%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% %SOLR_TOOL_OPTS% -Dsolr.install.dir="%SOLR_TIP%" ^
-Dlog4j.configurationFile="file:///%DEFAULT_SERVER_DIR%\resources\log4j2-console.xml" ^
-classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
org.apache.solr.cli.SolrCLI !ZK_OP! -z !ZK_HOST! --path !ZK_SRC! --recurse !ZK_RECURSE! %ZK_VERBOSE%
org.apache.solr.cli.SolrCLI !ZK_OP! -z !ZK_HOST! --path !ZK_SRC! --recursive !ZK_RECURSIVE! %ZK_VERBOSE%
) ELSE IF "!ZK_OP!"=="ls" (
IF "%ZK_SRC"=="" (
set ERROR_MSG="Zookeeper path to remove must be specified when using the 'ls' command"
Expand All @@ -1486,7 +1487,7 @@ IF "!ZK_OP!"=="upconfig" (
"%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% %SOLR_TOOL_OPTS% -Dsolr.install.dir="%SOLR_TIP%" ^
-Dlog4j.configurationFile="file:///%DEFAULT_SERVER_DIR%\resources\log4j2-console.xml" ^
-classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
org.apache.solr.cli.SolrCLI !ZK_OP! -z !ZK_HOST! --path !ZK_SRC! --recurse !ZK_RECURSE! %ZK_VERBOSE%
org.apache.solr.cli.SolrCLI !ZK_OP! -z !ZK_HOST! --path !ZK_SRC! --recursive !ZK_RECURSIVE! %ZK_VERBOSE%
) ELSE IF "!ZK_OP!"=="mkroot" (
IF "%ZK_SRC"=="" (
set ERROR_MSG="Zookeeper path to create must be specified when using the 'mkroot' command"
Expand Down
Loading

0 comments on commit a0f4d1e

Please sign in to comment.