Skip to content

Commit 4956eff

Browse files
committed
scylla/3.11.x: disable Tablets for shardawaretest keyspace
With Scylla 2025.1, NetworkTopologyStrategy keyspaces have Tablets enabled by default. With Tablets, the shard a tablet is assigned to is independent of the driver's hash-based getShardId() calculation, so the hardcoded expected-shard values ("shard 0" / "shard 1") become non-deterministic. Add AND TABLETS = {'enabled': false} to the CREATE KEYSPACE statement to restore traditional shard assignment, making the shard expectations reliable again.
1 parent 1f22d0e commit 4956eff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

driver-core/src/test/java/com/datastax/driver/core/ShardAwarenessTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public void correctShardInTracingTest() {
100100
session().execute("DROP KEYSPACE IF EXISTS shardawaretest");
101101
session()
102102
.execute(
103-
"CREATE KEYSPACE shardawaretest WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': '3'}");
103+
"CREATE KEYSPACE shardawaretest WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': '3'} AND TABLETS = {'enabled': false}");
104104
session()
105105
.execute("CREATE TABLE shardawaretest.t (pk text, ck text, v text, PRIMARY KEY (pk, ck))");
106106

0 commit comments

Comments
 (0)