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

spanconfigsqltranslator,jobsprotectedts: add ignore_if_excluded_from_backup to SpanConfig #76831

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

adityamaru
Copy link
Contributor

@adityamaru adityamaru commented Feb 20, 2022

This change is a follow up to #75451 which taught ExportRequests
to noop on ranges marked as exclude_data_from_backup. This change

This diff does two things:

  • It adds an ignore_if_excluded_from_backup bit to ptpb.Target that is set
    on PTS records written by backup schedules and jobs.

  • It adds an ignore_if_excluded_from_backup bit to the ProtectionPolicy that
    is shipped to KV as part of the SpanConfig.

In a follow up PR, this bit on the SpanConfig will be used in conjunction with
exclude_data_from_backup to decide whether or not to ignore the ProtectionPolicy
when making GC decisions on a span. All other consumers of PTS records will
default to setting this bit to false, and so their ProtectionPolicies will always
influence GC even if exclude_data_from_backup is set to true.

Informs: #73536

Release note: None

@adityamaru adityamaru requested review from dt and irfansharif February 20, 2022 20:57
@adityamaru adityamaru requested review from a team as code owners February 20, 2022 20:57
@adityamaru adityamaru requested review from stevendanna and removed request for a team February 20, 2022 20:57
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@adityamaru adityamaru requested review from a team and removed request for a team February 22, 2022 19:50
Copy link
Member

@dt dt left a comment

Choose a reason for hiding this comment

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

nice, I like this approach

@adityamaru adityamaru force-pushed the plumb-pts-backup branch 2 times, most recently from ba7a2d6 to e6208ed Compare February 23, 2022 23:28
…backup to SpanConfig

This change is a follow up to cockroachdb#75451 which taught ExportRequests
to noop on ranges marked as exclude_data_from_backup. This change

This diff does two things:

- It adds an `ignore_if_excluded_from_backup` bit to ptpb.Target that is set
on PTS records written by backup schedules and jobs.

- It adds an `ignore_if_excluded_from_backup` bit to the ProtectionPolicy that
is shipped to KV as part of the SpanConfig.

In a follow up PR, this bit on the SpanConfig will be used in conjunction with
`exclude_data_from_backup` to decide whether or not to ignore the ProtectionPolicy
when making GC decisions on a span. All other consumers of PTS records will
default to setting this bit to false, and so their ProtectionPolicies will always
influence GC even if `exclude_data_from_backup` is set to true.

Informs: cockroachdb#73536

Release note: None
@adityamaru
Copy link
Contributor Author

@irfansharif do you want to have a quick look at this? Most of the spanconfig changes are to how we print DD test output.

@adityamaru
Copy link
Contributor Author

TFTRs!

bors r=dt,irfansharif

@craig
Copy link
Contributor

craig bot commented Feb 25, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 25, 2022

Build succeeded:

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.

4 participants