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

cherrypick-1.1: cli: simplify and improve dump performance #19400

Merged
merged 2 commits into from Oct 20, 2017
Merged

cherrypick-1.1: cli: simplify and improve dump performance #19400

merged 2 commits into from Oct 20, 2017

Conversation

maddyblue
Copy link
Contributor

Cherrypick #18472 and #19325.

#18472 was initially not included in 1.1 because it was thought to only be a performance increase, and the release cycle was late enough that it wasn't worth the risk to include it. However #18500 showed that the 1.1 branch had a known bug, so now it may be important enough to include here.

We could have alternatively made a from-scratch change to just fix the bug in 1.1, but I think it's better to cherrypick a more thought out and tested solution instead.

Our other option is to not accept the risk of the code changes here, and document the bug as a known limitation. However I think the change is safe enough to include, and comes with a hefty performance improvement to boot.

Fixes #18500

A significant percentage (near 50%) of CPU time during dump is spent
converting strings returned from the SELECT into SQL-safe strings and
writing that to the output. Much of this work can be done concurrently,
which improves the performance, and gets it close to that of piping
a `SELECT *` to a file. This is done using an errgroup and passing
various stages over channels.

We can also greatly simplify dump now since cockroach streams
results. There's no need anymore to page through the data.

See cockroachdb/docs#1674
Although this test is already passing, it is being added to master
so we don't regress and so it can be backported to 1.1, where it
is failing.

See #18500
@maddyblue maddyblue requested review from knz and a team October 20, 2017 08:40
@maddyblue maddyblue requested a review from a team as a code owner October 20, 2017 08:40
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@bdarnell
Copy link
Member

:lgtm:


Review status: 0 of 2 files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@maddyblue maddyblue merged commit 4558e72 into cockroachdb:release-1.1 Oct 20, 2017
@maddyblue maddyblue deleted the cherrypick-18472 branch October 20, 2017 20:38
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.

None yet

3 participants