8000 sql/schemachanger: gcjob can delete the descriptors to early · Issue #148446 · cockroachdb/cockroach · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
sql/schemachanger: gcjob can delete the descriptors to early #148446
Open
@fqazi

Description

@fqazi

When using the DelRange mode of the schema changer GC job, its possible for data to be deleted before the GC interval is hit. This happens because we wait for the prefix to be empty via KV before deleting the descriptor and zone config. This can be easily reproduced by:

SET CLUSTER SETTING. sql.gc_job.wait_for_gc.interval='3s'
CREATE DATABASE foo
ALTER DATABASE foo CONFIGURE ZONE USING gc.ttlseconds = 12345
CREATE TABLE foo.public.bar (x INT PRIMARY KEY)
DROP DATABASE foo CASCADE

Because the prefix is empty the descriptor for bar will be instantly deleted, which is not ideal.

Jira issue: CRDB-51625

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0