Skip to content

Commit 39eec3e

Browse files
committed
Add blog post about Java 24 upgrade
1 parent c34396a commit 39eec3e

File tree

2 files changed

+93
-0
lines changed

2 files changed

+93
-0
lines changed

_posts/2025-03-03-java-24.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
layout: post
3+
title: Twenty four
4+
author: Manfred Moser, Mateusz Gajewski
5+
excerpt_separator: <!--more-->
6+
image: /assets/blog/coffee-24.png
7+
---
8+
9+
Six month ago [we adopted Java 23 as requirement]({% post_url 2024-09-17-java-23
10+
%}), following our standard procedure to upgrade with each Java version as soon
11+
as it becomes available. This allows us to take advantage of all the great
12+
improvement each release brings. The upgrade to 23 was pretty easy since the
13+
changes from 22 to 23 were not that big. The story turns out to be a bit
14+
different now with our upgrade to Java 24.
15+
16+
<!--more-->
17+
18+
## Java 24 features
19+
20+
We have been [planning and working towards the
21+
upgrade](https://github.com/trinodb/trino/issues/23498) consistently since the
22+
23 bump in September. Java 24 is set to be released in March 2025 and the list
23+
of changes is quite significant:
24+
25+
* JEP 450 Compact Object Headers (Experimental)
26+
* JEP 472 Prepare to Restrict the Use of JNI
27+
* JEP 475 Late Barrier Expansion for G1
28+
* JEP 478 Key Derivation Function API (Preview)
29+
* JEP 483 Ahead-of-Time Class Loading & Linking
30+
* JEP 484 Class-File API
31+
* JEP 485 Stream Gatherers
32+
* JEP 486 Permanently Disable the Security Manager
33+
* JEP 487 Scoped Values (Fourth Preview)
34+
* JEP 488 Primitive Types in Patterns, instanceof, and switch (Second Preview)
35+
* JEP 489 Vector API (Ninth Incubator)
36+
* JEP 490 ZGC: Remove the Non-Generational Mode
37+
* JEP 491 Synchronize Virtual Threads without Pinning
38+
* JEP 492 Flexible Constructor Bodies (Third Preview)
39+
* JEP 494 Module Import Declarations (Second Preview)
40+
* JEP 495 Simple Source Files and Instance Main Methods (Fourth Preview)
41+
* JEP 496 Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism
42+
* JEP 497 Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm
43+
* JEP 498 Warn upon Use of Memory-Access Methods in sun.misc.Unsafe
44+
* JEP 499 Structured Concurrency (Fourth Preview)
45+
46+
The list of new features is also quite large. You can find more details
47+
in the [release notes](https://jdk.java.net/24/release-notes) and each
48+
individual JEP.
49+
50+
## Trino perspective
51+
52+
From a Trino perspective we want to specifically take advantage of performance
53+
improvements to MemorySegment (mismatch, copy, fill), "JEP 491 Synchronize
54+
Virtual Threads without Pinning" and "JEP 475 Late Barrier Expansion for G1". On
55+
the other hand [JEP 486 Permanently Disable the Security
56+
Manager](https://openjdk.org/jeps/486) turned out to be the most impactful.
57+
58+
Since Trino and its connectors have a large footprint of dependencies there was
59+
a high chance that some projects as not keeping up with the security manager
60+
removal, although it was first deprecated with Java 17 in 2021.
61+
62+
At this stage the Kafka, Kudu, and Phoenix connectors are affected. The Kafka
63+
project is planning to make a new compatible release available in time and we
64+
will adopt that version.
65+
66+
The Kudu and Phoenix connectors however will be removed, since it is not
67+
possible to use them with Java 24 as requirement. Both connectors are not
68+
heavily used in our community as we learned from our communication with numerous
69+
users, integrators, and the results from our [user survey]({% post_url
70+
2025-01-07-2024-and-beyond %}). We are tracking progress for each removal in the
71+
issues [#24419 Phoenix connector](https://github.com/trinodb/trino/issues/24419)
72+
and [#24417 Kudu connector](https://github.com/trinodb/trino/issues/24417). If
73+
either of these communities ends up supporting Java 24, or a newer version as
74+
required by Trino, in the future, we can potentially add the connectors back in
75+
if community members contribute updated versions.
76+
77+
## Release plans
78+
79+
In terms of shipping the changes we follow our established pattern:
80+
81+
* Clean up codebase and get it ready, specifically this include the removal of
82+
the Kudu and Phoenix connectors.
83+
* Cut a release that is completely ready to be used with Java 24, but does not
84+
yet make it a hard requirement
85+
* Allow for community testing and feedback using Java 24.
86+
* Introduce Java 24 as hard requirement in another release.
87+
* Adopt Java 24 features and bring the benefits to our users with following
88+
releases.
89+
90+
As you see, there is a bunch of work waiting, we we better back to it. As usual,
91+
if you have questions or comments, chime in on the relevant issue or chat with
92+
us on [Trino Slack]({{site.baseurl}}/slack.html) in the [core-dev
93+
channel](https://{{site.slack_fqdn}}/messages/C07ABNN828M).

assets/blog/coffee-24.png

203 KB
Loading

0 commit comments

Comments
 (0)