Environment
- YugabyteDB
Issue
The user is trying to create a table with 151 tablets, but the operation is failing with the following error:
yugabyte=# CREATE TABLE t1(id int) SPLIT INTO 151 TABLETS;
ERROR: Invalid table definition: Error creating table yugabyte.t1 on the master: The requested number of tablets (151) is over the permitted maximum (150)
yugabyte=#
Resolution
Overview
In YugabyteDB, The master GFLag max_create_tablets_per_ts
controls the maximum number of tablets that can be created when a table is created. By default, this value is set to 50 per live tablet server. The number of maximum tablets that can be created is calculated as follows:
Max tablets at creation = max_create_tablets_per_ts * num_live_tservers
So, if you have 3 live tablet servers and the max_create_tablets_per_ts
is set to 50, then the maximum number of tablets that can be created is 150.
Steps
To resolve this issue, you can increase the max_create_tablets_per_ts
GFlag value to the desired number of tablets you want to create.
- Login to Yugabyte Anywhere UI.
- Click the Universe name.
- Click on "Actions" and then click on "Edit GFlags".
- Search for the
max_create_tablets_per_ts
GFlag and update the value to the desired number of max tablets per tablet server in master's GFlags. - Click on "Save Changes".
Comments
0 comments
Please sign in to leave a comment.