Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workload/mixed-version/schemachanger: re-enable mixed version workload #87142

Merged
merged 3 commits into from
Sep 21, 2022

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Aug 30, 2022

Fixes: #58489 #87477

Previously the mixed version schema changer workload was disabled because of the lack of version gates. These changes will do the following:

  • Start reporting errors on this workload again.
  • Disable trigrams in a mixed version state.
  • Disable the insert part of the workload in a mixed version state (there is an optimizer on 22.1 that can cause some of the queries to fail)

Release justification: low risk only extends test coverage

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@fqazi fqazi requested a review from a team August 30, 2022 20:39
@fqazi fqazi marked this pull request as ready for review August 31, 2022 14:55
@@ -2488,7 +2498,6 @@ func (og *operationGenerator) insertRow(ctx context.Context, tx pgx.Tx) (stmt *o
for _, row := range rows {
formattedRows = append(formattedRows, fmt.Sprintf("(%s)", strings.Join(row, ",")))
}

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: empty line deletion.

Comment on lines +2383 to +2386
tableExists = false
tableName.SchemaName = "InvalidObjectName"
Copy link
Contributor

Choose a reason for hiding this comment

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

How does these two lines disable selects? In particular, why is the second line (tableName.SchemaName = "InvalidObjectName") needed?

@@ -64,7 +64,7 @@ func runSchemaChangeWorkloadStep(loadNode, maxOps, concurrency int) versionStep
// crashes, deadlocks, etc.
// TODO(spaskob): remove when https://github.com/cockroachdb/cockroach/issues/47430
// is closed.
"--tolerate-errors=true",
//"--tolerate-errors=true",
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we want to comment out this line? It seems necessary.

@fqazi fqazi force-pushed the mixedVersion branch 2 times, most recently from 305ff0c to d991a87 Compare September 14, 2022 20:29
Copy link
Collaborator Author

@fqazi fqazi 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 @Xiang-Gu)


pkg/cmd/roachtest/tests/mixed_version_schemachange.go line 67 at r3 (raw file):

Previously, Xiang-Gu (Xiang Gu) wrote…

why do we want to comment out this line? It seems necessary.

Done.


pkg/workload/schemachange/operation_generator.go line 2384 at r3 (raw file):

Previously, Xiang-Gu (Xiang Gu) wrote…

How does these two lines disable selects? In particular, why is the second line (tableName.SchemaName = "InvalidObjectName") needed?

Done.

So, the second line basically makes the inserts always target a non-existent table to skip all the logic.

@fqazi fqazi requested review from Xiang-Gu and a team September 14, 2022 20:32
@ajwerner
Copy link
Contributor

@fqazi I noticed something similar in #87477

@fqazi
Copy link
Collaborator Author

fqazi commented Sep 20, 2022

@Xiang-Gu Can you take another look at this, if you have the cycles?

Copy link
Contributor

@Xiang-Gu Xiang-Gu left a comment

Choose a reason for hiding this comment

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

Thanks for your work! This LGTM

@fqazi
Copy link
Collaborator Author

fqazi commented Sep 21, 2022

@Xiang-Gu @tftr!

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 21, 2022

Build failed (retrying...):

@renatolabs
Copy link
Collaborator

bors r-

@fqazi we recently changed the native library API for roachtests -- see #86451. Roachtests shouldn't call PutLibraries directly anymore, but instead specify the required native libraries in the test spec.

Cancelling the build here to let you rebase against master and fix the compilation issue.

@craig
Copy link
Contributor

craig bot commented Sep 21, 2022

Canceled.

…ployed

Previously, the schemachanger mixed version workload did not
deploy the libGEOS libraries causing operations to fail. To address,
this patch will update the frontend to upload these binaries.

Release justification: no real risk improves test coverage
Release note: None

merge back
a<pkg>: <short description - lowercase, no final period>

<what was there before: Previously, ...>
<why it needed to change: This was inadequate because ...>
<what you did about it: To address this, this patch ...>
… state

Previously, the schema changer workload in a mixed version state
attempted to use trigram indexes against 22.1, which is unsupported.
This patch adds code to detect a mixed version state and expects
the appropriate error when this occurs.

Release justification: no risk improves test coverage
Release note: None
Previously, if we ran in a mixed version state with the schema changer
workload we could run into an optimizer bug (cockroachdb#80820). To address this,
this patch in a mixed version workload disables the insert portion of
the workload.

Release justification: improves test coverage by enabling the mixed
version test
Release note: None
@fqazi
Copy link
Collaborator Author

fqazi commented Sep 21, 2022

@renatolabs Thanks. Missed that change, I'll confirm that CI is happy then bors this again.

@fqazi
Copy link
Collaborator Author

fqazi commented Sep 21, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 21, 2022

Build succeeded:

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.

roachtest: schemaChangeStep is skipped in acceptance/version-upgrade
5 participants