Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ts_middleware
-
Labels:
-
Epic Link:
-
Team:Telescope and Site
Description
To tell MySQL cluster to store data on disk (when they are not PK, because PK always go to RAM), while creating tables, tablespaces need to be assigned.
First MySQL Cluster needs to have defined tablespaces, this can be done by adding
TABLESPACE ts_1 STORAGE DISK ENGINE NDBCLUSTER;
|
at the end of the table creation, for example:
CREATE TABLE dt_1 ( member_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, last_name VARCHAR(50) NOT NULL, first_name VARCHAR(50) NOT NULL, dob DATE NOT NULL, joined DATE NOT NULL, INDEX(last_name, first_name) |
)
|
TABLESPACE ts_1 STORAGE DISK
|
ENGINE NDBCLUSTER;
|
The table space needs to exist, this can be done 1 file per table or 1 file for all, this will need to be added in the sqldef scrips automatically created by SAL.
This process has been described here:
https://confluence.lsstcorp.org/display/LTS/MySQL+Internal+configuration
Made redundant by move to Kafka/Influxdb