Skip to content

backupccl: add a basic test with incremental backup on types#51513

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
rohany:backup-tests
Jul 16, 2020
Merged

backupccl: add a basic test with incremental backup on types#51513
craig[bot] merged 1 commit intocockroachdb:masterfrom
rohany:backup-tests

Conversation

@rohany
Copy link
Copy Markdown
Contributor

@rohany rohany commented Jul 16, 2020

Work for #50321.

As of now, only the ALTER TYPE ... RENAME command has been
implemented, so add a basic test here for incremental backup picking up
changes to the types name.

Release note: None

@rohany rohany requested review from a team and pbardea July 16, 2020 17:10
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

sqlDB.Exec(t, `RESTORE TABLE d.t FROM 'nodelocal://0/test/' WITH into_db = 'd2'`)
sqlDB.CheckQueryResults(t, `SELECT 'hello'::d2.newname`, [][]string{{"hello"}})

// Now explicitly use the `INCREMENTAL` backup statement.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I don't see much need for this test -- of type backups -- to bother testing via both incremental syntaxes - I think the part above is sufficient to prove it works.

If we did want to test more cases though, I might say either adding a value to a type, a cross-db type reference or a db or cluster backup instead of single table -- those all seem more likely to have type-backup interactions than the two different incremental syntaxes. That said, I wouldn't say any of it is a requirement to merge -- the test above is already better than what we have now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I don't see much need for this test -- of type backups -- to bother testing via both incremental syntaxes - I think the part above is sufficient to prove it works.

Oh ok, I wasn't sure there was a difference.

I might say either adding a value to a type

I'll be adding more tests here as more of the ALTER TYPE/DROP TYPE commands get implemented.

cross-db type reference

I've disabled these :)

db or cluster backup instead of single table

These will be easier once DROP TYPE lands.

Work for cockroachdb#50321.

As of now, only the `ALTER TYPE ... RENAME` command has been
implemented, so add a basic test here for incremental backup picking up
changes to the types name.

Release note: None
@rohany
Copy link
Copy Markdown
Contributor Author

rohany commented Jul 16, 2020

bors r=dt

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 16, 2020

Build failed (retrying...)

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 16, 2020

Canceled (will resume)

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 16, 2020

Build succeeded

@craig craig bot merged commit dc736e8 into cockroachdb:master Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants