With automatic retry (referred to as CN retry), GaussDB(DWS) retries an SQL statement when the execution of a 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:
Only the error types in Table 1 are supported.
Support single-statement CN retry, stored procedures, functions, and anonymous blocks. Statements in transaction blocks are 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.
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 reading error (ERRCODE_HASHJOIN_TEMP_FILE_ERROR). |
F0011 |
File error |
Partition number error (ERRCODE_PARTITION_NUM_CHANGED). |
45003 |
During scanning on a list partition table, it is found that the number of partitions is different from that in the optimization phase. This problem usually occurs when the queries and ADD/DROP partitions are concurrently executed. (This error is supported only by cluster 8.1.3 and later versions.) |
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.