fix: replace SimpleStrategy with NetworkTopologyStrategy in patches#141
Merged
Merged
Conversation
054be52 to
4d7f266
Compare
f4ff0c9 to
99fe6d8
Compare
There was a problem hiding this comment.
Pull request overview
Updates version-specific patchsets used by the matrix test framework to avoid ScyllaDB failures caused by SimpleStrategy being incompatible with tablets, by switching integration-test keyspace creation to NetworkTopologyStrategy.
Changes:
- Replace
SimpleStrategywithNetworkTopologyStrategyin keyspace creation across 4.x (DataStax + Scylla) and 3.x Scylla driver patchsets. - Add a new Scylla 3.x patch (
3.11.5.14) including CCM compatibility fixes and aMetadata.getReplicas(...)fallback adjustment for tablet-backed keyspaces. - Add a Scylla 3.x
ignore.yamlto skip known-incompatible tests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| versions/scylla/4.19.0.8/patch | Switches integration-test keyspace replication to NTS (dc1) and updates related assertions/usages in the 4.19.0.8 patchset. |
| versions/scylla/4.18.1.0/patch | Switches integration-test keyspace replication to NTS (dc1) and updates related assertions/usages in the 4.18.1.0 patchset. |
| versions/datastax/4.19.2/patch | Switches integration-test keyspace replication to NTS (dc1) and updates assertions in the 4.19.2 patchset. |
| versions/datastax/4.19.1/patch | Switches integration-test keyspace replication to NTS (dc1) and updates assertions in the 4.19.1 patchset. |
| versions/scylla/3.11.5.14/patch | New 3.x Scylla patch: NTS migration (datacenter1) plus additional CCM/metadata/test adjustments for modern Scylla. |
| versions/scylla/3.11.5.14/ignore.yaml | New ignore list for tests known to be incompatible/unreliable on Scylla for this version. |
| versions/scylla/3.11.4.0/patch | Applies NTS migration (datacenter1) and related test adjustments for this 3.x patchset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Lorak-mmk
approved these changes
Apr 24, 2026
e2d93f0 to
3c50578
Compare
1e8b552 to
2bf32a6
Compare
Replace SimpleStrategy with NetworkTopologyStrategy (datacenter1) in all integration test keyspace creation statements across all tested 4.x driver versions (datastax/4.19.1, datastax/4.19.2, scylla/4.18.1.0, scylla/4.19.0.8). Scylla PR scylladb/scylladb#25342 made SimpleStrategy throw InvalidConfigurationInQueryException when tablets are globally enabled (the default on recent Scylla), causing ~100 cascading test failures per driver version originating from SessionUtils.createKeyspace(). Key files changed in each patch: - SessionUtils.java (central fix) - SchemaChangesIT (CQL + assertion: datacenter1 key, no hasSize(2)) - TokenITBase, SimpleStatementCcmIT - LWTLoadBalancingIT, MailboxServiceImpl (scylla driver versions only) - DefaultKeyspaceIT, QueryKeyspaceAndTableIT (mapper tests)
d183fbf to
7b0d049
Compare
7b0d049 to
7f0ceaa
Compare
dkropachev
approved these changes
May 5, 2026
nikagra
added a commit
to nikagra/scylla-java-driver-matrix
that referenced
this pull request
May 15, 2026
Scylla 2025.4.x enables tablets by default for all replication strategies.
Counters, secondary indexes, and materialized views are not supported on
tables with tablets, causing 6 tests to fail in driver versions 3.11.4.0
and 3.11.5.15.
Changes:
- versions/scylla/3.11.4.0/patch: add central CCMTestsSupport.initTestKeyspace()
override that appends AND tablets = {'enabled': false} when running against
Scylla (ccm().getScyllaVersion() != null), fixing IndexMetadataTest,
TableMetadataTest, QueryBuilderExecutionTest, and SessionTest failures.
- versions/scylla/3.11.5.15/patch: replace with full NTS conversion (from
3.11.5.14) plus the same central initTestKeyspace() tablets fix. The previous
3.11.5.15 patch was missing all NTS and tablets changes introduced by PR scylladb#141
for 3.11.5.14, because version resolution picks the exact-match directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ScyllaDB PR scylladb/scylladb#25342 changed
ks_prop_defs::as_ks_metadata()so that when tablets are globally enabled (the default on recent ScyllaDB),initial_tablets = 0is set for all replication strategies.SimpleStrategythen validates tablet support and throws:This caused Jenkins build #1989 to regress across all tested 3.x and 4.x driver versions:
The majority of failures cascaded from
SessionUtils.createKeyspace()(called bySessionRule.before()), which hardcodesSimpleStrategy— causing entire test classes to be skipped when it throws.Fix
Replace
SimpleStrategywithNetworkTopologyStrategyin all integration test keyspace creation statements in each version's patch. The DC name follows CCM convention:dc1for 4.x driver tests,datacenter1for 3.x driver tests. NTS supports tablets and is the correct strategy for single-DC test clusters.Changes per patch
Each updated patch is a single combined diff (existing Scylla compatibility changes + new NTS migration) applied from the clean tag.
4.x patches (datastax/4.19.1, datastax/4.19.2, scylla/4.18.1.0, scylla/4.19.0.8)
DC name:
dc1(CCM default for 4.x). Key changes:SessionUtils.createKeyspace()— central fix, resolves majority of cascading failuresSchemaChangesIT— CQL statements updated + assertion updated (dc1key instead ofreplication_factor,hasSize(2)removed since NTS maps contain more entries)TokenITBase,SimpleStatementCcmIT— CQL statementsLWTLoadBalancingIT,MailboxServiceImpl— CQL statements (ScyllaDB driver versions only)DefaultKeyspaceIT,QueryKeyspaceAndTableIT— mapper test CQL statementsscylla/3.11.5.14 (new patch)
The matrix framework falls back to the most recent existing patch version when a specific version has no patch. Since
3.11.5.14is the current latest 3.x release, it is more appropriate to aggregate all fixes into it rather than updating older patch files.This patch is created from scratch (the version had no prior patch) and includes everything needed to pass Jenkins tests on modern Scylla (
2026.2.0~dev):SimpleStrategy → NTS migration (DC name:
datacenter1, CCM default for 3.x):TestUtils.java—CREATE_KEYSPACE_SIMPLE_FORMATconstant (fixes all callers:CCMTestsSupport,AbstractPoliciesTest, etc.)AsyncQueryTest,ControlConnectionTest,MetadataTest,PreparedStatementInvalidationTest,ShardAwarenessTest,StatementPagesTest,TokenIntegrationTest,TupleTest,UnresolvedUserTypeTest,UserTypesTest— inline CQL statementsCCMBridge compatibility fixes (modern Scylla CCM):
release:prefix logic —VersionNumber.parse("2026.2.0~dev")succeeds, causingrelease:2026.2.0~devto be passed to CCM which fails. Now passes the version string bare.-t(thrift) flag fromccm add— CCM dropped thrift support.jmxPort = 7000 + n * 100inadd()instead offindAvailablePort()to avoid TOCTOU races and match the fallback injmxAddressOfNode().SessionStressTest— addjvmArgs = {"--smp", "1", "--max-networking-io-control-blocks", "15000"}to@CCMConfigto prevent connection pool exhaustion on Scylla with high shard counts.TokenAwarePolicyTest— disable tablets for composite-key routing test — after the NTS migration, Scylla creates keyspaces with tablets enabled by default. The3.xdriver's tablet-awaregetReplicas()then routes via the tablet map rather than the token map, breaking the test's hardcoded expectation that token4881097376275569167for composite key(1,2)maps to node 1. Fix: create the keyspace withAND tablets = {'enabled': false}to force deterministic token-map routing. This fix is also added to the driver in scylladb/java-driver#876.scylla/3.11.4.0 (updated patch)
SimpleStrategy → NTS migration only (DC name:
datacenter1), same set of files as3.11.5.14minus the CCMBridge/SessionStressTest/TokenAwarePolicyTest changes (those are not needed for3.11.4.0which predates tablet support in the driver).Not covered
scylla/3.11.5.12andscylla/3.11.5.13— these versions also haveSimpleStrategyinTestUtils.CREATE_KEYSPACE_SIMPLE_FORMATand no existing patch to override it. They will fail the same way on modern Scylla. Since the framework selects the most recent patch version and3.11.5.14is now covered, these are lower priority but should be addressed if they are included in the test matrix.Verified
Each patch was applied to a clean worktree at the corresponding tag and compiled successfully with
mvn compile. The two remaining failures from the previous Jenkins run (SessionStressTest,TokenAwarePolicyTest) were reproduced locally against Scylla2026.1.0and confirmed passing with the fixes applied.Full matrix validation (scylla 3.x × 2 versions, scylla 4.x × 2 versions, datastax 4.x × 2 versions) is running in Jenkins build #19.
Corresponding driver fixes
scylla-4.x)scylla-3.x) — NTS migration + TokenAwarePolicyTest tablet fix