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.
Merge pull request cockroachdb#115145 from cockroachdb/blathers/backp…
…ort-release-23.2-112357 release-23.2: streamingccl: test that replicated backup fails post cutover
- Loading branch information
Showing
2 changed files
with
95 additions
and
12 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
48 changes: 48 additions & 0 deletions
48
pkg/ccl/streamingccl/streamingest/testdata/jobs_post_cutover
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
create-replication-clusters | ||
---- | ||
|
||
start-replication-stream | ||
---- | ||
|
||
exec-sql as=source-tenant | ||
SET CLUSTER SETTING jobs.debug.pausepoints = 'backup.after.write_first_checkpoint'; | ||
---- | ||
|
||
query-sql as=source-tenant regex-error=(backup.after.write_first_checkpoint) | ||
BACKUP INTO 'nodelocal://1/example-schedule'; | ||
---- | ||
|
||
let $backupID as=source-tenant | ||
WITH jobs AS (SHOW JOBS) SELECT job_id FROM jobs WHERE job_type='BACKUP'; | ||
---- | ||
|
||
query-sql retry as=source-tenant | ||
WITH jobs AS (SHOW JOBS) SELECT status FROM jobs WHERE job_id=$backupID; | ||
---- | ||
paused | ||
|
||
let $ts as=source-system | ||
SELECT clock_timestamp()::timestamp::string | ||
---- | ||
|
||
cutover ts=$ts | ||
---- | ||
|
||
start-replicated-tenant | ||
---- | ||
|
||
exec-sql as=destination-tenant | ||
SET CLUSTER SETTING jobs.debug.pausepoints = ''; | ||
---- | ||
|
||
exec-sql as=destination-tenant | ||
RESUME JOB $backupID | ||
---- | ||
|
||
|
||
query-sql retry as=destination-tenant | ||
WITH jobs AS (SHOW JOBS) SELECT status FROM jobs WHERE job_id=$backupID; | ||
---- | ||
failed | ||
|