Skip to content

schemachange/tenant: destroy tenant data with GC job#55756

Merged
craig[bot] merged 3 commits intocockroachdb:masterfrom
spaskob:tenant-job-deletion
Jan 16, 2021
Merged

schemachange/tenant: destroy tenant data with GC job#55756
craig[bot] merged 3 commits intocockroachdb:masterfrom
spaskob:tenant-job-deletion

Conversation

@spaskob
Copy link
Copy Markdown
Contributor

@spaskob spaskob commented Oct 20, 2020

Fixes #48775.

This PR adds tenant GC fields to schema change Details and
Progress protos and adds support for deleting tenant's data
via the schema change GC job.

Release note: none.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@spaskob spaskob requested a review from pbardea October 20, 2020 17:15
@spaskob spaskob marked this pull request as draft October 20, 2020 17:19
@spaskob spaskob requested a review from thoszhang October 20, 2020 17:20
@spaskob spaskob changed the title schemachange/tenants: add tenant to GC job (WIP)schemachange/tenants: add tenant to GC job Oct 20, 2020
@spaskob spaskob force-pushed the tenant-job-deletion branch 10 times, most recently from 7683851 to 58e5197 Compare October 22, 2020 13:25
@spaskob spaskob changed the title (WIP)schemachange/tenants: add tenant to GC job schemachange/tenants: add tenant to GC job Oct 22, 2020
@spaskob spaskob requested a review from dt October 22, 2020 13:50
@spaskob spaskob force-pushed the tenant-job-deletion branch from 58e5197 to f7935b6 Compare October 22, 2020 14:49
@spaskob spaskob marked this pull request as ready for review October 22, 2020 15:00
@spaskob spaskob requested a review from a team October 22, 2020 16:15
@spaskob spaskob force-pushed the tenant-job-deletion branch 2 times, most recently from 148fd06 to c9fdf9b Compare October 22, 2020 16:22
@spaskob spaskob changed the title schemachange/tenants: add tenant to GC job schemachange/tenants: destroy tenant data with GC job Oct 22, 2020
@spaskob spaskob changed the title schemachange/tenants: destroy tenant data with GC job schemachange/tenant: destroy tenant data with GC job Oct 22, 2020
Copy link
Copy Markdown
Contributor

@pbardea pbardea left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, 1 of 10 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt, @lucy-zhang, and @pbardea)

@spaskob spaskob force-pushed the tenant-job-deletion branch 4 times, most recently from c8e73a7 to b4bceb5 Compare October 24, 2020 04:38
spaskob pushed a commit to spaskob/cockroach that referenced this pull request Oct 28, 2020
Informs cockroachdb#47904.

This is a stop gap solution that will perform the operation
synchronously inside the transaction that marks the tenant row
as DROP and finally deletes the row.

This PR is intended to be backported to 20.2 release branch.
The long-term solution that implements cockroachdb#48775 is done in cockroachdb#55756
and will be our long term approach for release 21.0 and beyond.

Release note: none.
spaskob pushed a commit to spaskob/cockroach that referenced this pull request Oct 29, 2020
Informs cockroachdb#47904.

This is a stop gap solution that will perform the operation
synchronously inside the transaction that marks the tenant row
as DROP and finally deletes the row.

This PR is intended to be backported to 20.2 release branch.
The long-term solution that implements cockroachdb#48775 is done in cockroachdb#55756
and will be our long term approach for release 21.0 and beyond.

Release note: none.
craig bot pushed a commit that referenced this pull request Oct 29, 2020
55935: sql/tenant: synch clear range data on tenant drop request r=spaskob a=spaskob

Informs #47904.

This is a stop gap solution that will perform the operation
synchronously inside the transaction that marks the tenant row
as DROP and finally deletes the row.

This PR is intended to be backported to 20.2 release branch.
The long-term solution that implements #48775 is done in #55756
and will be our long term approach for release 21.0 and beyond.

Release note: none.

Co-authored-by: Spas Bojanov <spas@cockroachlabs.com>
@spaskob spaskob force-pushed the tenant-job-deletion branch from 0efe933 to a5576c4 Compare October 29, 2020 17:58
spaskob pushed a commit to spaskob/cockroach that referenced this pull request Oct 29, 2020
Informs cockroachdb#47904.

This is a stop gap solution that will perform the operation
synchronously inside the transaction that marks the tenant row
as DROP and finally deletes the row.

This PR is intended to be backported to 20.2 release branch.
The long-term solution that implements cockroachdb#48775 is done in cockroachdb#55756
and will be our long term approach for release 21.0 and beyond.

Release note: none.
Copy link
Copy Markdown

@thoszhang thoszhang left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, 7 of 9 files at r4, 2 of 4 files at r5, 5 of 5 files at r6.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt)

spaskob pushed a commit to spaskob/cockroach that referenced this pull request Nov 6, 2020
Informs cockroachdb#47904.

This is a stop gap solution that will perform the operation
synchronously inside the transaction that marks the tenant row
as DROP and finally deletes the row.

This PR is intended to be backported to 20.2 release branch.
The long-term solution that implements cockroachdb#48775 is done in cockroachdb#55756
and will be our long term approach for release 21.0 and beyond.

Release note: none.
spaskob pushed a commit to spaskob/cockroach that referenced this pull request Nov 9, 2020
Informs cockroachdb#47904.

This is a stop gap solution that will perform the operation
synchronously inside the transaction that marks the tenant row
as DROP and finally deletes the row.

This PR is intended to be backported to 20.2 release branch.
The long-term solution that implements cockroachdb#48775 is done in cockroachdb#55756
and will be our long term approach for release 21.0 and beyond.

Release note: none.
@spaskob spaskob force-pushed the tenant-job-deletion branch 5 times, most recently from 073f2e3 to dcab263 Compare January 11, 2021 23:28
Spas Bojanov added 3 commits January 15, 2021 13:17
Informs cockroachdb#48775.

This PR:
 - adds `DeleteTenantRecord` to remove a tenant record from the tenants
table.
 - makes `GetTenantRecord` public.

Release note: none.
Informs cockroachdb#48775.

This PR adds tenant GC fields to schema change Details and
Progress protos and adds support for deleting tenant's data
via the schema change GC job.

Release note: none.
This commit creates a GC tenant job in the end of the destroy tenant
operation.

Release note: none.
@spaskob spaskob force-pushed the tenant-job-deletion branch from dcab263 to 161b3fb Compare January 15, 2021 21:13
@spaskob
Copy link
Copy Markdown
Contributor Author

spaskob commented Jan 16, 2021

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 16, 2021

Build succeeded:

@craig craig bot merged commit fb03099 into cockroachdb:master Jan 16, 2021
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.

jobs: destroy tenant keyspaces asynchronously

4 participants