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.
streamingccl: test that replicated backup fails post cutover
Informs cockroachdb#107089 Epic: none
- Loading branch information
Showing
2 changed files
with
96 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
49 changes: 49 additions & 0 deletions
49
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,49 @@ | ||
|
||
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='job paused at pausepoint' | ||
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 | ||
---- | ||
|
||
|
||
# An empty next run indicates the schedule is paused. | ||
query-sql retry as=destination-tenant | ||
WITH jobs AS (SHOW JOBS) SELECT status FROM jobs WHERE job_id=$backupID; | ||
---- | ||
failed | ||
|