Transaction Monitoring¶
The automatic rollback transaction can be monitored and its statement problems can be located by setting the transaction timeout warning. In addition, the statements with long execution time can also be monitored.
transaction_sync_naptime¶
Parameter description: For data consistency, when the local transaction's status differs from that in the snapshot of the GTM, other transactions will be blocked. You need to wait for a few minutes until the transaction status of the local host is consistent with that of the GTM. The gs_clean tool is automatically triggered for cleansing when the waiting period on the CN exceeds that of transaction_sync_naptime. The tool will shorten the blocking time after it completes the cleansing.
Type: USERSET
Value range: an integer. The minimum value is 0. The unit is second.
Default value: 5s
Note
If the value of this parameter is set to 0, gs_clean will not be automatically invoked for the cleansing before the blocking arrives the duration. Instead, the gs_clean tool is invoked by gs_clean_timeout. The default value is 5 minutes.
transaction_sync_timeout¶
Parameter description: For data consistency, when the local transaction's status differs from that in the snapshot of the GTM, other transactions will be blocked. You need to wait for a few minutes until the transaction status of the local host is consistent with that of the GTM. An exception is reported when the waiting duration on the CN exceeds the value of transaction_sync_timeout. Roll back the transaction to avoid system blocking due to long time of process response failures (for example, sync lock).
Type: USERSET
Value range: an integer. The minimum value is 0. The unit is second.
Default value: 10min
Note
If the value is 0, no error is reported when the blocking times out or the transaction is rolled back.
The value of this parameter must be greater than gs_clean_timeout. Otherwise, unnecessary transaction rollback will probably occur due to a block timeout caused by residual transactions that have not been deleted by gs_clean on a DN.