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

release-20.2: storage: report all encountered intents in sst export error #64931

Merged
merged 1 commit into from
May 12, 2021

Conversation

aliher1911
Copy link
Contributor

Backport 1/1 commits from #64131.

/cc @cockroachdb/release


Previously, pebbleExportToSst was stopping upon encountering first
intent.

This was causing backups to be very slow if lots of intents build up.
To be able to proceed with export, intent needs to be resolved and
export retried. The result of this behaviour is that export would run
as many times as there were intents in the table before succeeding.

To address this, all intents from the range are collected and reported
in WriteIntentError. They could be resolved efficiently as batch
similar to how GC operates.

Fixes #59704

Release note (bug fix): Backup no longer resolves intents one by one.
This eliminates running a high pri query to cleanup intents to unblock
backup in case of intent buildup.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@aliher1911 aliher1911 force-pushed the backport20.2-64131 branch 6 times, most recently from d918f4e to d0fadfe Compare May 12, 2021 16:07
@aliher1911 aliher1911 marked this pull request as ready for review May 12, 2021 16:09
@aliher1911 aliher1911 requested review from a team and adityamaru and removed request for a team and adityamaru May 12, 2021 16:09
@aliher1911 aliher1911 force-pushed the backport20.2-64131 branch from d0fadfe to 18e6479 Compare May 12, 2021 17:45
Previously, pebbleExportToSst was stopping upon encountering first
intent.

This was causing backups to be very slow if lots of intents build up.
To be able to proceed with export, intent needs to be resolved and
export retried. The result of this behaviour is that export would run
as many times as there were intents in the table before succeeding.

To address this, all intents from the range are collected and reported
in WriteIntentError. They could be resolved efficiently as batch
similar to how GC operates.

Release note (bug fix): Backup no longer resolves intents one by one.
This eliminates running a high pri query to cleanup intents to unblock
backup in case of intent buildup.
@aliher1911 aliher1911 force-pushed the backport20.2-64131 branch from 18e6479 to 7a5a92f Compare May 12, 2021 19:02
@aliher1911 aliher1911 requested a review from nvanbenschoten May 12, 2021 20:47
@aliher1911
Copy link
Contributor Author

This fix only applies to pebble, but not to rocksdb.
Tests were also changed to populate pebble with cluster configs as we do on master to avoid making unnecessary checks in runtime.

Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Reviewed 7 of 7 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @aliher1911)

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.

3 participants