Skip to content

Upgrade to Solr 10.1 - #7036

Merged
andrewkfiedler merged 8 commits into
codice:masterfrom
Lambeaux:steve/solr-10
Nov 20, 2026
Merged

andrewkfiedler merged 8 commits into
codice:masterfrom
Lambeaux:steve/solr-10

Conversation

@Lambeaux

@Lambeaux Lambeaux commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Initial change to bump Solr to 10.1

Who is reviewing it?

@jaymcnallie
@jrnorth
@clockard

How should this be tested?

  • Ensure tests pass.
  • Validate the standard profile.
  • Validate the catalog-only profile.

Any background context you want to provide?

Refer to the official change list for Solr for comprehensive details. But here are some important things to keep in mind:

  • SolrJ uses JDK HTTP transport with ZooKeeper discovery; retain Netty because the wrapper declares mandatory Netty imports.
  • Solr credentials were changed to admin/password because Solr 10 introduces a requirement that the username/password do not match; DDF’s separate admin/admin login is unchanged.
  • Retain synchronous Solr CLI startup and explicit ZooKeeper security publication; omit -c because Solr 10 defaults to cloud mode.
  • Standalone Docker CORES startup explicitly selects --user-managed, uses /seed and /var/solr/data, rejects conflicting ZK_HOST, and preserves existing cores.
  • DDF Docker readiness uses untruncated bundle names and excludes only verified fragments; schema-client defaults use optional solr.http.url, blank for ZooKeeper-only installations.
  • Fix docker startup invariant(s) between local, standalone cores and cloud mode.

Regarding the Apache Archive

It seems we can rely on the Apache archive now. Refer to https://www.apache.org/legal/release-policy.html#archived, specifically:

An automated process adds releases to the archive about a day after they first appear on to https://downloads.apache.org/. Once a release is placed under https://downloads.apache.org/ it will automatically be copied over to https://archive.apache.org/dist/ and held there permanently, even after it is deleted from https://downloads.apache.org/.

@Lambeaux
Lambeaux requested a review from stustison as a code owner November 12, 2026 01:53
@Lambeaux
Lambeaux removed the request for review from stustison November 12, 2026 01:54
@jaymcnallie
jaymcnallie marked this pull request as draft November 12, 2026 17:16

@Lambeaux Lambeaux left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding comments for reviewer context.

Comment thread distribution/solr-distro/pom.xml Resolved
Comment thread pom.xml Resolved
@Lambeaux
Lambeaux marked this pull request as ready for review November 12, 2026 20:41
Comment thread distribution/solr-distro/pom.xml Resolved
Comment thread pom.xml Resolved
@andrewkfiedler
andrewkfiedler self-requested a review November 19, 2026 18:41

@andrewkfiedler andrewkfiedler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built the solr modules locally and ran the factory and backup / restore tests against them, all good. A few small things inline if you have time.

// Solr URLs instead of communicating with ZooKeeper. It’s not likely to be removed before Solr
// 11."
HttpJdkSolrClient.Builder httpBuilder = new HttpJdkSolrClient.Builder();
if (Boolean.getBoolean("solr.useBasicAuth")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding a test that covers this branch with an ENC(...) password. I swapped the decryptValue call for the raw property locally and every test in this module still passed (the itests turn basic auth on with a plaintext password, so they wouldn't catch it either).

Something like this would work:

@After
public void clearProperties() {
  System.clearProperty("solr.useBasicAuth");
  System.clearProperty("solr.username");
  System.clearProperty("solr.password");
}

@Test
public void basicAuthPasswordIsDecrypted() throws Exception {
  System.setProperty("solr.useBasicAuth", "true");
  System.setProperty("solr.username", "admin");
  System.setProperty("solr.password", "ENC(abc)");
  when(encryptionService.decryptValue("ENC(abc)")).thenReturn("secret");

  try (CloudSolrClient client =
      new SolrCloudClientFactory(encryptionService).newCloudSolrClient("localhost:2181", "c")) {
    verify(encryptionService).decryptValue("ENC(abc)");
  }
}

}
}

private HttpJdkSolrClient.Builder solrHttpClientBuilder() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could pull this into one place since SolrCloudClientFactory.newCloudSolrClient builds the same thing. solr-factory-impl is already embedded in this bundle, so a public static on the factory works without any export changes:

public static HttpJdkSolrClient.Builder httpClientBuilder(EncryptionService encryptionService) {
  HttpJdkSolrClient.Builder builder = new HttpJdkSolrClient.Builder();
  if (Boolean.getBoolean("solr.useBasicAuth")) {
    builder.withBasicAuthCredentials(
        System.getProperty("solr.username"),
        encryptionService.decryptValue(System.getProperty("solr.password")));
  }
  return builder;
}

Then both spots can use .withHttpClientBuilder(SolrCloudClientFactory.httpClientBuilder(encryptionService)).

Comment on lines -33 to -34
<bundle>mvn:org.apache.httpcomponents/httpcore-osgi/${solr.httpcore.version}</bundle>
<bundle>mvn:org.apache.httpcomponents/httpclient-osgi/${solr.httpclient.version}</bundle>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So one thing I noticed is that with these gone, catalog-solr-commands still imports org.apache.http and only resolves because catalog-plugin-oauth happens to be installed alongside it. Both the standard and catalog profiles install it so nothing breaks, but the import is only there for unused code.

I know this isn't due to your changes, but printResponse(HttpResponse) in BackupCommand and RestoreCommand isn't called anywhere, same with mockResponse in SolrCommandTest. Deleting those lets us drop the httpcore / httpclient / httpmime deps from the catalog-solr-commands pom. I tried it locally and the bundle no longer imports org.apache.http (tests still pass).

@andrewkfiedler
andrewkfiedler merged commit 8482632 into codice:master Nov 20, 2026
8 checks passed
@andrewkfiedler andrewkfiedler mentioned this pull request Nov 20, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants