roachtest: add INSERT ... SELECT ... table copy test#23449
roachtest: add INSERT ... SELECT ... table copy test#23449nvb merged 2 commits intocockroachdb:masterfrom
Conversation
|
Review status: 0 of 1 files reviewed at latest revision, 4 unresolved discussions, some commit checks pending. pkg/cmd/roachtest/copy.go, line 43 at r1 (raw file):
Use the pkg/cmd/roachtest/copy.go, line 100 at r1 (raw file):
In light of the recent runaway split test, that would be nice. pkg/cmd/roachtest/copy.go, line 107 at r1 (raw file):
1E7 is a lot easier for me to make sense of. pkg/cmd/roachtest/copy.go, line 114 at r1 (raw file):
1E6 Comments from Reviewable |
|
Reviewed 1 of 1 files at r1. Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. pkg/cmd/roachtest/copy.go, line 43 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. pkg/cmd/roachtest/copy.go, line 100 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Any opinion on the best way to make this assertion? The way I have it now is that it estimates the lower and upper expected bounds for the number of ranges that should exist given the size of the payload and an estimate for the rest of the overhead for a single row. That seems a little fragile though. pkg/cmd/roachtest/copy.go, line 107 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. pkg/cmd/roachtest/copy.go, line 114 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. Comments from Reviewable |
|
I'm not seeing the edits you Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. pkg/cmd/roachtest/copy.go, line 100 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
I guess ideally you would aggregate the MVCCStats for the table and use that to compute the number of expected ranges. I think it's fine to give what you're doing a try first, though. Your estimate doesn't have to be very exact, we just want to make sure the range count isn't completely off the mark. Comments from Reviewable |
Closes cockroachdb#15713. This change adds a test that first imports a fully-populated Bank table. It then creates a second empty Bank schema. Finally, it performs a series of paginated `INSERT ... SELECT ...` statements to copy all data from the first table into the second table. This stresses both large transactions and the ability for range splits to keep up with a large amount of data movement. Release note: None
This change adds a `Progress` method to `roachtest.test` which records the progress of the current operation. The progress is reset on the next call to `Status`. Release note: None
1b28658 to
69b6f40
Compare
|
Just pushed the update. PTAL. Review status: 0 of 2 files reviewed at latest revision, 1 unresolved discussion. pkg/cmd/roachtest/copy.go, line 100 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Yeah, you're right that it doesn't need to be exact. Done. Comments from Reviewable |
|
Reviewed 1 of 1 files at r2. pkg/cmd/roachtest/copy.go, line 103 at r2 (raw file):
That range is approximately [40,80] for these parameters, right? Seems reasonable. Comments from Reviewable |
|
Review status: 0 of 2 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/cmd/roachtest/copy.go, line 103 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Yeah, and the test was consistently ending up with 56 ranges in the new table! Comments from Reviewable |
|
@nvanbenschoten, should we resolve or somehow alter this known limitation? https://www.cockroachlabs.com/docs/dev/known-limitations.html#write-and-update-limits-for-a-single-transaction |
|
@jseldess I don't think we can quite remove it, but it looks wanting an update. I think the current state is
@nvanbenschoten this test fails if you don't paginate, right? Ideally we just wouldn't ever send that large a batch down to Raft. It seems that the SQL layer could preclude that without too much trouble? |
I meant to run these paginated INSERTs both inside and outside of a transaction. As you mentioned, the former should also work now. I'll make that change in a new PR.
If I don't paginate and I don't increase
As you mentioned, #23373 should get us most of the way here. I'll extend this test further once that change is in to see if it works without pagination. |
Follow up to cockroachdb#23449. This change adds a variant to the roachtest `copy` test that runs the paginated copy from one table to another inside of a transaction. The changes made in cockroachdb#21078 allow this to work even with millions of rows in the source table. Release note: None
Closes #15713.
This change adds a test that first imports a fully-populated Bank table. It
then creates a second empty Bank schema. Finally, it performs a series of
paginated
INSERT ... SELECT ...statements to copy all data from the firsttable into the second table. This stresses both large transactions and the
ability for range splits to keep up with a large amount of data movement.
Release note: None