Skip to content

Create tablet-based keyspaces by default when tablets feature is enabled #16319

@tgrabiec

Description

@tgrabiec

Currently, tablets need to be enabled per-keyspace by specifying the initial_tablets option, e.g.:

CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': 3, 'initial_tablets': 100};

We want keyspaces to be tablet-based by default when "tablets" experimental feature is enabled, and allow users to opt-out from it on per-keyspace basis via option: 'tablets': false.

This will make it easier to run all tests with tablets, by simply flipping the switch. Also, we want to make tablets enabled by default in the future, and not require users to opt-in in their DDL statements to use tablets.

Only NetworkTopologyStrategy currently supports tablets, so other strategies will remain vnode-based.

When 'initial_tablets' is not provided, it's chosen by the system based on current topology and RF so that all shards are covered:

initial_tablets = max(nr_shards_in(dc) / RF_in(dc) for dc in datacenters)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions