Skip to content

roachtest: fix schemachange/mixed/tpcc for 19.1#41079

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
thoszhang:fix-schema-change-roachtest
Sep 25, 2019
Merged

roachtest: fix schemachange/mixed/tpcc for 19.1#41079
craig[bot] merged 1 commit intocockroachdb:masterfrom
thoszhang:fix-schema-change-roachtest

Conversation

@thoszhang
Copy link
Copy Markdown

@thoszhang thoszhang commented Sep 25, 2019

schemachange/mixed/tpcc uses CREATE TABLE AS in 19.2. This PR will have the
test correctly create a similar table in 19.1 without using CREATE TABLE AS.

See #40935 (comment).

Release justification: Fixes a test.

Release note: None

@thoszhang thoszhang requested a review from pbardea September 25, 2019 15:32
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@thoszhang thoszhang force-pushed the fix-schema-change-roachtest branch from 949980e to d4a96aa Compare September 25, 2019 15:38
Copy link
Copy Markdown
Contributor

@pbardea pbardea left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @lucy-zhang and @pbardea)


pkg/cmd/roachtest/schemachange.go, line 428 at r1 (raw file):

						if err := runAndLogStmts(ctx, t, c, "mixed-schema-changes-19.1", []string{
							`CREATE TABLE tpcc.orderpks (o_w_id, o_d_id, o_id, PRIMARY KEY(o_w_id, o_d_id, o_id));`,
							`INSERT INTO tpcc.orderpks SELECT o_w_id, o_d_id, o_id FROM tpcc.order LIMIT 1000;`,

What's the purpose of this LIMIT 1000?

`schemachange/mixed/tpcc` uses `CREATE TABLE AS` in 19.2. This PR will have the
test correctly create a similar table in 19.1 without using `CREATE TABLE AS`.

Release justification: Fixes a test.

Release note: None
@thoszhang thoszhang force-pushed the fix-schema-change-roachtest branch from d4a96aa to 2c744d4 Compare September 25, 2019 17:27
Copy link
Copy Markdown
Author

@thoszhang thoszhang left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @pbardea)


pkg/cmd/roachtest/schemachange.go, line 428 at r1 (raw file):

Previously, pbardea (Paul Bardea) wrote…

What's the purpose of this LIMIT 1000?

It's just to limit the number of rows to insert so we don't try to read and insert all 30 million rows of tpcc.order in this transaction, since I figured that the tables don't have to be identical in 19.1 and 19.2. 1000 might be too conservative, though. Now that I think about it, the best option is probably to just use all the rows to get a similarly-sized table, but use AOST to reduce contention, so I changed it.

Copy link
Copy Markdown
Contributor

@pbardea pbardea left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @pbardea)

@thoszhang
Copy link
Copy Markdown
Author

TFTR

bors r+

craig bot pushed a commit that referenced this pull request Sep 25, 2019
41079: roachtest: fix schemachange/mixed/tpcc for 19.1 r=lucy-zhang a=lucy-zhang

`schemachange/mixed/tpcc` uses `CREATE TABLE AS` in 19.2. This PR will have the
test correctly create a similar table in 19.1 without using `CREATE TABLE AS`.

See #40935 (comment).

Release justification: Fixes a test.

Release note: None

Co-authored-by: Lucy Zhang <lucy-zhang@users.noreply.github.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Sep 25, 2019

Build succeeded

@craig craig bot merged commit 2c744d4 into cockroachdb:master Sep 25, 2019
@thoszhang thoszhang deleted the fix-schema-change-roachtest branch September 25, 2019 18:10
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.

4 participants