heesung-sn opened a new issue, #15207:
URL: https://github.com/apache/pulsar/issues/15207

   <!---
   Instructions for creating a PIP using this issue template:
   
    1. The author(s) of the proposal will create a GitHub issue ticket using 
this template.
       (Optionally, it can be helpful to send a note discussing the proposal to
       [email protected] mailing list before submitting this GitHub issue. 
This discussion can
       help developers gauge interest in the proposed changes before 
formalizing the proposal.)
    2. The author(s) will send a note to the [email protected] mailing list
       to start the discussion, using subject prefix `[PIP] xxx`. To determine 
the appropriate PIP
       number `xxx`, inspect the mailing list 
(https://lists.apache.org/[email protected])
       for the most recent PIP. Add 1 to that PIP's number to get your PIP's 
number.
    3. Based on the discussion and feedback, some changes might be applied by
       the author(s) to the text of the proposal.
    4. Once some consensus is reached, there will be a vote to formally approve
       the proposal. The vote will be held on the [email protected] 
mailing list. Everyone
       is welcome to vote on the proposal, though it will considered to be 
binding
       only the vote of PMC members. It will be required to have a lazy 
majority of
       at least 3 binding +1s votes. The vote should stay open for at least 48 
hours.
    5. When the vote is closed, if the outcome is positive, the state of the
       proposal is updated and the Pull Requests associated with this proposal 
can
       start to get merged into the master branch.
   
   -->
   
   ## 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 client Java target version as-is, to Java8, for the 
client runtime compatibility — Pulsar client should be able to run on 
customers’ current java runtime environment.
   
   [1][ 
https://github.com/apache/pulsar#build-pulsar](https://github.com/apache/pulsar#build-pulsar)
   [2][ 
https://pulsar.apache.org/docs/en/deploy-bare-metal/#requirements](https://pulsar.apache.org/docs/en/deploy-bare-metal/#requirements)
   [3][ https://www.java.com/releases/](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](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](https://docs.oracle.com/en/java/javase/15/text-blocks/index.html)
 (Could be useful for Pulsar Function format)
   
   ## Goal
   
   - Upgrade the Pulsar server(broker) Java version to 17 for both build and 
runtime to adapt the latest Java improvements
   - Keep the the pulsar client Java target version to 8 for the current client 
runtime environment compatibility
   - Revisit Java runtime flags for ZK, BK and Pulsar to reflect improvement 
from Java 17. For example, default using ZGC instead of G1GC.
   - Test Pulsar performance improvement on Java 17
   
   
   ## API Changes
   
   - None
   
   ## Implementation
   
   #### High Level Change 
   Currently,
   - Java8 or Java11 is required to build pulsar
   - Java8 or Java11 is required to run pulsar-broker
   - Java8(>=) is required to run pulsar-client
   - Default GC for ZK, BK and Pulsar is G1GC
   
   As a result,
   - Java17 is required to build pulsar
   - Java17 is required to run pulsar-broker
   - Java8(>=) is required to run pulsar-client
   - Default GC for ZK, BK and Pulsar is ZGC
   
   #### Assumptions
   - We expect Pulsar dependency libraries such as BookKeeper and ZooKeeper to 
work well on Java17. The compatibility needs to be tested. Any blocking issues 
will be reported and resolved as sub tasks of this work.
   - We assume that ZGC performs better than G1GC for Pulsar. We will verify 
this default change by the performance tests.
   
   #### Related Community PR
   - [Migrate Docker images and CI to Java 
17](https://github.com/apache/pulsar/pull/14355)
   
   #### Test Plan
   - Pass the pulsar OSS CI tests
   - Pass the integration tests in the SN Continuous Integration framework
   - Add Java8 Client runtime compatibility integration tests in the CI 
framework
   - Run OpenMessaging benchmark to compare performance improvement on Java17 
with the Java default runtime flag changes
   
   #### Release Plan
   - Include this update in the Pulsar 2.11 release
   
   
   ## Reject Alternatives
   - None


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to