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: populate protected_timestamps in SpanConfig #74803

Merged
merged 1 commit into from
Jan 26, 2022

Commits on Jan 25, 2022

  1. spanconfigsqltranslator: populate protected_timestamps in SpanConfig

    This change teaches the SQLTranslator to hydrate the SpanConfigs
    for a table with protected timestamps that apply to that table.
    
    Concretely, this change initializes a spanconfig.ProtectedTimestampStateReader
    in the txn in which the translation is taking place, thereby
    providing a transactional view of the system.protected_ts_records
    table. After generating the span configurations based on the zone
    configurations that apply to the table, we hydrate the newly
    introduced protected_timestamps field on each span configuration
    with all the protected timestamps that apply to this table. This
    includes protected timestamp records that directly target this
    table, as well as records targetting the table's parent database.
    This information is obtained from the ProtectedTimestampStateReader
    mentioned above.
    
    Additionally, this change modifies StartTenant to allow secondary
    tenants to interact with the protected timestamp subsystem using a
    "real" protectedts.Provider provided the migration
    EnableProtectedTimestampsForTenant has run.
    
    For testing purposes, this change teaches the data driven framework
    of two additional commands protect and release.
    
    Informs: cockroachdb#73727
    
    Release note: None
    adityamaru committed Jan 25, 2022
    Configuration menu
    Copy the full SHA
    7c63710 View commit details
    Browse the repository at this point in the history