هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

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
On this page

Show all

Automatic Retry upon SQL Statement Execution Errors

Updated on 2022-06-11 GMT+08:00

With automatic retry (referred to as CN retry), GaussDB(DWS) retries an SQL statement when the execution of this statement fails. If an SQL statement sent from the gsql client, JDBC driver, or ODBC driver fails to be executed, the CN can automatically identify the error reported during execution and re-deliver the task to retry.

The restrictions of this function are as follows:

  • Functionality restrictions:
    • CN retry increases execution success rate but does not guarantee success.
    • CN retry is enabled by default. In this case, the system records logs about temporary tables. If it is disabled, the system will not record the logs. Therefore, do not repeatedly enable and disable CN retry when temporary tables are used. Otherwise, data inconsistency may occur after a CN retry following a primary/standby switchover.
    • CN retry is enabled by default. In this case, the unlogged keyword is ignored in the statement for creating unlogged tables and thereby ordinary tables will be created by using this statement. If CN retry is disabled, the system records logs about unlogged tables. Therefore, do not repeatedly enable and disable CN retry when unlogged tables are used. Otherwise, data inconsistency may occur after a CN retry following a primary/standby switchover.
    • When GDS is used to export data, CN retry is supported. The existing mechanism checks for duplicate files and deletes duplicate files during data export. Therefore, you are advised not to repeatedly export data for the same foreign table unless you are sure that files with the same name in the data directory need to be deleted.
  • Error type restrictions:

    Only the error types in Table 1 are supported.

  • Statement type restrictions:

    Support single-statement CN retry, stored procedures, functions, and anonymous blocks. Statements in transaction blocks are not supported.

  • Statement restrictions of a stored procedure:
    • If an error occurs during the execution of a stored procedure containing EXCEPTION (including statement block execution and statement execution in EXCEPTION), the stored procedure can be retried. If an internal error occurs, the stored procedure will retry first, but if the error is captured by EXCEPTION, the stored procedure cannot be retried.
    • Packages that use global variables are not supported.
    • DBMS_JO is not supported.
    • UTL_FILE is not supported.
    • If the stored procedure has printed information (such as dbms_output.put_line or raise info), the printed information will be output repeatedly when retry occurs, and "Notice: Retry triggered, some message may be duplicated. " will be output before the repeated information.
  • Cluster status restrictions:
    • Only DNs or GTMs are faulty.
    • The cluster can be recovered before the number of CN retries reaches the allowed maximum (controlled by max_query_retry_times). Otherwise, CN retry may fail.
    • CN retry is not supported during scale-out.
  • Data import restrictions:
    • The COPY FROM STDIN statement is not supported.
    • The gsql \copy from metacommand is not supported.
    • JDBC CopyManager copyIn is not supported.

Table 1 lists the error types supported by CN retry and the corresponding error codes. You can use the GUC parameter retry_ecode_list to set the list of error types supported by CN retry. You are not advised to modify this parameter. To modify it, contact the technical support.

Table 1 Error types supported by CN retry

Error Type

Error Code

Remarks

CONNECTION_RESET_BY_PEER

YY001

TCP communication errors: Connection reset by peer (communication between the CN and DNs)

STREAM_CONNECTION_RESET_BY_PEER

YY002

TCP communication errors: Stream connection reset by peer (communication between DNs)

LOCK_WAIT_TIMEOUT

YY003

Lock wait timeout

CONNECTION_TIMED_OUT

YY004

TCP communication errors: Connection timed out

SET_QUERY_ERROR

YY005

Failed to deliver the SET command: Set query

OUT_OF_LOGICAL_MEMORY

YY006

Failed to apply for memory: Out of logical memory

SCTP_MEMORY_ALLOC

YY007

SCTP communication errors: Memory allocate error

SCTP_NO_DATA_IN_BUFFER

YY008

SCTP communication errors: SCTP no data in buffer

SCTP_RELEASE_MEMORY_CLOSE

YY009

SCTP communication errors: Release memory close

SCTP_TCP_DISCONNECT

YY010

SCTP communication errors: TCP disconnect

SCTP_DISCONNECT

YY011

SCTP communication errors: SCTP disconnect

SCTP_REMOTE_CLOSE

YY012

SCTP communication errors: Stream closed by remote

SCTP_WAIT_POLL_UNKNOW

YY013

Waiting for an unknown poll: SCTP wait poll unknown

SNAPSHOT_INVALID

YY014

Snapshot invalid

ERRCODE_CONNECTION_RECEIVE_WRONG

YY015

Connection receive wrong

OUT_OF_MEMORY

53200

Out of memory

CONNECTION_FAILURE

08006

GTM errors: Connection failure

CONNECTION_EXCEPTION

08000

Failed to communicate with DNs due to connection errors: Connection exception

ADMIN_SHUTDOWN

57P01

System shutdown by administrators: Admin shutdown

STREAM_REMOTE_CLOSE_SOCKET

XX003

Remote socket disabled: Stream remote close socket

ERRCODE_STREAM_DUPLICATE_QUERY_ID

XX009

Duplicate query id

ERRCODE_STREAM_CONCURRENT_UPDATE

YY016

Stream concurrent update

ERRCODE_LLVM_BAD_ALLOC_ERROR

CG003

Memory allocation error: Allocate error

ERRCODE_LLVM_FATAL_ERROR

CG004

Fatal error

HashJoin Temporary File Read Error(ERRCODE_HASHJOIN_TEMP_FILE_ERROR)

F0011

Temporary file read error, File error

To enable CN retry, set the following GUC parameters:
  • Mandatory GUC parameters (required by both CNs and DNs)

    max_query_retry_times

    CAUTION:

    If CN retry is enabled, temporary table data is logged. For data consistency, do not switch the enabled/disabled status for CN retry when the temporary tables are being used by sessions.

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