-
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
backupccl: elide expensive ShowCreate call in SHOW BACKUP #88293
Conversation
b911eec
to
629d38e
Compare
SHOW BACKUP
bottleneck629d38e
to
7fe1a9b
Compare
This looks promising. |
In cockroachdb#88376 we see this call taking ~all the time on a cluster with 2.5K empty tables. In all cases except `SHOW BACKUP SCHEMAS` we do not need to construct the SQL representation of the table's schema. This results in a marked improvement in the performance of `SHOW BACKUP` as can be seen in cockroachdb#88376 (comment). Fixes: cockroachdb#88376 Release note (performance improvement): `SHOW BACKUP` on a backup containing several table descriptors is now more performant
7fe1a9b
to
cc68174
Compare
TFTR! bors r=stevendanna |
Build succeeded: |
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 cc68174 to blathers/backport-release-21.2-88293: 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.x failed. See errors above. error creating merge commit from cc68174 to blathers/backport-release-22.1-88293: 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 22.1.x failed. See errors above. error creating merge commit from cc68174 to blathers/backport-release-22.2-88293: 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 22.2.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Did we really want to merge all these |
@postamar On the DR team we're consciously sprinkling these childspans in every method / sub-operation invoked during a job so that it surfaces more information when grabbing a job trace. In particular, we aggregate the time we spend in each childspan so that when a customer comes to us with a support escalation saying "why is my restore/backup slow?" we have a pretty good first step to narrow down on the cause of the slowdown. As #88376 traces can be quite useful in expediently finding the expensive call. Andrei and obs-inf have done a lot of work to make childspans very cheap to use. Do you have any concerns about this general direction we're headed in that I am missing? |
Thanks for this explanation! I was assuming that they were left in by mistake. I'm surprised you can't use reflection to auto-generate the span name, wouldn't that be preferable? |
Backport 1/1 commits from cockroachdb#88293. /cc @cockroachdb/release In cockroachdb#88376 we see the call to ShowCreate taking ~all the time on a cluster with 2.5K empty tables. In all cases except SHOW BACKUP SCHEMAS we do not need to construct the SQL representation of the table's schema. This results in a marked improvement in the performance of SHOW BACKUP as can be seen in cockroachdb#88376 (comment). Fixes: cockroachdb#88376 Release note (performance improvement): SHOW BACKUP on a backup containing several table descriptors is now more performant Release justification: low risk performance improvement required for the use of schedules in CockroachCloud
In #88376 we see the call to
ShowCreate
taking ~all the time on a cluster with2.5K empty tables. In all cases except
SHOW BACKUP SCHEMAS
we do notneed to construct the SQL representation of the table's schema. This
results in a marked improvement in the performance of
SHOW BACKUP
as can be seen in #88376 (comment).
Fixes: #88376
Release note (performance improvement):
SHOW BACKUP
on a backup containingseveral table descriptors is now more performant