Modifying Parameters of a DDM Instance
Function
This API is used to modify parameters of a DDM instance.
Constraints
None
URI
PUT /v3/{project_id}/instances/{instance_id}/configurations
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region |
instance_id |
Yes |
String |
DDM instance ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Language |
No |
String |
Language. The value can be zh-cn or en-us. The default value is zh-cn. |
X-Auth-Token |
Yes |
String |
User token It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
values |
Yes |
Array of Values objects |
Parameters that are to be modified |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
bind_table |
No |
String |
Data association among multiple sharded tables. Based on the association, the optimizer processes JOIN operations at the MySQL layer. The format is: [{tb.col1,tb2.col2},{tb.col2,tb3.col1},...] |
character_set_server |
No |
String |
DDM server's character set. To store emoticons, set both this parameter and the character set on RDS to utf8mb4. To modify the character set, you must change the collation of the DDM server correspondingly. Possible values are as follows:
|
collation_server |
No |
String |
Collation on the DDM server. To modify the collation, you must modify the server's character set correspondingly. Possible values are as follows:
|
concurrent_execution_level |
No |
String |
Concurrency level of scanning table shards in a logical table: DATA_NODE: indicates that database shards are scanned in parallel and table shards in each database shard are scanned in serial. RDS_INSTANCE: indicates that RDS DB instances are scanned in parallel and shards in each DB instance are scanned in serial. PHY_TABLE: indicates that all table shards are scanned in parallel. Possible values are as follows:
|
connection_idle_timeout |
No |
String |
Number of seconds the server waits for activity on a connection before closing it. The value ranges from 60 to 28800. The default value is 28800, indicating that the server waits for 28800 seconds before closing a connection. |
enable_table_recycle |
No |
String |
Whether enable the table recycle bin is enabled. Possible values are as follows:
|
insert_to_load_data |
No |
String |
Whether the constant values are inserted by executing the LOAD DATA statement. Possible values are as follows:
|
live_transaction_timeout_on_shutdown |
No |
String |
Timeout limit of an in-transit transaction, in seconds. The value ranges from 0 to 100. The default value is 1, indicating that the server waits for 1 second before closing the connection. |
long_query_time |
No |
String |
Minimum duration of a query to be logged as slow, in seconds. The value ranges from 0.01 to 10. The default value is 1, indicating that the query is considered as a slow query if its execution duration is greater than or equal to 1 second. |
max_allowed_packet |
No |
String |
Maximum size of a packet or any generated intermediate string. The packet message buffer is initialized to net_buffer_length bytes, but can grow up to max_allowed_packet bytes if required. By default, this parameter is set to a small value to detect large (and possibly incorrect) packets. The value should be a multiple of 1024. The value range ranges from 1024 to 1073741824. The default value is 16777216. |
max_backend_connections |
No |
String |
Maximum of concurrent client connections allowed per DDM instance. When this parameter is set to 0 (default), the maximum concurrent connections from a DDM node to an RDS DB instance is: (RDS DB instance's maximum connections - 20)/Number of DDM nodes. The value ranges from 0 to 10000000. |
max_connections |
No |
String |
Maximum number of concurrent connections allowed per DDM instance. The value is related to the class and number of associated RDS DB instances. The value ranges from 10 to 40000. The default value is 20000, indicating that the maximum number of concurrent connections cannot exceed 40000. |
min_backend_connections |
No |
String |
Minimum of concurrent client connections allowed per DDM instance. The default value is 10. The value ranges from 0 to 10000000. |
not_from_pushdown |
No |
String |
Whether the SELECT statements that do not contain any FROM clauses are pushed down. Possible values are as follows:
|
seconds_behind_master |
No |
String |
Threshold in seconds of the replication lag between a primary RDS DB instance to its read replica. The value ranges from 0 to 7200. The default value is 30, indicating that the time for data replication between the primary RDS DB instance and its read replica cannot exceed 30 seconds. If the time exceeds 30 seconds, the data read requests are no longer forwarded to the read replica. |
sql_audit |
No |
String |
Whether to enable SQL audit Possible values are as follows:
|
sql_execute_timeout |
No |
String |
Number of seconds to wait for a SQL statement to execute before it times out. The value ranges from 100 to 28800. The default value is 28800, indicating that the SQL statement times out if its execution time is greater than or equal to 28800 seconds. |
support_ddl_binlog_hint |
No |
String |
Whether a binlog hint is added to each DDL statement. Possible values are as follows:
|
transaction_policy |
No |
String |
XA: * XA transaction, which attempts to ensure atomicity and isolation. FREE: * FREE transaction, which is a best-effort commit transaction that allows data to be written to multiple shards, without impacting performance. FREE transactions do not ensure atomicity. NO_DTX: * NO_DTX transaction, which is a single-shard transaction. Possible values are as follows:
|
ultimate_optimize |
No |
String |
Whether the SQL execution plan is optimized based on parameter values. Possible values are as follows:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
nodeList |
String |
DDM instance nodes |
needRestart |
Boolean |
Whether the instance needs to be restarted. |
jobId |
String |
Task ID |
configId |
String |
Parameter template ID |
configName |
String |
Parameter template name |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Example Request
PUT https://{endpoint}/v3/{project_id}/instances/{instance_id}/configurations { "values": { "character_set_server": "gbk", "collation_server": "gbk_bin" } }
Example Response
Status code: 200
ok
{ "nodeList": xxxx, "needRestart": false, "jobId": "cd4572a9-9bfc-4952-9a9f-388a90fef02f", "configId": xxxx, "configName": xxxx }
Status code: 400
bad request
{ "externalMessage" : "Parameter error.", "errCode" : "DBS.280001" }
Status code: 500
server error
{ "externalMessage" : "Parameter error.", "errCode" : "DBS.280001" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
bad request |
500 |
server error |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot