diff --git a/.java-version b/.java-version index 2bd5a0a98a36..409940768f2a 100644 --- a/.java-version +++ b/.java-version @@ -1 +1 @@ -22 +23 diff --git a/README.md b/README.md index bd85f1f7b770..1b0c7d0a844a 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Trino supports [reproducible builds](https://reproducible-builds.org) as of vers ## Build requirements * Mac OS X or Linux -* Java 22.0.0+, 64-bit +* Java 23.0.0+, 64-bit * Docker * Turn SELinux or other systems disabling write access to the local checkout off, to allow containers to mount parts of the Trino source tree @@ -90,8 +90,8 @@ After opening the project in IntelliJ, double check that the Java SDK is properly configured for the project: * Open the File menu and select Project Structure -* In the SDKs section, ensure that JDK 22 is selected (create one if none exist) -* In the Project section, ensure the Project language level is set to 22 +* In the SDKs section, ensure that JDK 23 is selected (create one if none exist) +* In the Project section, ensure the Project language level is set to 23 ### Running a testing server diff --git a/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java b/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java index 2a8c2a2d65c1..8b924245f089 100644 --- a/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java +++ b/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java @@ -27,19 +27,13 @@ import java.nio.ByteOrder; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Optional; import java.util.OptionalLong; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import java.util.stream.Stream; import static com.google.common.collect.ImmutableList.toImmutableList; -import static java.lang.Integer.parseInt; import static java.lang.String.format; -import static java.util.regex.Pattern.quote; final class TrinoSystemRequirements { @@ -61,7 +55,6 @@ private static void verifyJvmRequirements() verifyOsArchitecture(); verifyByteOrder(); verifyUsingG1Gc(); - verifyJdk8329528Workaround(); verifyFileDescriptor(); verifySlice(); verifyUtf8(); @@ -107,7 +100,7 @@ else if ("Mac OS X".equals(osName)) { private static void verifyJavaVersion() { - Version required = Version.parse("22.0.1"); + Version required = Version.parse("23+37"); if (Runtime.version().compareTo(required) < 0) { failRequirement("Trino requires Java %s at minimum (found %s)", required, Runtime.version()); @@ -131,17 +124,6 @@ private static void verifyUsingG1Gc() } } - private static void verifyJdk8329528Workaround() - { - if (Runtime.version().compareTo(Version.parse("22.0.2")) < 0) { - Optional collectionsKeepPinned = getJvmConfigurationFlag("XX:G1NumCollectionsKeepPinned"); - int requiredValue = 10000000; - if (collectionsKeepPinned.isEmpty() || parseInt(collectionsKeepPinned.get()) < requiredValue) { - failRequirement("Trino requires -XX:+UnlockDiagnosticVMOptions -XX:G1NumCollectionsKeepPinned=%d on Java versions lower than 22.0.2 due to JDK-8329528", requiredValue); - } - } - } - private static void verifyFileDescriptor() { OptionalLong maxFileDescriptorCount = getMaxFileDescriptorCount(); @@ -198,24 +180,6 @@ private static void verifySystemTimeIsReasonable() } } - private static Optional getJvmConfigurationFlag(String flag) - { - Pattern pattern = Pattern.compile("-%s=(.*)".formatted(quote(flag)), Pattern.DOTALL); - Optional matched = Optional.empty(); - List matching = new ArrayList<>(1); - for (String argument : ManagementFactory.getRuntimeMXBean().getInputArguments()) { - Matcher matcher = pattern.matcher(argument); - if (matcher.matches()) { - matched = Optional.of(matcher.group(1)); - matching.add(argument); - } - } - if (matching.size() > 1) { - failRequirement("Multiple JVM configuration flags matched %s: %s", pattern.pattern(), matching); - } - return matched; - } - @FormatMethod private static void failRequirement(String format, Object... args) { diff --git a/core/trino-server-rpm/src/main/rpm/preinstall b/core/trino-server-rpm/src/main/rpm/preinstall index c2168e954d53..d0a7e90d2c21 100644 --- a/core/trino-server-rpm/src/main/rpm/preinstall +++ b/core/trino-server-rpm/src/main/rpm/preinstall @@ -22,7 +22,7 @@ check_if_correct_java_version() { # candidate for JAVA_HOME). JAVA_VERSION=$(java_version "$1") JAVA_MAJOR=$(echo "$JAVA_VERSION" | cut -d'-' -f1 | cut -d'.' -f1) - if [ "$JAVA_MAJOR" -ge "22" ]; then + if [ "$JAVA_MAJOR" -ge "23" ]; then echo "$1" >/tmp/trino-rpm-install-java-home return 0 else @@ -34,10 +34,6 @@ check_if_correct_java_version() { if ! check_if_correct_java_version "$JAVA_HOME"; then java_found=false for candidate in \ - /usr/lib/jvm/java-22-* \ - /usr/lib/jvm/zulu-22 \ - /usr/lib/jvm/temurin-22 \ - /usr/lib/jvm/temurin-22-* \ /usr/lib/jvm/java-23-* \ /usr/lib/jvm/zulu-23 \ /usr/lib/jvm/temurin-23 \ @@ -61,7 +57,7 @@ if [ "$java_found" = false ]; then +======================================================================+ | Error: Required Java version could not be found | +----------------------------------------------------------------------+ -| JDK 22 or 23 was not detected. | +| JDK 23 was not detected. | | Recommended JDK distribution is Eclipse Temurin. | | Installation guide: https://adoptium.net/installation/linux/ | | | diff --git a/docs/src/main/sphinx/admin/resource-groups.md b/docs/src/main/sphinx/admin/resource-groups.md index 0e7638c26939..a757df61000e 100644 --- a/docs/src/main/sphinx/admin/resource-groups.md +++ b/docs/src/main/sphinx/admin/resource-groups.md @@ -161,7 +161,7 @@ evenly and each receive 50% of the queries in a given timeframe. The selector rules for pattern matching use Java's regular expression capabilities. Java implements regular expressions through the `java.util.regex` package. For more information, see the [Java -documentation](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/regex/Pattern.html). +documentation](https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/util/regex/Pattern.html). - `user` (optional): Java regex to match against user name. diff --git a/docs/src/main/sphinx/functions/conversion.md b/docs/src/main/sphinx/functions/conversion.md index 1bac63fe8c94..3789f580856d 100644 --- a/docs/src/main/sphinx/functions/conversion.md +++ b/docs/src/main/sphinx/functions/conversion.md @@ -22,7 +22,7 @@ Like {func}`cast`, but returns null if the cast fails. ## Formatting :::{function} format(format, args...) -> varchar -Returns a formatted string using the specified [format string](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/Formatter.html#syntax) +Returns a formatted string using the specified [format string](https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/util/Formatter.html#syntax) and arguments: ``` diff --git a/docs/src/main/sphinx/functions/regexp.md b/docs/src/main/sphinx/functions/regexp.md index 8ced5196cf59..2e68b8c811e3 100644 --- a/docs/src/main/sphinx/functions/regexp.md +++ b/docs/src/main/sphinx/functions/regexp.md @@ -184,6 +184,6 @@ SELECT regexp_split('1a 2b 14m', '\s*[a-z]+\s*'); -- [1, 2, 14, ] ``` ::: -[capturing group number]: https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/regex/Pattern.html#gnumber -[capturing groups]: https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/regex/Pattern.html#cg -[java pattern]: https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/regex/Pattern.html +[capturing group number]: https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/util/regex/Pattern.html#gnumber +[capturing groups]: https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/util/regex/Pattern.html#cg +[java pattern]: https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/util/regex/Pattern.html diff --git a/docs/src/main/sphinx/installation/deployment.md b/docs/src/main/sphinx/installation/deployment.md index 323d0a55707c..c44e12e875a5 100644 --- a/docs/src/main/sphinx/installation/deployment.md +++ b/docs/src/main/sphinx/installation/deployment.md @@ -32,10 +32,10 @@ (requirements-java)= ### Java runtime environment -Trino requires a 64-bit version of Java 22, with a minimum required version of -22.0.1 and a recommendation to use the latest patch version. Earlier major versions -such as Java 8, Java 11, Java 17 or Java 21 do not work. Newer versions such as -Java 23 are not supported -- they may work, but are not tested. +Trino requires a 64-bit version of Java 23, with a minimum required version of +23.0.0 and a recommendation to use the latest patch version. Earlier versions +such as Java 8, Java 11, Java 17, Java 21 or Java 22 do not work. +Newer versions such as Java 24 are not supported -- they may work, but are not tested. We recommend using the Eclipse Temurin OpenJDK distribution from [Adoptium](https://adoptium.net/) as the JDK for Trino, as Trino is tested diff --git a/docs/src/main/sphinx/security/tls.md b/docs/src/main/sphinx/security/tls.md index aa385a2f2ec8..fcd661403a4d 100644 --- a/docs/src/main/sphinx/security/tls.md +++ b/docs/src/main/sphinx/security/tls.md @@ -26,7 +26,7 @@ all SSL format certificates. The Trino server does not specify a set of supported ciphers, instead deferring to the defaults set by the JVM version in use. The documentation for Java 22 -lists its [supported cipher suites](https://docs.oracle.com/en/java/javase/22/security/oracle-providers.html#GUID-7093246A-31A3-4304-AC5F-5FB6400405E2__SUNJSSE_CIPHER_SUITES). +lists its [supported cipher suites](https://docs.oracle.com/en/java/javase/23/security/oracle-providers.html#GUID-7093246A-31A3-4304-AC5F-5FB6400405E2__SUNJSSE_CIPHER_SUITES). Run the following two-line code on the same JVM from the same vendor as configured on the coordinator to determine that JVM's default cipher list. @@ -55,7 +55,7 @@ considered in conjunction with your organization's security managers. Using a different suite may require downloading and installing a different SunJCE implementation package. Some locales may have export restrictions on cipher suites. See the discussion in Java documentation that begins with [Customizing -the Encryption Algorithm Providers](https://docs.oracle.com/en/java/javase/22/security/java-secure-socket-extension-jsse-reference-guide.html#GUID-316FB978-7588-442E-B829-B4973DB3B584). +the Encryption Algorithm Providers](https://docs.oracle.com/en/java/javase/23/security/java-secure-socket-extension-jsse-reference-guide.html#GUID-316FB978-7588-442E-B829-B4973DB3B584). :::{note} If you manage the coordinator's direct TLS implementation, monitor the CPU diff --git a/pom.xml b/pom.xml index 7caf3c5e972d..cc0c6cec429c 100644 --- a/pom.xml +++ b/pom.xml @@ -144,7 +144,7 @@ - 22 + 23 2024-10-10T18:17:48Z @@ -153,7 +153,7 @@ true true true - 22.0.0 + 23.0.0 syntax,reference,html,-missing 8 clean verify -DskipTests