Skip to content

Prepare for Java 21 #11656

@gortiz

Description

@gortiz

Java 21 is already here and it includes tons of performance updates we can get for free by just changing the JVM at runtime. Remember that issues that prevent Pinot to run with Java > 15 were solved before summer (see #10528). The objective of this issue is to discuss about the changes we want to make in order to support Java 21 in Apache Pinot.

To be clear, Apache Pinot should work with Java 21 as it is right now, but we don't run any test in Java 21 and we don't provide any docker image that uses Java 21.

Current state

The current state of Apache Pinot in relation to Java version is:

  • Most of the source code must be compilable with Java 11. There are some Maven modules that must be compilable with Java 8 (mainly clients and their dependencies)
  • We provide docker images running with Java 11 and 17.
  • Our pipelines compile the source code using Java 11, 17 and 20.
  • Our pipelines run tests with Java 11, 17 and 20.

Java 21

Being close to their release, we tried to add Java 21 to Apache Pinot pipelines during the changes applied early June, but we found out that there were some Maven plugins that didn't support that. Therefore we decided to test with Java 20 instead. It would be nice to be able to at least run the tests with Java 21, even if the code is compiled with an older version of Java.

If you try to compile the project with Java 21 as it is today, you will find issues with, at least:

It is also important to know that although Java 21 was released in Sept 19th, as today the only Java distribution we use that provide docker images for Java 21 is Amazon Corretto. The other two (Temurin and Microsoft) do not.

Plan

At short term

Given that it seems we cannot run all our pipeline with Java 21, we need to:

  • Register all issues we have using Java 21 in our current pipeline.
  • (Optional) Compile with Java 11 and test with Java 21.

At long term

  • We should remove Java 20 from our pipelines and replace it with Java 21. All maven phases should be supported with Java 21.
  • Optional: We should also run all tests using UnsafePinotBufferFactory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement to existing functionality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions