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

Remove support for Java 8 #1689

Closed
dblock opened this issue Dec 9, 2021 · 18 comments · Fixed by #2407
Closed

Remove support for Java 8 #1689

dblock opened this issue Dec 9, 2021 · 18 comments · Fixed by #2407
Labels
enhancement Enhancement or improvement to existing feature or request >upgrade Label used when upgrading library dependencies (e.g., Lucene) v2.0.0 Version 2.0.0

Comments

@dblock
Copy link
Member

dblock commented Dec 9, 2021

Is your feature request related to a problem?

Because Lucene 9 requires JDK 11+, remove support for Java 8.

Uncomment commented code in #2321 for killing child processes that uses JDK9+ ProcessInfo.

@dblock dblock added enhancement Enhancement or improvement to existing feature or request v2.0.0 Version 2.0.0 untriaged labels Dec 9, 2021
@reta
Copy link
Collaborator

reta commented Dec 9, 2021

@dblock this is great, I am wondering if we've ever done comprehensive benchmarking for JDK-8 vs JDK-17 for OpenSearch? I think we have all pieces in place to do that now, and it would be awesome to do that in the scope of this issue, wdyt?

@dblock
Copy link
Member Author

dblock commented Dec 9, 2021

Benchmarking is being actively worked on in #1276, add comments to that issue.

@anasalkouz
Copy link
Member

@elfisher, do you how many clients are currently using Java 8?

@anasalkouz anasalkouz added the >upgrade Label used when upgrading library dependencies (e.g., Lucene) label Dec 14, 2021
@andrross
Copy link
Member

According to this website, active support for Java 8 ends in March 2022, while security updates will continue to 2025. I'm in favor of removing support for Java 8 for new versions with the end of active support approaching, unless doing so is a significant barrier to adoption of new OpenSearch versions.

@elfisher
Copy link

@elfisher, do you how many clients are currently using Java 8?

@VijayanB and @gaiksaya do you know which java version the high-level rest and opensearch-java clients use?

@VijayanB
Copy link
Member

VijayanB commented Dec 30, 2021

opensearch-java supports Java 8 or later, but we test against only Java 14 in CI. For high-level, it should be same as OpenSearch.

@andrross
Copy link
Member

@elfisher I think the question is more whether we have users of OpenSearch using a Java 8 runtime who for whatever reason cannot easily upgrade to newer version. If possible we'd like for OpenSearch 2.0 to require Java 11 or newer as a runtime version so that we no longer have to support or test against Java 8.

@reta
Copy link
Collaborator

reta commented Jan 26, 2022

Since Apache Lucene 9.0 requires JDK-11, we have no choice but to bump Opensearch 2.0.0 minimum JDK requirements to JDK-11 (at least) as well. Looking on the other projects which are facing (or just bumping) minimum JDK requirements, it seems like going with JDK-11 may not be the best option since we have next LTS release already - JDK-17.

Different JDK vendors claim the end of (official) support of JDK-11 somewhere in 2023/2024 (for example, [1], [2]) with hard deadline being 2026 [3]. The upcoming versions of Spring and Elasticsearch are settling on JDK-17, I am wondering if we should be taking this route as well? @andrross @dblock @nknize what do yo think guys?

[1] https://www.oracle.com/java/technologies/java-se-support-roadmap.html
[2] https://access.redhat.com/articles/1299013
[3] https://endoflife.date/java

@andrross
Copy link
Member

Are there users of OpenSearch who for whatever reason run it in an environment where it is not easy to upgrade to a JDK-17 runtime? I honestly don't know the answer to that question, but my only concern is that if we move too fast on the minimum requirement then we could add barriers for such users from upgrading or adopting OpenSearch. If that is not a reasonable concern then I'm all for moving fully to the latest LTS.

@reta
Copy link
Collaborator

reta commented Jan 26, 2022

Thanks @andrross , I don't know the right answer either, we could delay the decision to the moment when 2.0.0 release materializes, but it would be good to collect compelling arguments in favour or JDK-17 as minimum required version (using latest language features is definitely one of those but not sufficient).

@andrross
Copy link
Member

Having the recommended version and minimum required version both be JDK-17 simplifies the test matrix as well.

@dblock
Copy link
Member Author

dblock commented Feb 2, 2022

That seems like a high jump. A third of users in https://discuss.opendistrocommunity.dev/t/poll-which-version-of-java-do-you-use-with-opensearch/8189 are saying they use 11, and I wonder whether it's just because it's LTS or something else.

@reta
Copy link
Collaborator

reta commented Feb 2, 2022

@dblock I believe because of LTS, right. The move from JDK-11 to JDK-17 should be super smooth, essentially - there are no reasons to stay on JDK-11 (for the vast majority of deployments).

@hashworks
Copy link

I would guess that a good amount of those 34% use 11 because OpenSearch recommends it, not because they preferred it over 17.

@jcgraybill
Copy link

The supported lifecycle of 17 is a compelling reason to adopt it for OpenSearch 1.x, in my eyes. I think we should benchmark and understand what it would take to move the minimum and recommended version to 17, and only consider dropping one of those to 8 or 11 if we identify a big obstacle.

@reta
Copy link
Collaborator

reta commented Feb 2, 2022

@jcgraybill it has been started already here #1276

@reta
Copy link
Collaborator

reta commented Feb 2, 2022

But JDK-8 is out of question if we want to move on with Apache Lucene 9.x, JDK-11 is a minimum requirement

@dblock
Copy link
Member Author

dblock commented Feb 3, 2022

@martin-gaievski Anything left here? Can we close?

@dblock dblock changed the title Remove support for Java 8, add support for Java 17 Remove support for Java 8 Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request >upgrade Label used when upgrading library dependencies (e.g., Lucene) v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants