Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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
Situation Awareness
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

SQL Execution Control

Updated on 2025-02-13 GMT+08:00

Scenarios

  • All requests whose execution duration exceeds n seconds need to be killed.
  • Requests from an IP address for a specific client need to be killed.
  • All requests for full table scan need to be killed.

Precautions

  • The instance node must have 4 or more vCPUs.
  • This function is available for replica set instances and cluster instances of version 3.4 or later.
  • A maximum of 10 rules can be created for a DB instance.
  • For an ultra-large cluster with more than 32 shards, creating and enabling rules whose Node Type is shard or dds mongos_shard will fail. You are advised to create rules whose Node Type is dds mongos.
  • For a cluster with more than 10 shards, you are advised to select one rule at a time when enabling or disabling rules.
  • This function is available only to whitelisted users. To use this function, you need to submit a service ticket. In the upper right corner of the management console, choose Service Tickets > Create Service Ticket to submit a service ticket.

Creating a Rule

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, locate the target DB instance and click its name.
  5. In the navigation tree on the left, click SQL Execution Control.

    Figure 1 SQL Execution Control

  6. Click Create Rule.

    Figure 2 Create Rule

  7. On the Create Rule page, set parameters as required. For details, see Table 1.

    Figure 3 Parameters for creating a rule
    Table 1 Parameter description

    Parameter

    Description

    SQL Type

    You can specify one or more SQL statement types.

    The value can be:
    • query: operation for querying data.
    • update: operation for updating data.
    • insert: operation for inserting data.
    • remove: operation for deleting data.
    • command: command operation.
    • getmore: operation for obtaining more data.

    Table Namespace

    • If this parameter is left blank, this rule applies to operations on all databases and tables in the DB instance.
    • If this parameter is set to a database name, this rule applies to operations on all collections in the database. For example, the value can be db1.
    • If this parameter is set to a value in the format of database_name.collection_name, this rule only applies to operations on the collection. For example, the value can be db1.coll1.

    Client IP Address

    If an ECS on Huawei Cloud is used, the value is the private IP address of the ECS.

    NOTE:
    • This parameter does not take effect for cluster DB instances of version 3.4.

    Execution Plan

    • By default, this parameter is left blank, indicating that this rule applies to all execution plans.
    • The value COLLSCAN indicates that the operation for full table scan will be killed.

    Maximum Concurrency

    • The value 0 indicates that this parameter does not take effect.
    • For example, if this parameter is set to 100, a maximum of 100 operations that meet the conditions can be performed.
      NOTE:

      If there are 110 currentOp operations that meet the conditions, 10 operations will be randomly killed.

    • Either this parameter or Maximum Execution Duration must be greater than 0.

    Maximum Execution Duration

    • The value 0 indicates that this parameter does not take effect.
    • For example, if this parameter is set to 5, currentOp operations executed for more than 5s will be killed. The value must be no less than 2.
    • Either this parameter or Maximum Concurrency must be greater than 0.

    Node Type

    • dds mongos indicates that this rule only applies to mongos nodes in a DDS instance.
    • shard indicates that this rule only applies to shard nodes.
    • dds mongos_shard indicates that this rule applies to both mongos and shard nodes in a DDS instance.
    • replica indicates that this rule applies to replica sets.

  8. Click OK.

Enabling a Rule

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, locate the target DB instance and click its name.
  5. In the navigation tree on the left, click SQL Execution Control.

    Figure 4 SQL Execution Control

  6. Locate the target rule and click Enable in the Operation column.

    Figure 5 Enable

  7. Click Yes.

    Figure 6 Enable Rule

  8. View the rule status on the SQL Execution Control page.

    Figure 7 Status

Disabling a Rule

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, locate the target DB instance and click its name.
  5. In the navigation tree on the left, click SQL Execution Control.

    Figure 8 SQL Execution Control

  6. Locate the target rule and click Disable in the Operation column.

    Figure 9 Disable

  7. Click Yes.

    Figure 10 Disable Rule

  8. View the rule status on the SQL Execution Control page.

    Figure 11 Status

Deleting a Rule

CAUTION:

An enabled rule cannot be deleted. To delete a rule, you must disable the rule by referring to Disabling a Rule.

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, locate the target DB instance and click its name.
  5. In the navigation tree on the left, click SQL Execution Control.

    Figure 12 SQL Execution Control

  6. Locate the target rule and click Delete in the Operation column.

    Figure 13 Delete

  7. Click Yes.

    Figure 14 Delete Rule

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback