Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Modifying Parameters of a DDM Instance

Updated on 2024-08-02 GMT+08:00

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

Table 1 Path parameters

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

Table 2 Request header 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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

values

Yes

values object

Map<String,String>

Parameter values defined by users based on a default parameter template.

  • key: indicates the parameter name. If the key is empty, the parameter value is not changed.
  • value: indicates the parameter value.
Table 4 values

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:

  • gbk
  • utf8
  • utf8mb4

collation_server

No

String

Collation on the DDM server. To modify the collation, you must modify the server's character set correspondingly.

Enumerated values:

  • utf8_unicode_ci
  • utf8_bin
  • gbk_chinese_ci
  • gbk_bin
  • utf8mb4_unicode_ci
  • utf8mb4_bin

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.

Enumerated values:

  • RDS_INSTANCE
  • DATA_NODE
  • PHY_TABLE

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:

  • OFF
  • ON

insert_to_load_data

No

String

Whether constant values can be inserted by executing the LOAD DATA statement.

Enumerated values:

  • OFF
  • ON

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:

  • OFF
  • ON

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:

  • OFF
  • ON

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:

  • OFF
  • ON

transaction_policy

No

String

  • XA: * XA transaction, which attempts to ensure atomicity and isolation.
  • FREE: Best-effort commit transaction that allows data to be written to multiple shards, without affecting performance. This setting does not ensure atomicity.
  • NO_DTX: With this setting, single-shard transactions are executed.

Enumerated values:

  • XA
  • FREE
  • NO_DTX

ultimate_optimize

No

String

Whether the SQL execution plan is optimized based on parameter values.

Enumerated values:

  • OFF
  • ON

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

Error Codes

For details, see Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback