Skip to content

[fix][cli] Refactor scripts to detect major Java version and pass correct add-opens parameters - #22927

Merged
lhotari merged 1 commit into
apache:masterfrom
lhotari:lh-refactor-scripts-to-pass-correct-add-opens
Jun 19, 2024
Merged

lhotari merged 1 commit into
apache:masterfrom
lhotari:lh-refactor-scripts-to-pass-correct-add-opens

Conversation

@lhotari

@lhotari lhotari commented Jun 17, 2024 •

Copy link
Copy Markdown
Member

Motivation

  • Netty's optimized direct ByteBuffer support requires passing certain parameters to the JVM.
  • The legacy solution IS_JAVA_8 should be replaced with the JAVA_MAJOR_VERSION detection solution so that parameters could be correctly set for newer Java version.
  • Pulsar server side code doesn't support JVMs before 17 version. The script should exit when an older JVM is detected.
  • Many of the Windows .cmd scripts were broken

Modifications

  • refactor scripts to use JAVA_MAJOR_VERSION
  • consistently pass required JVM arguments so that Netty's optimized direct ByteBuffer gets used.
  • Fixed Windows .cmd scripts and made the logic match the bash scripts.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@lhotari lhotari added this to the 3.4.0 milestone Jun 17, 2024
@lhotari lhotari self-assigned this Jun 17, 2024
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Jun 17, 2024
@lhotari
lhotari marked this pull request as draft June 18, 2024 06:27
@lhotari
lhotari force-pushed the lh-refactor-scripts-to-pass-correct-add-opens branch from dcd3ce8 to 77f3033 Compare June 18, 2024 07:54
@lhotari
lhotari marked this pull request as ready for review June 18, 2024 07:54

@cbornet cbornet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lhotari
lhotari merged commit e0f545a into apache:master Jun 19, 2024
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
lhotari added a commit that referenced this pull request May 5, 2025
…rect add-opens parameters (#22927)

(cherry picked from commit e0f545a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants