forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backupccl,sqlutils: retry explicit transaction to avoid test failure
In recent CI runs, we've been seeing TestFullClusterBackup fail with: full_cluster_backup_restore_test.go:143: error executing 'COMMIT': pq: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_ABORTED_RECORD_FOUND): "sql txn" meta={id=ec1de683 key=/Table/4/1/"maxroach0"/0 iso=Serializable pri=0.03058324 epo=0 ts=1686254742.907452755,1 min=1686254688.329813751,0 seq=8023} lock=true stat=ABORTED rts=1686254742.907452755,1 wto=false gul=1686254688.829813751,0 int=2006 This looks to be the result of a recent change to issue all of the CREATE USER statements in a single transaction. Since explicit transactions are only automatically retried in specific circumstances, we now have to deal with the retry error. Here, we introduce a small helper that retries anything that looks like a restart error. Note that I haven't been able to reproduce the above locally as the test is very heavyweight and difficult to stress. Epic: none Release note: None
- Loading branch information
1 parent
76df617
commit 47784c2
Showing
5 changed files
with
146 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters