Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into SOLR-17442
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Sep 28, 2024
2 parents fc0120d + 00a3bf2 commit 0003706
Show file tree
Hide file tree
Showing 201 changed files with 15,312 additions and 395 deletions.
4 changes: 2 additions & 2 deletions dev-tools/scripts/smokeTestRelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs):
expected_src_root_folders = ['buildSrc', 'dev-docs', 'dev-tools', 'gradle', 'help', 'solr']
expected_src_root_files = ['build.gradle', 'gradlew', 'gradlew.bat', 'settings.gradle', 'versions.lock', 'versions.props']
expected_src_solr_files = ['build.gradle']
expected_src_solr_folders = ['benchmark', 'bin', 'modules', 'api', 'core', 'docker', 'documentation', 'example', 'licenses', 'packaging', 'distribution', 'prometheus-exporter', 'server', 'solr-ref-guide', 'solrj', 'solrj-streaming', 'solrj-zookeeper', 'test-framework', 'webapp', '.gitignore', '.gitattributes']
expected_src_solr_folders = ['benchmark', 'bin', 'modules', 'api', 'core', 'cross-dc-manager', 'docker', 'documentation', 'example', 'licenses', 'packaging', 'distribution', 'prometheus-exporter', 'server', 'solr-ref-guide', 'solrj', 'solrj-streaming', 'solrj-zookeeper', 'test-framework', 'webapp', '.gitignore', '.gitattributes']
is_in_list(in_root_folder, expected_src_root_folders)
is_in_list(in_root_folder, expected_src_root_files)
is_in_list(in_solr_folder, expected_src_solr_folders)
Expand All @@ -638,7 +638,7 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs):
elif isSlim:
is_in_list(in_root_folder, ['bin', 'docker', 'docs', 'example', 'licenses', 'server', 'lib'])
else:
is_in_list(in_root_folder, ['bin', 'modules', 'docker', 'prometheus-exporter', 'docs', 'example', 'licenses', 'server', 'lib'])
is_in_list(in_root_folder, ['bin', 'modules', 'cross-dc-manager', 'docker', 'prometheus-exporter', 'docs', 'example', 'licenses', 'server', 'lib'])

if len(in_root_folder) > 0:
raise RuntimeError('solr: unexpected files/dirs in artifact %s: %s' % (artifact, in_root_folder))
Expand Down
1 change: 1 addition & 0 deletions gradle/maven/defaults-maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ configure(rootProject) {
ext {
published = [
":solr:api",
":solr:cross-dc-manager",
":solr:core",
":solr:solrj",
":solr:solrj-streaming",
Expand Down
10 changes: 8 additions & 2 deletions gradle/solr/packaging.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
// I don't know how to untie these two cleanly.
//

configure(allprojects.findAll {project -> project.path.startsWith(":solr:modules:") || project.path.startsWith(":solr:prometheus-exporter") }) {
configure(allprojects.findAll {project -> project.path.startsWith(":solr:modules:") || project.path == ":solr:prometheus-exporter" || project.path == ":solr:cross-dc-manager" }) {
plugins.withType(JavaPlugin) {
ext {
packagingDir = file("${buildDir}/packaging")
if (project.path.startsWith(":solr:prometheus-exporter")) {
if (project.path.startsWith(":solr:prometheus-exporter") || project.path.startsWith(":solr:cross-dc-manager")) {
deps = packagingDir
} else {
deps = file("${packagingDir}/${project.name}")
Expand All @@ -62,6 +62,12 @@ configure(allprojects.findAll {project -> project.path.startsWith(":solr:modules
solrPlatformLibs project(":solr:solrj-zookeeper")
// libExt has logging libs, which we don't want. Lets users decide what they want.
solrPlatformLibs project(path: ":solr:server", configuration: 'libExt')

// The cross-dc-manager uses the cross-dc Solr module libraries as well as the Jetty server jars
if (project.path == ":solr:cross-dc-manager") {
solrPlatformLibs project(":solr:modules:cross-dc")
solrPlatformLibs project(path: ":solr:server", configuration: 'serverLib')
}
}

// An aggregate that configures lib and test-lib in a temporary location.
Expand Down
7 changes: 6 additions & 1 deletion gradle/testing/randomization.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ allprojects {

// Enable security manager, if requested. We could move the selection of security manager and security policy
// to each project's build/ configuration but it seems compact enough to keep it here for now.
if (Boolean.parseBoolean(testOptionsResolved["tests.useSecurityManager"])) {
def useSecurityManager = Boolean.parseBoolean(testOptionsResolved["tests.useSecurityManager"]);
// Allow the project to override this
if (project.ext.has("useSecurityManager")) {
useSecurityManager = project.ext.get("useSecurityManager")
}
if (useSecurityManager) {
def commonSolrDir = project(':solr').layout.projectDirectory
def javaSecurityPolicy = layout.projectDirectory.file("${resources}/policies/solr-tests.policy")
jvmArgumentProviders.add(
Expand Down
8 changes: 8 additions & 0 deletions gradle/testing/randomization/policies/solr-tests.policy
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ grant {
// needed by bytebuddy
permission java.lang.RuntimePermission "defineClass";
permission java.lang.RuntimePermission "net.bytebuddy.createJavaDispatcher";
permission java.lang.RuntimePermission "net.bytebuddy.agent.getInstrumentation";
permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.description.method";
permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.description.type";
permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.dynamic.loading";
permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.utility";

// needed by mockito
permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
permission java.lang.RuntimePermission "reflectionFactoryAccess";
Expand Down Expand Up @@ -153,6 +155,12 @@ grant {
// needed by s3mock
permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.fs";

// needed for kafka mockito
permission java.lang.RuntimePermission "manageProcess";
permission java.io.FilePermission "${/}proc${/}self${/}io", "read";
permission java.io.FilePermission "${java.home}${/}bin${/}java", "execute";
permission java.io.FilePermission "${java.home}${/}bin${/}java.exe", "execute";

// SSL related properties for Solr tests
permission javax.net.ssl.SSLPermission "setDefaultSSLContext";

Expand Down
2 changes: 1 addition & 1 deletion gradle/validation/validate-log-calls.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class ValidateLogCallsTask extends DefaultTask {

if (hasPlus) {
cause = "hasPlus: " + hasPlus
violation = true
violation = level != "error"
}
if (violation == false) {
def m = stripped =~ "\\(.*?\\)"
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ include "solr:solrj"
include "solr:solrj-zookeeper"
include "solr:solrj-streaming"
include "solr:core"
include "solr:cross-dc-manager"
include "solr:server"
include "solr:modules:analysis-extras"
include "solr:modules:clustering"
include "solr:modules:cross-dc"
include "solr:modules:opentelemetry"
include "solr:modules:extraction"
include "solr:modules:gcs-repository"
Expand Down
22 changes: 21 additions & 1 deletion solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ Other Changes
================== 9.8.0 ==================
New Features
---------------------
(No changes)
* 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)

Improvements
---------------------
Expand Down Expand Up @@ -140,6 +142,8 @@ Optimizations

* SOLR-3913: Optimize PostTool to call just optimize when both commit and optimize requested. (Eric Pugh)

* SOLR-17441: Improve system metrics collection by skipping unreadable MXBean properties, making /admin/info/system calls faster (Haythem Khiri)

Bug Fixes
---------------------
* SOLR-12429: Uploading a configset with a symbolic link produces a IOException. Now a error message to user generated instead. (Eric Pugh)
Expand All @@ -163,6 +167,10 @@ Other Changes

* SOLR-17142: Fix Gradle build sometimes gives spurious "unreferenced license file" warnings. (Uwe Schindler)

* SOLR-17448: Fixed inadvertent suppression of exceptions in the background tasks across the codebase. For certain
tasks that were scheduled via ExecutorService#submit, the results of the task execution were never examined which
led to the suppression of exceptions. (Andrey Bozhko)

* SOLR-11318: Introduce unit testing for AssertTool. (Eric Pugh, Jason Gerlowski)

================== 9.7.0 ==================
Expand Down Expand Up @@ -2643,6 +2651,18 @@ Bug Fixes

* SOLR-16164: ConfigSet API returns error if untrusted user creates from _default configset (Eric Pugh, Kevin Risden)

================== 8.11.4 ==================

Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

Bug Fixes
---------------------
* SOLR-17168: Add netty-transport-classes-epoll dependency (Colvin Cowie)

* SOLR-17417: Remove unnecessary code in PKIAuthPlugin and HttpSolrCall (Houston Putman, janhoy, Liu Huajin)

* SOLR-17418: Streamline ConfigSet modification logic. (Houston Putman, Liu Huajin)

================== 8.11.3 ==================

Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
Expand Down
3 changes: 3 additions & 0 deletions solr/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Benchmarking module for Solr.
link:bin/[]::
Scripts to start up, manage and interact with Solr instances.
link:cross-dc-manager/[]::
Contains a separate application to manage Cross-Datacenter indexing.
link:core/[]::
Base Solr code.
Expand Down
5 changes: 1 addition & 4 deletions solr/benchmark/src/java/org/apache/solr/bench/Docs.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ public Iterator<SolrInputDocument> preGenerate(int numDocs) throws InterruptedEx
new SolrNamedThreadFactory("SolrJMH DocMaker"));

for (int i = 0; i < numDocs; i++) {
executorService.submit(
() -> {
docs.add(Docs.this.inputDocument());
});
executorService.execute(() -> docs.add(Docs.this.inputDocument()));
}

executorService.shutdown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ private void indexParallel(String collection, Docs docs, int docCount)
10,
TimeUnit.SECONDS);
for (int i = 0; i < docCount; i++) {
executorService.submit(
executorService.execute(
new Runnable() {
final SplittableRandom threadRandom = random.split();

Expand Down
4 changes: 2 additions & 2 deletions solr/core/src/java/org/apache/solr/cli/ExportTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ void exportDocs() throws Exception {
CountDownLatch producerLatch = new CountDownLatch(corehandlers.size());
corehandlers.forEach(
(s, coreHandler) ->
producerThreadpool.submit(
producerThreadpool.execute(
() -> {
try {
coreHandler.exportDocsFromCore();
Expand Down Expand Up @@ -585,7 +585,7 @@ private void addProducers(Map<String, Slice> m) {
}

private void addConsumer(CountDownLatch consumerlatch) {
consumerThreadpool.submit(
consumerThreadpool.execute(
() -> {
while (true) {
SolrDocument doc;
Expand Down
2 changes: 1 addition & 1 deletion solr/core/src/java/org/apache/solr/cli/StatusTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public String getName() {
return "status";
}

public static final Option OPTION_MAXWAITSECS =
private static final Option OPTION_MAXWAITSECS =
Option.builder()
.longOpt("max-wait-secs")
.argName("SECS")
Expand Down
Loading

0 comments on commit 0003706

Please sign in to comment.