Modifying Parameters of a DDM Instance
Function
This API is used to modify parameters of a DDM instance.
Constraints
The values of the modified parameters must be within the value range defined on the DDM console. For details about the range of parameter values, see Modifying Parameters of a DDM Instance in Distributed Database Middleware User Guide.
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 To obtain this value, see Obtaining a Project ID. |
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. You can obtain the token by calling the IAM API used to obtain a user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
values |
Yes |
values object Map<String,String> |
Parameter values defined by users based on a default parameter template.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
bind_table |
No |
String |
Data association among multiple sharded tables. The optimizer processes JOIN operations at the MySQL layer based on these associations. 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. Enumerated values:
|
collation_server |
No |
String |
Collation on the DDM server. To modify the collation, you must modify the server's character set correspondingly. Enumerated values:
|
concurrent_execution_level |
No |
String |
Concurrency level of scanning table shards in a logical table:
Enumerated values:
|
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 the table recycle bin is enabled. Enumerated values:
|
insert_to_load_data |
No |
String |
Whether constant values can be inserted by executing the LOAD DATA statement. Enumerated values:
|
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 allowed for the packets transferred between the server and the client at a time. The value must be a multiple of 1024. The value ranges from 1024 to 1073741824. The default value is 1073741824. |
max_backend_connections |
No |
String |
Maximum of concurrent RDS 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 instance is: (RDS instance's maximum connections - 20)/DDM nodes. The value ranges from 0 to 10000000. |
max_connections |
No |
String |
Concurrent connections allowed per DDM instance, which depends on the class and quantity of associated RDS instances. The default value is 20000. The value ranges from 10 to 40000, indicating that the maximum of concurrent connections cannot exceed 40,000. |
min_backend_connections |
No |
String |
Minimum concurrent connections from a DDM node to an RDS 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. Enumerated values:
|
seconds_behind_master |
No |
String |
Threshold in seconds of the replication lag between a primary RDS 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 instance and its read replicas cannot exceed 30 seconds. If the time exceeds 30 seconds, the data read requests are no longer forwarded to the read replicas. |
sql_audit |
No |
String |
Whether SQL audit is enabled. Enumerated values:
|
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 not less than 28,800 seconds. |
support_ddl_binlog_hint |
No |
String |
Whether a binlog hint is added to each DDL statement. Enumerated values:
|
transaction_policy |
No |
String |
Enumerated values:
|
ultimate_optimize |
No |
String |
Whether the SQL execution plan is optimized based on parameter values. Enumerated values:
|
Example Request
Changing the value of long_query_time to 2. The value indicates that the query is considered as a slow query if its execution duration is greater than or equal to 2 seconds.
PUT https://{endpoint}/v3/{project_id}/instances/{instance_id}/configurations { "values" : { "long_query_time" : 2 } }
Response Parameters
- Normal response
Table 5 Response body parameters Parameter
Type
Description
nodeList
String
DDM instance nodes
needRestart
Boolean
Whether the instance needs to be restarted
jobId
String
Task ID
configId
String
Parameter group ID
configName
String
Parameter group name
- Normal response example
{ "nodeList" : null, "needRestart" : "false", "jobId" : "9fe84a77-6a6b-4b03-9a3e-db910a548657", "configId" : null, "configName" : null }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
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