-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
sql: use clear range to clean tables during rollback of create #79543
Conversation
Fixes: cockroachdb#79123 Previously, when dropping a table during rollback of a create we would clean up table data in chunks instead of doing a clear range. This was inadequate because he code path in question existed for compatibility Cockroach 1.1 and had terrible performance characteristics for large tables. To address, this patch will always use delete data using clear range when dropping tables during rollback which will have better performance. Release note (performance improvement): Rollback of CREATE TABLE AS with large quantities of data has similar performance to regular DROP TABLE.
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 3 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @fqazi)
@ajwerner TFTR! |
bors r+ |
Build succeeded: |
blathers backport 22.1 21.2 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 742d6fe to blathers/backport-release-21.2-79543: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 21.2 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Fixes: #79123
Previously, when dropping a table during rollback of a create
we would clean up table data in chunks instead of doing a
clear range. This was inadequate because he code path in
question existed for compatibility Cockroach 1.1 and had terrible
performance characteristics for large tables. To address,
this patch will always use delete data using clear range when
dropping tables during rollback which will have better performance.
Release note (performance improvement): Rollback of CREATE
TABLE AS with large quantities of data has similar performance
to regular DROP TABLE.