duplicate MergeIterator class to avoid megamorphic calls in hot path for Row/ComplexCell and UnfilteredRowIterators
disable inlining for sinkInBinaryHeap, move typical case outside to improve hot path inlining
replace List for versions with array
fast path for same column metadata in cell merger
avoid potential megamorphic cell method invocation in ALIVE DeletionTime
minDeletionTime calculation optimization for merge logic
do not add an empty iterator, merge 2 loops into 1
patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21524
Description:
AbstractType.writeValue() is one shared method. All column types use it.
Inside writeValue(), it calls valueLengthIfFixed(). This is a virtual call. Many types override this method (Int32Type, LongType, UTF8Type, ...).
In a real cluster, many column types pass through writeValue(). So the profile always sees lots types.
Because of this, the JIT cannot inline the call. It stays as a vtable call. Also, the compiled body of writeValue() becomes big, so the JIT refuses to inline writeValue() itself ("already compiled into a big method").
We also see the same itable/vtable stubs in async-profiler output from a real cluster, running with default production options and a normal workload.
How to solve:
Add a final int field to AbstractType. Set it in the constructor. writeValue() reads this field instead of calling valueLengthIfFixed().
A field read needs no type profile. So profile pollution has no effect on it. The valueLengthIfFixed() method is not changed. Only the write path uses the field.
Result:
Production is always the polluted state, so this is the real-world comparison
JMH, JDK 17 / arm64, 1 thread, 10 x 1s warmup and measurement:
before after improvement
readValue 49.99M ops/s 56.44M ops/s +12.90%
writeValue 99.63M ops/s 114.46M ops/s +14.88%
patch by Koo Taejin; reviewed by Dmitry Konstantinov, Francisco Guerrero for CASSANDRA-21536
minDeletionTime is also added to Cell to avoid double invocation of localDeletionTime method
patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21526
* Add ephemeral-storage requests and limits to agents, and log peak disk usage
Agents were evicted at the node level due to lack of disk space. Each pod needs minimum 100GiB, and each template now budgets 80Gi of the ~89Gi that a 100GiB node allocates, with docker's own volume carries a 60Gi sizeLimit. Exceeding either evicts the pod, so logging has been added in each test split before and after the run. All script blocks in Jenkinsfile are now labeled for improved readability in test runs.
* `.build/run-ci` must not silently drop a site's helm values customisations
Long-lived instances like pre-ci.cassandra.apache.org carry values in addition to the jenkins-deployment.yaml, and any `helm upgrade -f jenkins-deployment.yaml` (or `.build/run-ci`) would drop them. Allow these values to be kept in a separate file, passed in with `--values-override`. Before upgrading helm values, we now compare the deployed values against what is about to be applied and require confirmation for anything only the site holds. This catches added keys and dropped list items (but it cannot catch every change).
Also keep the jenkins-home pvc claim on uninstall, so --only-tear-down no longer destroys build history. Add jenkins-test.sh and a gha workflow for test validating changes under .jenkins/
patch by Mick Semb Wever; reviewed by Dmitry Konstantinov for CASSANDRA-21523
Introduce a native CQL transport-based management interface as an alternative to JMX for executing nodetool commands. Adds the INVOKE COMMAND CQL statement, a dedicated management transport listene (configurable via native_transport_management_port), a command registry backed by picocli metadata, and protocol-aware execution strategies (JMX, CQL, MBean) so nodetool can operate over either protocol.
Refactors NodeProbe into a RemoteJmxMBeanAccessor and introduces MBeanAccessor/CommandMBeanAdapter abstractions to decouple command execution from the transport layer. Includes comprehensive unit and integration tests for command parsing, dispatching, and multi-protocol nodetool execution.
A 32-bit length field read from the wire by CBUtil.readValue (and its
siblings) flowed directly into new byte[length] with no upper bound,
allowing an unauthenticated client to drive the JVM into
OutOfMemoryError: 'Requested array size exceeds VM limit' — and, with
the default -XX:OnOutOfMemoryError=kill -9 %p, terminate the process —
by declaring Integer.MAX_VALUE as the SASL-token length in AUTH_RESPONSE.
Guard the allocation in the single private readRawBytes(ByteBuf, int)
that all int32-length readers funnel through, rejecting lengths that
exceed the buffer's readable bytes with a ProtocolException.
patch by Francisco Guerrero; reviewed by Stefan Miklosovic for CASSANDRA-21521