-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
PIP-156: Build and Run Pulsar Server on Java 17 #15207
Comments
Running the broker with jdk17 and Shenandoah GC gives better performance than ZGC. |
@dave2wave, I think we could definitely test Shenandoah GC too. Let me update this part in the PIP. |
a good overview v8 vs v17 with some hints of what might be useful: |
@heesung-sn, thanks for formalizing this plan.
I think we should clarify that we support only jdk17 for all the components and jd8, jdk11 and jdk17 for the java client. (we'll need a matrix job in the CI to test the different jdk versions) We, at Datastax, have run multiple benchmarks and it looks like the performance are really improved (also using Shenandoah GC). @dave2wave is doing this kind of tests and he can share more details. My main worry is about connectors. Pulsar builtin connectors are not - all - well tested and some of them are not run by the CI and we don’t know if they will work correctly with jdk17.
For BookKeeper, we started a similar work to build and test BookKeeper with JDK17. The work is still not completed but I'm not aware of any issues (even tho, I believe that nobody is using BK with JDK17). |
Thanks, I will send a vote email for this PIP soon and start pull requests. Yes. I will work on
I will update my test addition details to make sure we don't overlap. |
@heesung-sn I would have expected you to first reply on the email thread started by @nicoloboschi in February https://lists.apache.org/thread/c0k8p9vy5wyp9l70mt980gdy10smx6qb . |
I have tested this with 1 million 100 byte messages per second using the OpenMessaging Benchmark running openJDK17. I can confirm that Shenandoah GC gives a very flat latency sustaining the average over 15 minute tests. |
It's not just client modules. There are also a few libraries that are shared between the client and the broker. The For all other modules, it's fine to set
That has been merged.
When adding these to the CI, please expand the existing GitHub Actions workflow file pulsar/.github/workflows/pulsar-ci.yaml Lines 333 to 339 in 06ba587
It's recommended to use the It would be useful to refactor the existing Pulsar Java client tests in a way that the same tests cases could be used in an integration test. Otherwise, it will lead to duplication in test logic. Refactoring this could be challenging. One reason is that the current test logic uses inheritance a lot, and that's hard to reuse across different type of tests. |
To clarify one more thing, we will update Pulsar CLIs runtime version to Java17, as CLIs are expected to run by Admin(I updated the above description for this part). |
I don't think that "CLIs are expected to be run by Admin" is a sufficient justification. A better explanation is needed. One possibility is to explain that the CLI tools currently require the Pulsar distribution and therefore it can be assumed that existing users can choose to use Java17 for running CLI tools. This is an assumption and it would be better to ask community for feedback. |
Thank you for elaborating this justification. I added yours in the description. |
Hi , |
@heesung-sn looks good. Great analysis you have there. |
@heesung-sn Please review #15670 , that includes a Java 17 optimization, the usage of |
This PIP has been completed(release target 2.11). |
Is there somewhere I can see Pulsar's release schedule? When will 2.11 be available? |
Motivation
Currently, Pulsar requires Java8 or Java11 to build[1] and run[2], which is quite out-dated, as the latest released Java version is 18[3], as of 4/14/2022 — the Java community observed that the recent Java versions have improved numerous features such as Garbage Collection[4.1][4.2] and Text Blocks[5] . Hence, as a regular maintenance, it has been recommended to upgrade the Pulsar Java version to the latest LTS(Long Term Support) version, 17[3] for both build and runtime.
We will keep the Pulsar Java client target version as-is, to Java8, for the client runtime compatibility — Pulsar client should be able to run on customers’ current java runtime environment.
We will update Pulsar CLIs runtime version to Java17, as CLIs are expected to run on the Admin environment - CLI tools currently require the Pulsar distribution, and therefore it can be assumed that existing users can choose to use Java17 for running CLI tools
[1] https://github.com/apache/pulsar#build-pulsar
[2] https://pulsar.apache.org/docs/en/deploy-bare-metal/#requirements
[3] https://www.java.com/releases/
[4.1] https://blogs.oracle.com/javamagazine/post/understanding-the-jdks-new-superfast-garbage-collectors
[4.2] https://kstefanj.github.io/2021/11/24/gc-progress-8-17.html
[5] https://docs.oracle.com/en/java/javase/15/text-blocks/index.html (Could be useful for Pulsar Function format)
Goal
API Changes
Implementation
High Level Change
Currently,
As a result,
Assumptions
Related Community PR
Test Plan
Release Plan
Reject Alternatives
The text was updated successfully, but these errors were encountered: