Skip to content

Drop Java 8 support#900

Merged
dkropachev merged 7 commits into
scylla-4.xfrom
drop-java-8-support
May 26, 2026
Merged

Drop Java 8 support#900
dkropachev merged 7 commits into
scylla-4.xfrom
drop-java-8-support

Conversation

@dkropachev
Copy link
Copy Markdown

@dkropachev dkropachev commented May 23, 2026

Raise the supported runtime/build floor to Java 11 and remove active Java 8 references from build, CI, docs, and live config.

Follow-up:

Verification:

  • make check
  • make -C docs setupenv
  • make -C docs test
  • make -C docs redirects
  • make -C docs multiversion

Summary by CodeRabbit

  • Breaking Changes

    • Java 11 or higher now required (was Java 8+)
  • Chores

    • CI/build workflows and compiler/plugin settings migrated to Java 11
    • Dependency and tooling version bumps; embedded third‑party license updates
    • Documentation and external JDK API links updated to Java 11
  • Features

    • Added a new public accessor for primitive codecs; legacy public codecs array deprecated

Review Change Stack

@dkropachev dkropachev force-pushed the drop-java-8-support branch from 475e3a1 to 911908f Compare May 24, 2026 03:45
@dkropachev dkropachev assigned nikagra and dkropachev and unassigned nikagra May 24, 2026
@dkropachev dkropachev requested a review from nikagra May 24, 2026 03:45
@dkropachev dkropachev force-pushed the drop-java-8-support branch 11 times, most recently from 29c3911 to c0cae34 Compare May 25, 2026 10:20
@dkropachev dkropachev changed the base branch from scylla-4.x to fix-prepared-statement-caching-it May 25, 2026 10:20
@dkropachev dkropachev force-pushed the drop-java-8-support branch from c0cae34 to 28d7125 Compare May 25, 2026 11:06
@dkropachev dkropachev changed the base branch from fix-prepared-statement-caching-it to fix-micrometer-no-sla-test May 25, 2026 11:06
@dkropachev dkropachev marked this pull request as ready for review May 25, 2026 12:59
Base automatically changed from fix-micrometer-no-sla-test to fix-prepared-statement-caching-it May 25, 2026 14:17
@roydahan
Copy link
Copy Markdown
Collaborator

@coderabbitai review this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

@roydahan: Here is the complete review, updated with findings from the deeper code inspection.


Review: Drop Java 8 support (#900)

The PR is well-executed overall. Four items need attention beyond the initial observations.


🔴 Issue 1 — guava-shaded/pom.xml: JVM 1.8 guard now always skips source compilation

The build-helper-maven-plugin guard uses the regex ^(?!1.8).+ against ${java.version}. It was designed to skip recompilation on any JVM that is not 1.8. On JDK 11+ (where java.version is e.g. 11.0.x) the regex always matches, permanently setting maven.main.skip=true.

<!-- guava-shaded/pom.xml lines 62-79 -->
<!--
  Do not attempt to recompile the module if we are not running JVM 1.8.
  Having additional Java source files and having to shade Guava will break
  in CI environment, when we run 'mvn verify' on newer JVM and assume that
  all classes have been compiled with JVM 1.8.
-->
<value>${java.version}</value>
<regex>^(?!1.8).+</regex>   <!-- matches everything EXCEPT 1.8 → always true on JDK 11+ -->
<replacement>true</replacement>

This means the guava-shaded module's own Java sources (including the module-info.class exclusion you added in this PR) are always silently skipped. The whole plugin block should be removed now that Java 8 is no longer the compilation target.


🔴 Issue 2 — Jenkinsfile-asf: Java 8 still in test matrix

Jenkinsfile-asf line 38 still includes openjdk@1.8.0-292:

values 'openjdk@1.8.0-292', 'openjdk@1.11.0-9', 'openjdk@1.17.0', 'openjdk@1.21.0'

If this Jenkinsfile is active, Java 8 builds will still run against it. The openjdk@1.8.0-292 entry should be removed (or replaced with a newer JDK version) to match the intent of this PR.


🔴 Issue 3 — Masked env-var name in .github/workflows/tests@v1.yml

The *** environment variable name (confirmed masked by GitHub's secret scanner — it does not appear in the actual file) needs to be verified. Since resolve-cassandra-version now uses git ls-remote against the public https://github.com/apache/cassandra.git, no token should be required and the entire env entry may simply be removable.


🟠 Issue 4 — Implicit bug fixes should be called out

Two real bugs are fixed silently inside this PR:

ChannelFactory.java — SSL handler was never added (.map() discards side effects on Optional):

// Before: pipeline.addLast() was NEVER called
context.getSslHandlerFactory()
    .map(f -> f.newSslHandler(channel, endPoint))
    .map(h -> pipeline.addLast(SSL_HANDLER_NAME, h)); // result discarded

// After: correct
context.getSslHandlerFactory()
    .ifPresent(f -> pipeline.addLast(SSL_HANDLER_NAME, f.newSslHandler(channel, endPoint)));

RuleBasedKeyspaceFilter.java — regex-based include/exclude rules were silently ignored:

// Before: sets were never populated
compile(matcher.group(1)).map(regexIncludes::add); // result discarded
// After: correct
compile(matcher.group(1)).ifPresent(regexIncludes::add);

Both fixes are correct and welcome, but they should be noted in the PR description so they show up in the changelog/blame history.


🟡 Minor observations

File Note
MapperProcessor.java return truereturn false changes annotation claiming semantics; confirm intentional
MetadataManagerTest.java 500 ms → 5 s await timeout; worth a comment explaining why JDK 11+ is slower here
InsightsClientTest.java line 112 "1.8.0" is mock JVM-version data for DSE Insights serialization tests — not a real Java 8 requirement, safe to leave
All other 1.8 matches commons-text 1.8, lz4-java 1.8.1, Cassandra 2.1.8 — all library/Cassandra version numbers, not Java version references
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR migrates the Java driver from Java 8 to Java 11 as the minimum supported version, modernizes build infrastructure with updated dependencies and tooling, replaces shaded Guava utilities with JDK equivalents, updates Mockito test infrastructure from deprecated runners to lifecycle-based management, and improves code quality across core libraries and tests.

Changes

Java 11 Platform & Build Configuration

Layer / File(s) Summary
GitHub Workflows Java Version Updates
.github/workflows/*.yml
All CI/CD workflows updated from JDK 8 to JDK 11/17 matrix with test strategy expansion including test-group dimensions for integration tests, persist-credentials settings, and check_name customization.
JVM Configuration & Root POM Version Updates
.mvn/jvm.config, pom.xml
Adds JVM module export flags for javac compiler packages; updates core dependency and plugin versions in root pom.xml with Java 11 release setting and modernized Error Prone integration.
Module POM Configuration, Exclusions, & Annotation Processors
core-shaded/pom.xml, examples/pom.xml, integration-tests/pom.xml, osgi-tests/pom.xml, distribution/pom.xml, test-infra/pom.xml, guava-shaded/pom.xml, guava-shaded/src/assembly/shaded-jar.xml
Configures annotation processors, excludes module-info.class from shaded JARs, adds gremlin-core dependency to test infra, adds javadoc additionalDependencies, and sets compiler plugin configurations in module POMs.
Documentation & License Updates
README.md, README-dev.md, faq/README.md, LICENSE_binary
Updates README and docs to require Java 11+, and refreshes bundled third-party version/license entries in LICENSE_binary.

Guava Utility Removal & JDK Replacement

Layer / File(s) Summary
String Formatting (Guava Strings.repeat → JDK String.repeat)
core/.../ScriptBuilder.java, mapper-processor/.../MapperProcessor.java
Replaces Guava Strings.repeat with JDK String.repeat for indentation/newline generation.
Numeric Comparisons (Guava Ints/Longs → JDK Integer/Long)
core/.../RawColumn.java, core/.../TokenLong64.java
Replaces Guava Ints/Longs compare calls with JDK Integer/Long.compare and removes shaded imports.
String Splitting, Optional Patterns, & Package Parsing
core/.../PackageUtil.java, core/.../PlatformInfoFinder.java, core/.../RuleBasedKeyspaceFilter.java
Simplifies package parsing with lastIndexOf, uses Guava Splitter for dependency parsing, and uses Optional.ifPresent for predicate appends.

Core Library Code Quality & Logic Improvements

Layer / File(s) Summary
Visibility Changes & Timestamp Handling
core/.../GraphSON2SerdeTP.java, core/.../InsightMetadata.java, core/.../InsightsClient.java
Constructor visibility tightened, equals uses primitive long comparison, and startup timestamp supplier changed to System::currentTimeMillis.
Codec & Metrics Improvements
core/.../OptionalCodec.java, core/.../EnumOrdinalCodec.java, metrics/micrometer/.../MicrometerMetricUpdater.java
OptionalCodec uses explicit absent/present branching; enum-ordinal suppression added; Micrometer calls cast long to double.
Exception Handling & Control Flow Refactoring
core/.../RandomTokenFactory.java, core/.../ChannelFactory.java, test-infra/.../CcmBridge.java
Improves MessageDigest clone handling, uses Optional.ifPresent for SSL handler wiring, and logs exceptions in CCM cleanup.
SQL Construction & Constructor Patterns
core/.../ClientRoutesTopologyMonitor.java, core/.../DefaultLoadBalancingPolicy.java, core/.../SubnetAddressTranslator.java
Refactors SQL prefix usage, introduces no-arg seeding constructor for sampling, and reformats fluent chains.
Javadoc, Comments, & Compiler Annotations
core/api/*, core/.../DefaultTabletMap.java, others
Fixes Javadoc markup, adds/moves annotations, and suppresses specific static-analysis warnings where appropriate.
Example Code Numeric Type Precision
examples/.../ForwardPagingRestUi.java, examples/.../RandomPagingRestUi.java
Use long literals for epoch-millisecond computations.

Test Infrastructure & Mockito Modernization

Layer / File(s) Summary
Mockito Verification API Updates
core/src/test/**, integration-tests/src/test/**
Replaces deprecated verifyZeroInteractions with verifyNoInteractions/verifyNoMoreInteractions and updates static imports.
JUnit Lifecycle Management (MockitoJUnitRunner → Manual Init)
integration-tests/src/test/**
Migrates tests from @RunWith(MockitoJUnitRunner.class) to MockitoAnnotations.openMocks in @Before/@after lifecycle methods.
Test Robustness & Configuration Improvements
core/src/test/.../ContactPointsTest.java, integration-tests/src/test/.../DriverExecutionProfileReloadIT.java, others
Adds socketAddress helper, defers completions onto event loop, refactors config-change trigger/wait, updates expectations and test assertions for stability.
Test Module & PatchedGremlinDslProcessor
test-infra/src/main/java/.../PatchedGremlinDslProcessor.java
Adds PatchedGremlinDslProcessor to control supported annotation types and reported source version.

Documentation API Reference Updates

Layer / File(s) Summary
Manual Pages API Documentation Links
manual/**, manual/mapper/**
Repoints Javadoc hyperlinks from Java 8 API docs to Java 11 API docs across manuals and examples.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

"🐇 I hopped through pom and workflow lanes,

traded eight for eleven to speed up the trains.
I swapped old Guava for JDK cheer,
updated tests so mocks behave clear —
a tiny rabbit's patch, now the build leaps near."

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch drop-java-8-support

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
guava-shaded/pom.xml (1)

61-83: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove the obsolete Java 8 maven.main.skip guard in guava-shaded/pom.xml

build-helper-maven-plugin sets maven.main.skip=true on any ${java.version} that doesn’t start with 1.8 (^(?!1.8).+). On JDK 11+ this becomes true, and maven-compiler-plugin uses maven.main.skip as skipMain, so this module’s main sources (e.g., LexicographicalComparatorHolderSubstitution.java, UnsafeComparatorSubstitution.java) won’t compile—risking an incomplete shaded jar.

🛠️ Proposed fix
-      <plugin>
-        <!--
-          Do not attempt to recompile the module if we are not running JVM 1.8.
-          Having additional Java source files and having to shade Guava will break
-          in CI environment, when we run 'mvn verify' on newer JVM and assume that
-          all classes have been compiled with JVM 1.8.
-        -->
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <version>1.12</version>
-        <executions>
-          <execution>
-            <id>regex-property</id>
-            <goals>
-              <goal>regex-property</goal>
-            </goals>
-            <configuration>
-              <name>maven.main.skip</name>
-              <value>${java.version}</value>
-              <regex>^(?!1.8).+</regex>
-              <replacement>true</replacement>
-              <failIfNoMatch>false</failIfNoMatch>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@guava-shaded/pom.xml` around lines 61 - 83, The pom contains an execution in
build-helper-maven-plugin that sets the maven.main.skip property via the
execution with id "regex-property" using regex "^(?!1.8).+". Remove that
execution (or disable it) so the plugin no longer forces maven.main.skip=true
for JDKs not starting with "1.8"; this ensures maven-compiler-plugin (skipMain)
will compile the module's main sources (e.g.,
LexicographicalComparatorHolderSubstitution.java,
UnsafeComparatorSubstitution.java) and the shaded jar is complete.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/tests@v1.yml:
- Around line 116-117: The checkout step using
actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd currently does not
disable persisted credentials; update the "Checkout source" job step to add
persist-credentials: false to the actions/checkout invocation so the
GITHUB_TOKEN is not written to local git config for subsequent steps, matching
the hardening used elsewhere.
- Line 220: Remove the GH_TOKEN environment variable from the job step that runs
make resolve-cassandra-version; the Makefile target uses git ls-remote against
CASSANDRA_REPO and does not need github.token or the gh API, so ensure the step
invoking make resolve-cassandra-version (and any surrounding env block) does not
set GH_TOKEN and that no preceding commands in that same step call gh or GitHub
API endpoints that would require GH_TOKEN.

In
`@core/src/main/java/com/datastax/oss/driver/internal/core/type/codec/registry/CodecRegistryConstants.java`:
- Line 35: PRIMITIVE_CODECS visibility was narrowed from public to
package-private, breaking the documented extension hook; restore its original
public visibility by changing the declaration of PRIMITIVE_CODECS in
CodecRegistryConstants back to public and keep/update the Javadoc to reflect it
as an external customization point so consumers can rely on it.

In
`@core/src/test/java/com/datastax/oss/driver/internal/core/ContactPointsTest.java`:
- Around line 141-143: Tests in ContactPointsTest construct DefaultEndPoint
using InetAddress.getLoopbackAddress(), which can be IPv6 (::1) on some JVMs and
break assertions expecting IPv4; update the test to use an explicit IPv4
loopback address (e.g., InetAddress.getByName("127.0.0.1") or
Inet4Address.getByName) when creating the InetSocketAddress for DefaultEndPoint
so the produced endpoint string matches the asserted "127.0.0.1:9042" form.

In `@Makefile`:
- Around line 112-120: The resolve_cassandra_latest function uses GNU-only sort
-V which fails on macOS/BSD; update the pipeline inside resolve_cassandra_latest
to replace sort -V with a POSIX dot-separated numeric sort (e.g. use sort -t.
-k1,1n -k2,2n -k3,3n) so versions are correctly ordered across platforms; ensure
the rest of the pipeline (git ls-remote, awk, sed, grep, tail) remains unchanged
and that the new sort receives the plain version strings output by sed/grep.

---

Outside diff comments:
In `@guava-shaded/pom.xml`:
- Around line 61-83: The pom contains an execution in build-helper-maven-plugin
that sets the maven.main.skip property via the execution with id
"regex-property" using regex "^(?!1.8).+". Remove that execution (or disable it)
so the plugin no longer forces maven.main.skip=true for JDKs not starting with
"1.8"; this ensures maven-compiler-plugin (skipMain) will compile the module's
main sources (e.g., LexicographicalComparatorHolderSubstitution.java,
UnsafeComparatorSubstitution.java) and the shaded jar is complete.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 424de611-56c8-400c-b0e4-01a9af5f24bc

📥 Commits

Reviewing files that changed from the base of the PR and between 5e66c61 and 28d7125.

📒 Files selected for processing (94)
  • .github/workflows/docs-pages.yml
  • .github/workflows/docs-pr.yml
  • .github/workflows/release.yml
  • .github/workflows/tests@v1.yml
  • .mvn/jvm.config
  • LICENSE_binary
  • Makefile
  • README-dev.md
  • README.md
  • core-shaded/pom.xml
  • core/src/main/java/com/datastax/dse/driver/api/core/data/time/DateRangePrecision.java
  • core/src/main/java/com/datastax/dse/driver/internal/core/graph/GraphSON2SerdeTP.java
  • core/src/main/java/com/datastax/dse/driver/internal/core/insights/InsightsClient.java
  • core/src/main/java/com/datastax/dse/driver/internal/core/insights/PackageUtil.java
  • core/src/main/java/com/datastax/dse/driver/internal/core/insights/PlatformInfoFinder.java
  • core/src/main/java/com/datastax/dse/driver/internal/core/insights/schema/InsightMetadata.java
  • core/src/main/java/com/datastax/dse/driver/internal/core/metadata/schema/DefaultDseAggregateMetadata.java
  • core/src/main/java/com/datastax/oss/driver/api/core/CqlIdentifier.java
  • core/src/main/java/com/datastax/oss/driver/api/core/context/DriverContext.java
  • core/src/main/java/com/datastax/oss/driver/api/core/data/CqlVector.java
  • core/src/main/java/com/datastax/oss/driver/api/core/metadata/token/Partitioner.java
  • core/src/main/java/com/datastax/oss/driver/api/core/metrics/Metrics.java
  • core/src/main/java/com/datastax/oss/driver/api/core/retry/RetryVerdict.java
  • core/src/main/java/com/datastax/oss/driver/api/core/type/codec/registry/CodecRegistry.java
  • core/src/main/java/com/datastax/oss/driver/api/core/type/reflect/GenericType.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/addresstranslation/Ec2MultiRegionAddressTranslator.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/addresstranslation/SubnetAddressTranslator.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/channel/ChannelFactory.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/cql/DefaultTraceEvent.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/loadbalancing/DefaultLoadBalancingPolicy.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/metadata/ClientRoutesTopologyMonitor.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/metadata/DefaultTabletMap.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/metadata/PartitionerFactory.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/metadata/schema/ScriptBuilder.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/metadata/schema/parsing/RawColumn.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/metadata/schema/queries/RuleBasedKeyspaceFilter.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/metadata/token/RandomTokenFactory.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/metadata/token/TokenLong64.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/ssl/ReloadingKeyManagerFactory.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/type/codec/extras/OptionalCodec.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/type/codec/extras/enums/EnumOrdinalCodec.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/type/codec/registry/CodecRegistryConstants.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/util/collection/QueryPlan.java
  • core/src/test/java/com/datastax/dse/driver/internal/core/graph/GraphSupportCheckerTest.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/CompletionStageAssert.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/ContactPointsTest.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/addresstranslation/FixedHostNameAddressTranslatorTest.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/channel/MockChannelFactoryHelper.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/data/AccessibleByIdTestBase.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/data/AccessibleByIndexTestBase.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/metadata/MetadataManagerTest.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/session/MockChannelPoolFactoryHelper.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/type/codec/TupleCodecTest.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/type/codec/UdtCodecTest.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/type/codec/registry/CachingCodecRegistryTest.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/type/util/VIntCodingTest.java
  • distribution/pom.xml
  • examples/pom.xml
  • examples/src/main/java/com/datastax/oss/driver/examples/paging/ForwardPagingRestUi.java
  • examples/src/main/java/com/datastax/oss/driver/examples/paging/RandomPagingRestUi.java
  • faq/README.md
  • guava-shaded/pom.xml
  • guava-shaded/src/assembly/shaded-jar.xml
  • integration-tests/pom.xml
  • integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileReloadIT.java
  • integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeStateIT.java
  • integration-tests/src/test/java/com/datastax/oss/driver/core/session/ListenersIT.java
  • integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryIT.java
  • integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestLoggerIT.java
  • manual/core/address_resolution/README.md
  • manual/core/async/README.md
  • manual/core/custom_codecs/README.md
  • manual/core/integration/README.md
  • manual/core/metadata/schema/README.md
  • manual/core/paging/README.md
  • manual/mapper/config/README.md
  • manual/mapper/daos/delete/README.md
  • manual/mapper/daos/getentity/README.md
  • manual/mapper/daos/increment/README.md
  • manual/mapper/daos/insert/README.md
  • manual/mapper/daos/query/README.md
  • manual/mapper/daos/select/README.md
  • manual/mapper/daos/update/README.md
  • mapper-processor/src/main/java/com/datastax/oss/driver/internal/mapper/processor/MapperProcessor.java
  • mapper-processor/src/main/java/com/datastax/oss/driver/internal/mapper/processor/dao/DaoReturnTypeKind.java
  • mapper-processor/src/main/java/com/datastax/oss/driver/internal/mapper/processor/util/Classes.java
  • metrics/micrometer/src/main/java/com/datastax/oss/driver/internal/metrics/micrometer/MicrometerMetricUpdater.java
  • metrics/micrometer/src/test/java/com/datastax/oss/driver/internal/metrics/micrometer/MicrometerSessionMetricUpdaterTest.java
  • osgi-tests/pom.xml
  • performance/duration-test.yaml
  • pom.xml
  • test-infra/pom.xml
  • test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/ccm/CcmBridge.java
  • test-infra/src/main/java/com/datastax/oss/driver/internal/gremlin/PatchedGremlinDslProcessor.java
💤 Files with no reviewable changes (2)
  • core/src/main/java/com/datastax/dse/driver/internal/core/metadata/schema/DefaultDseAggregateMetadata.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/loadbalancing/DefaultLoadBalancingPolicy.java

Comment thread .github/workflows/tests@v1.yml
Comment thread .github/workflows/tests@v1.yml
Comment thread core/src/test/java/com/datastax/oss/driver/internal/core/ContactPointsTest.java Outdated
Comment thread Makefile Outdated
Comment thread guava-shaded/pom.xml Outdated
Comment thread core/src/test/java/com/datastax/oss/driver/internal/core/ContactPointsTest.java Outdated
Comment thread Makefile Outdated
Comment thread core-shaded/pom.xml
@dkropachev dkropachev force-pushed the fix-prepared-statement-caching-it branch from 5e66c61 to 352dc19 Compare May 25, 2026 23:15
Base automatically changed from fix-prepared-statement-caching-it to scylla-4.x May 25, 2026 23:16
Micrometer requires valid expected histogram bounds even when SLA buckets are disabled. Stub the lowest, highest, and precision options in the no-SLA session metric test so it exercises the intended branch instead of failing while constructing the distribution configuration.
@dkropachev dkropachev force-pushed the drop-java-8-support branch from 28d7125 to f937deb Compare May 26, 2026 00:03
Raise the supported runtime and build floor to Java 11, and align docs, configuration, formatting, and dependency versions with that baseline.
Reject invalid subnet prefix strings so address translation fails clearly instead of accepting bad configuration.
PRIMITIVE_CODECS is an array, so final only prevents reassigning the field; callers that can reach a public field can still mutate its contents.

The array is only used by codec registry internals, so keep it package-private instead of exposing mutable static state. This avoids MutablePublicArray-style warnings without changing registry behavior.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
metrics/micrometer/src/main/java/com/datastax/oss/driver/internal/metrics/micrometer/MicrometerMetricUpdater.java (1)

58-58: Micrometer (double) casts aren’t required for API compatibility

Micrometer’s Counter.increment(...) only provides increment() and increment(double), and DistributionSummary.record(...) only provides record(double) (no long overloads). So the explicit (double) casts at MicrometerMetricUpdater.java (lines 58, 65, 73) are optional—Java will implicitly widen long to double when calling these methods.

      getOrCreateCounterFor(metric).increment((double) amount);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@metrics/micrometer/src/main/java/com/datastax/oss/driver/internal/metrics/micrometer/MicrometerMetricUpdater.java`
at line 58, The explicit (double) casts are unnecessary when calling Micrometer
methods; remove the redundant casts so calls use Java's implicit widening (e.g.,
change getOrCreateCounterFor(metric).increment((double) amount) to
getOrCreateCounterFor(metric).increment(amount) and likewise remove casts when
calling DistributionSummary.record(...) and Timer.record(...) in
MicrometerMetricUpdater; update the three occurrences associated with
getOrCreateCounterFor, getOrCreateDistributionSummaryFor (or
DistributionSummary.record), and Timer.record to pass the long directly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@metrics/micrometer/src/main/java/com/datastax/oss/driver/internal/metrics/micrometer/MicrometerMetricUpdater.java`:
- Line 58: The explicit (double) casts are unnecessary when calling Micrometer
methods; remove the redundant casts so calls use Java's implicit widening (e.g.,
change getOrCreateCounterFor(metric).increment((double) amount) to
getOrCreateCounterFor(metric).increment(amount) and likewise remove casts when
calling DistributionSummary.record(...) and Timer.record(...) in
MicrometerMetricUpdater; update the three occurrences associated with
getOrCreateCounterFor, getOrCreateDistributionSummaryFor (or
DistributionSummary.record), and Timer.record to pass the long directly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f1ee499-2297-4fa6-80ba-a315ca749c0a

📥 Commits

Reviewing files that changed from the base of the PR and between 851f6ba and e8880e1.

📒 Files selected for processing (15)
  • core/src/main/java/com/datastax/oss/driver/internal/core/type/codec/registry/CodecRegistryConstants.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/metadata/MetadataManagerTest.java
  • examples/pom.xml
  • examples/src/main/java/com/datastax/oss/driver/examples/paging/ForwardPagingRestUi.java
  • examples/src/main/java/com/datastax/oss/driver/examples/paging/RandomPagingRestUi.java
  • integration-tests/pom.xml
  • integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileReloadIT.java
  • integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeStateIT.java
  • integration-tests/src/test/java/com/datastax/oss/driver/core/session/ListenersIT.java
  • integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestLoggerIT.java
  • mapper-processor/src/main/java/com/datastax/oss/driver/internal/mapper/processor/MapperProcessor.java
  • metrics/micrometer/src/main/java/com/datastax/oss/driver/internal/metrics/micrometer/MicrometerMetricUpdater.java
  • osgi-tests/pom.xml
  • test-infra/pom.xml
  • test-infra/src/main/java/com/datastax/oss/driver/internal/gremlin/PatchedGremlinDslProcessor.java
✅ Files skipped from review due to trivial changes (2)
  • osgi-tests/pom.xml
  • examples/src/main/java/com/datastax/oss/driver/examples/paging/RandomPagingRestUi.java

@dkropachev dkropachev force-pushed the drop-java-8-support branch 3 times, most recently from 6420ae9 to 1145fb9 Compare May 26, 2026 05:05
Update maintained CI paths for the Java 11 baseline, including JDK 17 compiler flags, javadoc skips, authenticated version lookup, examples compilation, and runtime-specific reports.
@dkropachev dkropachev force-pushed the drop-java-8-support branch from 1145fb9 to 34b0ac4 Compare May 26, 2026 05:09
Enable required annotation processors, silence Java 11 compiler warnings, and improve CCM cleanup logging so integration failures are easier to diagnose.

Update tests for newer Mockito behavior by avoiding shared MockitoJUnitRunner usage in parallel integration tests and by verifying cache interactions explicitly where the mock behavior changed.

Fix CI failures exposed by the updated validation matrix: provide Micrometer histogram bounds in the no-SLA test, register config-change listeners before manual reloads, avoid assuming a transient one-connection node state before reconnection wins the race, and validate prepared-statement invalidation through observable cache behavior instead of a test-only removal-listener latch.
Keep PRIMITIVE_CODECS public for source and binary compatibility, deprecate direct array access, and add getPrimitiveCodecs() as the immutable-list accessor.

Refs #908
@dkropachev dkropachev force-pushed the drop-java-8-support branch from 34b0ac4 to d9ac068 Compare May 26, 2026 05:33
Copy link
Copy Markdown

@nikagra nikagra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks 👍 now.

Snyk security review results still to be addressed (I don't have permissions to check details)

@dkropachev dkropachev merged commit 5a61e12 into scylla-4.x May 26, 2026
28 of 29 checks passed
@dkropachev dkropachev deleted the drop-java-8-support branch May 26, 2026 13:53
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.

3 participants