Yes the issue of Nashorn did spring to mind, but as I recall this was an optional feature. I don’t remember how hard it would have been to simply declare the feature unavailable if you use the newer JDK, but my vague recollection is the hard part was primarily finding a suitable replacement.
We may well hit similar issues in future, some perhaps even harder to surmount, but I’m sure we can address them as they come on a case by case basis. Worst case we have to postpone the migration by one major for any deprecation to take effect. On 21 May 2025, at 19:57, Ekaterina Dimitrova <e.dimitr...@gmail.com> wrote:
“I'm curious what this raises for you. “
A few points that come to mind:
- every time we switch/add JDKs we also need to do a bunch of changes in CI systems, ccm, etc, not only C* - so more work to call out. Also, if we make older versions support newer JDK, I guess we need to ensure drivers, etc will support it too probably? Are we discussing JDK support here only for Cassandra repo? - very often we need to bump library versions to support newer JDK versions but at the same time we try not to upgrade dependencies in patch release; only if it is bug related, in most cases - whether it is a lot of work or not to backport, I’d say it depends. My assumption is that if we keep our maintenance regularly going (which we missed with the long development cycle of 4.0) - it is more feasible. Though we know that we removed a whole feature to move to JDK17 quicker - the scripted UDFs. If we have similar needs at any time - we can’t do such breaking changes in a patch release. - Benedict made a great point on performance changes with JDK upgrades - we do not have regular performance testing so probably introducing a new JDK in a patch version will come with a huge warning - test thoroughly and move to prod at your own judgement or something like that.
I guess there are more things to consider but these are immediate things that come to my mind now.
Best regards, Ekaterina Lessons learned from advancing JDK support on trunk should translate into older branches making that effort much smaller; Ekaterina you have a lot of experience here so I'm curious what this raises for you. I like the productivity implications of us being able to adopt new language features faster on trunk; I think this is a solid evolution of the idea, definitely.
Distilling to bulleted lists to try and snapshot the state of the thread w/the above proposal:
[New LTS JDK Adoption] [Branch JDK Support] - N-2: JDK, JDK-1, JDK-2
- N-1: JDK, JDK-1
- N: JDK
- CI:
- For each branch we run per-commit CI for the latest JDK they support
- Periodically we run all CI pipelines for older JDK's per-branch (cadence TBD)
- Upgrades
- N-2 -> N-1: tested on JDK and JDK-1
- N-2 -> N: tested on JDK
- N-1 -> N: tested on JDK
That'd give us 4 upgrade paths we'd need to support and test which feels like it's in the territory of "doable on each commit" if we limit the upgrade tests to the in-jvm variety and let the periodic run capture the python upgrade tests space.
On Wed, May 21, 2025, at 9:30 AM, Benedict wrote:
Perhaps we should consider back porting support for newer Java LTS releases to older C* versions, and suggesting users upgrade JDK first. This way we can have trunk always on the latest LTS, advancing language feature support more quickly.
That is, we would have something like
N-2: JDK, JDK-1, JDK-2 N-1: JDK, JDK-1 N: JDK
I think to assist those deploying trunk and reduce churn for development, we might only want to advance the LTS version for trunk after we release a new major, fixing the next release’s Java version at that point.
You don’t have to run every suite on every commit since as folks have pointed out for the most part the JVM isn’t culprit. Need to run it enough times to catch when it is for some assumption of “enough”.
So riffing on this. We could move to something like: - For each given supported C* branch, confirm it builds on all supported JDKs (pre-commit verification, post-commit reactive runs)
- Constrain language level on any given C* branch to lowest supported JDK
- Run all reactive post-commit CI pipelines against the highest supported JDK only
- Once a N (day, week, month?), run all pipelines against all supported JDKs on all branches
- Augment notification mechanisms so it squawks to dev list and slack on failure of non-highest JDK pipelines
That approach would tweak our balance towards our perception of the infrequency of per-JDK failures while allowing us to "scale up" the matrix of tests that we perform.
i.e. once a week we could have a heavy 9x run (3 branches, 3 JDK's) which we could then plan around and space out in terms of resource allocation, but otherwise we run a single set of pipelines per branch post-commit.
That'd give us the confidence to say "we tested the upgrade path we're recommending for you" without having to pay the tax of doing it on every commit or allowing potential defects to pile up to a once-a-year JDK-specific bug-bash.
In terms of JDK support when bumping (mapping of relative C* version and relative JDK version): - N-2: JDK-2, JDK-3, JDK-4
- N-1: JDK-1, JDK-2, JDK-3
- N: JDK, JDK-1, JDK-2
So we'd have 3 supported LTS per branch, be able to adhere to "you can upgrade from N-2 to N using the same JDK", and allow us to balance our CI coverage to our expected surfacing of defects.
Then if we rev JDK we support on any given N+1, we end up with (keeping with N above as reference): - N-1: JDK-1, JDK-2, JDK-3
- N: JDK, JDK-1, JDK-2
- N+1: JDK+1, JDK, JDK-1
So shared JDK across all 3 on that rev is JDK-1.
I think 3 LTS per branch gives us the ability to both add / drop a JDK per major and test / provide for upgrades from N-2 to N w/out requiring a new JDK cert too.
On Wed, May 21, 2025, at 3:27 AM, Mick Semb Wever wrote: So yeah. I think we'll need to figure out how much coverage is reasonable to call something "tested". I don't think it's sustainable for us to have, at any given time, 3 branches we test across 3 JDK's each with all our in-jvm test suites is it?
Correct. For non-upgrade tests, where testing against more than one jdk exists, we should start the conversation of the value of running more than one JDK for all tests per-commit CI, before we go adding a third.
|