Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop JDK 11 support #16443

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .buildkite/linux_jdk_matrix_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,14 @@ steps:
value: "adoptiumjdk_21"
- label: "Adoptium JDK 17 (Eclipse Temurin)"
value: "adoptiumjdk_17"
- label: "Adoptium JDK 11 (Eclipse Temurin)"
value: "adoptiumjdk_11"
- label: "OpenJDK 21"
value: "openjdk_21"
- label: "OpenJDK 17"
value: "openjdk_17"
- label: "OpenJDK 11"
value: "openjdk_11"
- label: "Zulu 21"
value: "zulu_21"
- label: "Zulu 17"
value: "zulu_17"
- label: "Zulu 11"
value: "zulu_11"

- wait: ~
if: build.source != "schedule" && build.source != "trigger_job"
Expand Down
6 changes: 0 additions & 6 deletions .buildkite/windows_jdk_matrix_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,14 @@ steps:
value: "adoptiumjdk_21"
- label: "Adoptium JDK 17 (Eclipse Temurin)"
value: "adoptiumjdk_17"
- label: "Adoptium JDK 11 (Eclipse Temurin)"
value: "adoptiumjdk_11"
- label: "OpenJDK 21"
value: "openjdk_21"
- label: "OpenJDK 17"
value: "openjdk_17"
- label: "OpenJDK 11"
value: "openjdk_11"
- label: "Zulu 21"
value: "zulu_21"
- label: "Zulu 17"
value: "zulu_17"
- label: "Zulu 11"
value: "zulu_11"

- wait: ~
if: build.source != "schedule" && build.source != "trigger_job"
Expand Down
10 changes: 1 addition & 9 deletions config/jvm.options
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
##
################################################################

## GC configuration
11-13:-XX:+UseConcMarkSweepGC
11-13:-XX:CMSInitiatingOccupancyFraction=75
11-13:-XX:+UseCMSInitiatingOccupancyOnly

## Locale
# Set the locale language
Expand Down Expand Up @@ -59,11 +55,7 @@
#-XX:HeapDumpPath=${LOGSTASH_HOME}/heapdump.hprof

## GC logging
#-Xlog:gc*,gc+age=trace,safepoint:file=@loggc@:utctime,pid,tags:filecount=32,filesize=64m

# log GC status to a file with time stamps
# ensure the directory exists
#-Xloggc:${LS_GC_LOG_FILE}
#-Xlog:gc*,gc+age=trace,safepoint:file=${LS_GC_LOG_FILE}:utctime,pid,tags:filecount=32,filesize=64m
jsvd marked this conversation as resolved.
Show resolved Hide resolved

# Entropy source for randomness
-Djava.security.egd=file:/dev/urandom
Expand Down
14 changes: 7 additions & 7 deletions docs/static/jvm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

{ls} requires one of these versions:

* Java 11
* Java 17 (default). Check out <<jdk17-upgrade>> for settings info.
andsel marked this conversation as resolved.
Show resolved Hide resolved
* Java 21

Use the
http://www.oracle.com/technetwork/java/javase/downloads/index.html[official
Expand All @@ -17,13 +17,13 @@ for the official word on supported versions across releases.
[[bundled-jdk]]
.Bundled JDK
[NOTE]
=====
=====
{ls} offers architecture-specific
https://www.elastic.co/downloads/logstash[downloads] that include
Adoptium Eclipse Temurin 17, the latest long term support (LTS) release of the JDK.
Adoptium Eclipse Temurin 17, a long term support (LTS) release of the JDK.

Use the LS_JAVA_HOME environment variable if you want to use a JDK other than the
version that is bundled.
version that is bundled.
If you have the LS_JAVA_HOME environment variable set to use a custom JDK, Logstash
will continue to use the JDK version you have specified, even after you upgrade.
=====
Expand All @@ -40,9 +40,9 @@ On systems with Java installed, this command produces output similar to the foll

[source,shell]
-----
java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)
openjdk version "17.0.12" 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode)
-----

[float]
Expand Down
2 changes: 0 additions & 2 deletions docs/static/running-logstash-windows.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ Java(TM) SE Runtime Environment 18.9 (build 11.0.3+12-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode)
-----

NOTE: As of the publication of this document, please review this https://github.com/elastic/logstash/issues/10496[known issue that impacts Java 11] before proceeding.

Once you have <<setup-logstash>> and validated JVM pre-requisites, you may proceed.

NOTE: For the examples listed below, we are running Windows Server 2016, Java 11.0.3,
Expand Down
5 changes: 1 addition & 4 deletions logstash-core/lib/logstash/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,7 @@ def execute
deprecation_logger.deprecated msg
end

if JavaVersion::CURRENT < JavaVersion::JAVA_11
logger.warn I18n.t("logstash.runner.java.version",
:java_home => java.lang.System.getProperty("java.home"))
elsif JavaVersion::CURRENT < JavaVersion::JAVA_17
if JavaVersion::CURRENT < JavaVersion::JAVA_17
deprecation_logger.deprecated I18n.t("logstash.runner.java.version_17_minimum",
:java_home => java.lang.System.getProperty("java.home"))
end
Expand Down
8 changes: 1 addition & 7 deletions logstash-core/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,8 @@ en:
Running Logstash with the bundled JDK is recommended.
The bundled JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability.
If you have compelling reasons for using your own JDK (organizational-specific compliance requirements, for example), you can configure LS_JAVA_HOME to use that version instead.
version: >-
Starting from Logstash 8.0, the minimum required version of Java is Java 11; your Java version from
%{java_home} does not meet this requirement. Please reconfigure your version of Java to one that is supported.
Running Logstash with the bundled JDK is recommended.
The bundled JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability.
If you have compelling reasons for using your own JDK (organizational-specific compliance requirements, for example), you can configure LS_JAVA_HOME to use that version instead.
version_17_minimum: >-
Starting from Logstash 9.0, the minimum required version of Java will be Java 17;
Starting from Logstash 9.0, the minimum required version of Java is Java 17;
your Java version from `%{java_home}` does not meet this requirement.
Running Logstash with the bundled JDK is recommended.
The bundled JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
public class JavaVersion implements Comparable<JavaVersion> {

public static final JavaVersion CURRENT = parse(System.getProperty("java.specification.version"));
public static final JavaVersion JAVA_11 = parse("11");
public static final JavaVersion JAVA_17 = parse("17");

private final List<Integer> version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
public class JavaVersion implements Comparable<JavaVersion> {

public static final JavaVersion CURRENT = parse(System.getProperty("java.specification.version"));
public static final JavaVersion JAVA_11 = parse("11");
public static final JavaVersion JAVA_17 = parse("17");
private final List<Integer> version;

private JavaVersion(List<Integer> version){
private JavaVersion(List<Integer> version) {
this.version = version;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ public static void main(final String[] args) {
handleJvmOptions(args, System.getenv("LS_JAVA_OPTS"));
}

static void bailOnOldJava(){
if (JavaVersion.CURRENT.compareTo(JavaVersion.JAVA_11) < 0) {
static void bailOnOldJava() {
if (JavaVersion.CURRENT.compareTo(JavaVersion.JAVA_17) < 0) {
final String message = String.format(
Locale.ROOT,
"The minimum required Java version is 11; your Java version from [%s] does not meet this requirement",
"The minimum required Java version is 17; your Java version from [%s] does not meet this requirement",
System.getProperty("java.home")
);
System.err.println(message);
Expand Down
Loading