-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNDB-11508 main-5.0 branch #1408
base: main-5.0
Are you sure you want to change the base?
Changes from all commits
2f0f8e5
b4ecae7
b95a2a6
c40dbe8
60e601f
806b3e0
dea3b70
4105597
e2243da
8e4909c
f51fef2
9c9ad13
029259a
bc28efa
a56afc0
699fcbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
########################################################################### | ||
# jvm22-clients.options # | ||
# # | ||
# See jvm-clients.options. This file is specific for Java 22 and newer. # | ||
########################################################################### | ||
|
||
################### | ||
# JPMS SETTINGS # | ||
################### | ||
|
||
-Djdk.attach.allowAttachSelf=true | ||
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED | ||
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED | ||
--add-exports java.base/sun.nio.ch=ALL-UNNAMED | ||
--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED | ||
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED | ||
--add-exports java.rmi/sun.rmi.server=ALL-UNNAMED | ||
--add-exports java.sql/java.sql=ALL-UNNAMED | ||
--add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED | ||
|
||
--add-opens java.base/java.io=ALL-UNNAMED | ||
--add-opens java.base/java.lang.module=ALL-UNNAMED | ||
--add-opens java.base/java.lang.reflect=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.math=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.module=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED | ||
--add-opens java.base/sun.nio.ch=ALL-UNNAMED | ||
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED | ||
|
||
# The newline in the end of file is intentional |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
########################################################################### | ||
# jvm22-server.options # | ||
# # | ||
# See jvm-server.options. This file is specific for Java 22 and newer. # | ||
########################################################################### | ||
|
||
################# | ||
# GC SETTINGS # | ||
################# | ||
|
||
### G1 Settings | ||
## Use the Hotspot garbage-first collector. | ||
-XX:+UseG1GC | ||
-XX:+ParallelRefProcEnabled | ||
|
||
# | ||
## Have the JVM do less remembered set work during STW, instead | ||
## preferring concurrent GC. Reduces p99.9 latency. | ||
-XX:G1RSetUpdatingPauseTimePercent=5 | ||
# | ||
## Main G1GC tunable: lowering the pause target will lower throughput and vise versa. | ||
## 200ms is the JVM default and lowest viable setting | ||
## 1000ms increases throughput. Keep it smaller than the timeouts in cassandra.yaml. | ||
-XX:MaxGCPauseMillis=500 | ||
|
||
## Optional G1 Settings | ||
# Save CPU time on large (>= 16GB) heaps by delaying region scanning | ||
# until the heap is 70% full. The default in Hotspot 8u40 is 40%. | ||
#-XX:InitiatingHeapOccupancyPercent=70 | ||
|
||
# For systems with > 8 cores, the default ParallelGCThreads is 5/8 the number of logical cores. | ||
# Otherwise equal to the number of cores when 8 or less. | ||
# Machines with > 10 cores should try setting these to <= full cores. | ||
#-XX:ParallelGCThreads=16 | ||
# By default, ConcGCThreads is 1/4 of ParallelGCThreads. | ||
# Setting both to the same value can reduce STW durations. | ||
#-XX:ConcGCThreads=16 | ||
|
||
|
||
### JPMS | ||
|
||
-Djdk.attach.allowAttachSelf=true | ||
-Djava.security.manager=allow | ||
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED | ||
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED | ||
--add-exports java.base/jdk.internal.perf=ALL-UNNAMED | ||
--add-exports java.base/sun.nio.ch=ALL-UNNAMED | ||
--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED | ||
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED | ||
--add-exports java.rmi/sun.rmi.server=ALL-UNNAMED | ||
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED | ||
--add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming | ||
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED | ||
|
||
--add-opens java.base/java.io=ALL-UNNAMED | ||
--add-opens java.base/java.lang.module=ALL-UNNAMED | ||
--add-opens java.base/java.lang=ALL-UNNAMED | ||
--add-opens java.base/java.lang.reflect=ALL-UNNAMED | ||
--add-opens java.base/java.nio.file.spi=ALL-UNNAMED | ||
--add-opens java.base/java.nio=ALL-UNNAMED | ||
--add-opens java.base/java.net=ALL-UNNAMED | ||
--add-opens java.base/java.util=ALL-UNNAMED | ||
--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED | ||
--add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.math=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.module=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED | ||
--add-opens java.base/jdk.internal.vm=ALL-UNNAMED | ||
--add-opens java.base/sun.nio.ch=ALL-UNNAMED | ||
--add-opens jdk.compiler/com.sun.tools.javac=ALL-UNNAMED | ||
--add-opens jdk.management.jfr/jdk.management.jfr=ALL-UNNAMED | ||
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED | ||
--add-opens jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED | ||
|
||
# required for org.apache.cassandra.Util.getSupportedMTimeGranularity | ||
--add-opens java.base/java.nio.file.attribute=ALL-UNNAMED | ||
|
||
### GC logging options -- uncomment to enable | ||
|
||
# Java 11 (and newer) GC logging options: | ||
# See description of https://bugs.openjdk.java.net/browse/JDK-8046148 for details about the syntax | ||
# The following is the equivalent to -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M | ||
# -Xlog:gc=info,heap*=debug,age*=debug,safepoint=info,promotion*=debug:file=/var/log/cassandra/gc.log:time,uptime,pid,tid,level:filecount=10,filesize=10485760 | ||
|
||
# Notes for Java 8 migration: | ||
# | ||
# -XX:+PrintGCDetails maps to -Xlog:gc*:... - i.e. add a '*' after "gc" | ||
# -XX:+PrintGCDateStamps maps to decorator 'time' | ||
# | ||
# -XX:+PrintHeapAtGC maps to 'heap' with level 'trace' | ||
# -XX:+PrintTenuringDistribution maps to 'age' with level 'debug' | ||
# -XX:+PrintGCApplicationStoppedTime maps to 'safepoint' with level 'info' | ||
# -XX:+PrintPromotionFailure maps to 'promotion' with level 'trace' | ||
# -XX:PrintFLSStatistics=1 maps to 'freelist' with level 'trace' | ||
|
||
### Netty Options | ||
|
||
# On Java >= 9 Netty requires the io.netty.tryReflectionSetAccessible system property to be set to true to enable | ||
# creation of direct buffers using Unsafe. Without it, this falls back to ByteBuffer.allocateDirect which has | ||
# inferior performance and risks exceeding MaxDirectMemory | ||
-Dio.netty.tryReflectionSetAccessible=true | ||
|
||
### Enable vector incubator feature (simd support) | ||
|
||
--add-modules jdk.incubator.vector | ||
|
||
# The newline in the end of file is intentional |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -790,7 +790,8 @@ TrieEntry<K, V> nextEntryImpl(TrieEntry<K, V> start, TrieEntry<K, V> previous, T | |
* This is implemented by going always to the left until | ||
* we encounter a valid uplink. That uplink is the first key. | ||
*/ | ||
TrieEntry<K, V> firstEntry() | ||
// @Override needed in JDK 21+. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because it is needed only if we build on JDK21+. There is nothing to override on previous version and we still build on 11. |
||
public TrieEntry<K, V> firstEntry() | ||
{ | ||
// if Trie is empty, no first node. | ||
return isEmpty() ? null : followLeft(root); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this correct and consistent with what we have in
main
? I suggested to allow only LTS versions but eventually @JeremiahDJordan opposed and we allow for any >= 11; While here I can see 12..16 and 18..21 seem to be disallowed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a patch in trunk that adds a flag to be able to allow those. We should port it and not allow it by default. But let's not do it here?
This comment I wrote in the issue:
UPDATE: I will pull the patch from CASSANDRA-18688 in a separate ticket. We can add it when we fix all tests and enable main branch for testing with JDK22 in CI. Otherwise, there will be confusion that the branch is JDK22 ready when it is still not fully ready.