janhoy opened a new pull request, #4574: URL: https://github.com/apache/solr/pull/4574
https://issues.apache.org/jira/browse/SOLR-18297 ## Description Upgrades Eclipse Jetty from `12.0.34` to `12.1.10`. This is a minor-line jump (12.0 → 12.1) that the 12.0 line is being wound down for, and it required real migration work beyond the version bump — both source API changes and a server-configuration migration. ## What changed ### 1. Dependency - `eclipse-jetty` `12.0.34` → `12.1.10` in `gradle/libs.versions.toml`. - Regenerated lockfiles and license `*.sha1` files. Jetty 12.1 adds new transitive modules (`jetty-compression-common`, `jetty-compression-gzip`) and renames `jetty-ee` → `jetty-ee-webapp`; the new compression jars are covered by the existing `jetty-` license prefix. ### 2. Source API adaptations (compile, `-Werror`) Three APIs were deprecated-for-removal / removed in 12.1: - `BlockingArrayQueue(int, int)` (growBy removed) → `BlockingArrayQueue.newInstance(256, Integer.MAX_VALUE)`, preserving the original unbounded-with-initial-capacity semantics (`HttpJettySolrClient`). - `org.eclipse.jetty.io.RuntimeIOException` → `java.io.UncheckedIOException` (`SolrCore`, `CatStream`). - `HttpClient.getTransport()` → `getHttpClientTransport()` (`HttpJettySolrClientCompatibilityTest`). ### 3. Server configuration migration (`solr/server/etc/jetty.xml`) Jetty 12.1 **removed the directory-scanning deployer** (`DeploymentManager` / `deploy.providers.ContextProvider`). Since Solr serves a single, statically-known webapp, the deployer machinery is unnecessary — the webapp is now added **directly** to the `ContextHandlerCollection`, and the redundant `solr/server/contexts/solr-jetty-context.xml` is removed. Without this change the distribution fails to start on 12.1 (`ClassNotFoundException: org.eclipse.jetty.deploy.DeploymentManager`). Considered re-implementing scanning with the new APIs, but keeping it simpler. Advanced users who deploy 3rd party webapps in Solr's Jetty still have the option of tailoring jetty.xml to add those or to wire in scanning. An upgrade note has been added to the ref-guide. ### 4. Config cleanups - Set `maxResponseHeaderSize` explicitly, configurable via the new `solr.jetty.response.header.size.max` system property. Jetty 12.1 changed this default from 8KB to 16KB; the property makes the value explicit and tunable. **This is the one behavioral change administrators may notice** — response headers up to 16KB are now allowed by default. - Removed the redundant `relativeRedirectAllowed=true` set — it is the Jetty 12.1 default. ## Migration-guide review Reviewed every file under `solr/server/etc/` against the [Jetty 12.0→12.1 migration guide](https://jetty.org/docs/jetty/12.1/programming-guide/migration/12.0-to-12.1.html). The deployer block was the only outdated configuration; all other XML (SSL/HTTPS/HTTP2, gzip, request-log, threadpool) resolves cleanly on 12.1. `GzipHandler`/`DeflaterPool` are still present, so the gzip module is unaffected. ## Verification - `./gradlew check -x test` — passes (compile, forbidden-apis, license validation). - Unit tests pass: `solrj-jetty` (incl. HTTP/1↔HTTP/2 compatibility), `extraction`, and a core HTTP/servlet sample. - BATS packaging tests pass **18/18**: `test_compression`, `test_ssl` (incl. mTLS, client truststore + SecurityManager), `test_start_solr`. - Manual smoke test against a `gradlew dev` distribution: server starts, `/solr` returns HTTP 200, `WebAppContext` reports `AVAILABLE`, and gzip content-encoding negotiates correctly. ## Out of scope (potential follow-ups) - Migrating the gzip module to Jetty 12.1's pluggable `Compression` API (would also enable Brotli/Zstandard). `gzip.mod`/`GzipHandler` still work, so this is optional. - EE10 → EE11 (Jakarta Servlet 6.1) — EE10 remains supported in 12.1. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
