Skip to content

Patch Chronicle Core, Chronicle Map, Spark Unsafe, and Hadoop Client API to improve compatibility with Java 26+#481

Merged
lbulej merged 5 commits intomasterfrom
issue/474
Oct 8, 2025
Merged

Patch Chronicle Core, Chronicle Map, Spark Unsafe, and Hadoop Client API to improve compatibility with Java 26+#481
lbulej merged 5 commits intomasterfrom
issue/474

Conversation

@lbulej
Copy link
Copy Markdown
Member

@lbulej lbulej commented Sep 25, 2025

Patches Chronicle Core, Chronicle Map, Spark Unsafe to avoid reflective lookups for internal classes, such as jdk.internal.ref.Cleaner removed in Java 26-ea+6, which broke the db-shootout and Spark benchmarks on Java 26+.

To move away from patching byte code using ASM, the patching process uses tiny dedicated projects containing specific classes modified to remove the offending code. This requires more recent Java to compile the suite, but avoids the complexity of byte code patching.

The previous patch to Hadoop Client API (#453) has been converted to use the same approach.

The source code of the original (unpatched) versions of the classes has been included alongside the patched versions to make it easier to see the differences if/when we need to update the patches (even though I would like them to disappear).

BTW, there are some good news: there has been progress on HADOOP-19212 and the Hadoop trunk branch (past 3.4.2) started using a SubjectUtil class instead of Subject, so maybe we can drop one of the patches when hadoop-client-api version 3.4.3 gets released.

Closes #474

…s since Java 26-ea+6

Reuses the infrastructure used for patching the Hadoop Client API and
moves the patching and remapping from the main 'renaissance' project to
the 'apacheSparkBenchmarks' project, which removes the need for doing
this twice in the 'renaissance' and 'renaissanceJmh' projects.

Also moves most of the patching logic from build.sbt into patcher.scala
(previous hadoop.scala) to reduce clutter.
@lbulej
Copy link
Copy Markdown
Member Author

lbulej commented Sep 25, 2025

I want to test this on JDK26-ea, for which we need an updated buildenv images, but it seems to be going in the right direction.

@lbulej lbulej marked this pull request as ready for review September 25, 2025 14:49
This requires more recent Java to compile the suite, but avoids the
complexity of byte code patching.

The original code is kept alongside the patched code for reference.
@lbulej lbulej force-pushed the issue/474 branch 2 times, most recently from 1b2d6af to 0c9742c Compare September 29, 2025 09:23
Uses v17 images for style/build/readme jobs, but keeps v15 images (with
Fedora 41) for the plugins/run jobs, because running Renaissance on JDK
11 in v16 images (with Fedora 42) kept crashing, and compiling plugins
with JDK 11 in v17 failed to locate directory with C header files.

Also updates the ea-jdk workflow to use JDK 26-ea to allow testing the
JDK 26 compatibility fixes.
@lbulej lbulej force-pushed the issue/474 branch 8 times, most recently from 2bf809f to e9bb43d Compare September 29, 2025 13:18
This requires using v17 images, but because of the problems with JDK 11
on Fedora 42 in v16, we keep v15 image for JDK 11 on Linux.
@lbulej
Copy link
Copy Markdown
Member Author

lbulej commented Sep 29, 2025

I want to test this on JDK26-ea, for which we need an updated buildenv images, but it seems to be going in the right direction.

I finally managed to massage the GHA configuration to my liking (one would not believe to what lengths we have to go to share a workflow-level setting between multiple job-level keys), we seem to be running not only on JDK 25, but also on JDK 26-ea.

@lbulej lbulej merged commit 544a86c into master Oct 8, 2025
40 of 41 checks passed
@lbulej lbulej deleted the issue/474 branch October 8, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some benchmarks fail with jdk26 after JDK-8361426: (ref) Remove jdk.internal.ref.Cleaner

2 participants