-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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/schemachange: "fix" workload #59635
workload/schemachange: "fix" workload #59635
Conversation
ceeb249
to
0566f92
Compare
93f3b50
to
f2a2fb6
Compare
I spun this up under stress on 256 cores: |
f2a2fb6
to
44fb031
Compare
@fqazi I have a feeling this may interest you. Might be worth stepping back and reading the code for this thing. It's powerful and finds bugs but could surely be more usable and extensible. |
44fb031
to
3a5ec65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 9 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @arulajmani and @postamar)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 7 of 9 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @postamar)
pkg/workload/schemachange/operation_generator.go, line 207 at r1 (raw file):
setColumnNotNull: 1, setColumnType: 1, insertRow: 0,
Disallowing inserts will inhibit our ability to test ALTER TYPE ... DROP VALUE
right? Ideally we'd want to seed tables that use user defined types with some data.
Is the complication here mostly around computed columns overflowing (like you mention in a comment somewhere below)? If so, would it make sense to block inserts if the table contains computed columns further down instead? I'm not sure if this is even feasible, as I couldn't find with what probability we generate computed columns, and maybe thats crippling in itself.
pkg/workload/schemachange/operation_generator.go, line 796 at r1 (raw file):
// Filter out the generated virtual columns. // TODO(ajwerner): Remove this after #61768 is fixed.
Looks like the issue linked is closed, so you could get rid of this thing.
pkg/workload/schemachange/operation_generator.go, line 1733 at r1 (raw file):
rows := [][]string{} for _, col := range cols { if col.generated {
nit: you could get rid of this as this is always false here.
Before this we would end up swallowing errors needed by the higher layers like transaction restarts. Release note: None
…luster Release note: None
Release note: None
We used to expect `DROP TABLE ... RESTRICT` to fail when the table was involved in an FK relation. It's fine. Release note: None
We don't allow dropping it in this case. Release note: None
… added Release note: None
…ists Release note: None
Before this commit we'd only look at the previous operation, not all previous operations. This became a problem when validation was added. Release note: None
Transaction restart errors must be rolled all the way back. Not doing that means the workload totally fails. Also, we want to treat uncategorized errors in generation as a real problem. Release note: None
Could cause an error which was previously being swallowed. Release note: None
Release note: None
…a name Release note: None
Release note: None
Release note: None
Fixed by cockroachdb#59565. Release justification: Testing only. Release note: None
Release note: None
We currently return an error indicating that this is unsupported. Release justification: non-production code changes Release note: None
Release note: None
Release note: None
These all should be re-enabled but they current have problems. Release note: None
3a5ec65
to
4f62dba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFTR!
bors r=arulajmani
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @arulajmani, @fqazi, and @postamar)
pkg/workload/schemachange/operation_generator.go, line 207 at r1 (raw file):
Previously, arulajmani (Arul Ajmani) wrote…
Disallowing inserts will inhibit our ability to test
ALTER TYPE ... DROP VALUE
right? Ideally we'd want to seed tables that use user defined types with some data.Is the complication here mostly around computed columns overflowing (like you mention in a comment somewhere below)? If so, would it make sense to block inserts if the table contains computed columns further down instead? I'm not sure if this is even feasible, as I couldn't find with what probability we generate computed columns, and maybe thats crippling in itself.
We'll need to fix this. IIRC there were a few different issues. I wanted to stabilize this test before going back to features as this PR wasn't tiny as it is. The computed column overflow was the first one I was hitting.
Insert row also has the problem that there are combinations of schema changes which can fail permanently, generally involving drop column. I think we'll need to add a rule that says that we don't do drop column in a transaction that has schema changes which might fail. D
pkg/workload/schemachange/operation_generator.go, line 796 at r1 (raw file):
Previously, arulajmani (Arul Ajmani) wrote…
Looks like the issue linked is closed, so you could get rid of this thing.
Done.
pkg/workload/schemachange/operation_generator.go, line 1733 at r1 (raw file):
Previously, arulajmani (Arul Ajmani) wrote…
nit: you could get rid of this as this is always false here.
Done.
Build succeeded: |
This is a variety of commits which fixes bugs in the schemachange workload. It also disables a number of features.