Skip to content

rfcs: import rollbacks without mvcc timestamps#85338

Closed
msbutler wants to merge 1 commit intocockroachdb:masterfrom
msbutler:butler-rollbacks-rfc
Closed

rfcs: import rollbacks without mvcc timestamps#85338
msbutler wants to merge 1 commit intocockroachdb:masterfrom
msbutler:butler-rollbacks-rfc

Conversation

@msbutler
Copy link
Copy Markdown
Collaborator

@msbutler msbutler commented Jul 29, 2022

See compiled doc.

Currently if an IMPORT writing data into an existing, non-empty cluster fails
or is cancelled mid-IMPORT, to roll it back, any rows it had written are found
and deleted by scanning the table for rows with a timestamp greater than the
time at which the IMPORT started.

The reliance on MVCC timestamps during IMPORT rollbacks blocks 1)
implementing MVCC AddSSTable for restores of tenants; 2) restoring importing
tables. To unblock these important features, IMPORT rollbacks should no longer
rely on MVCC timestamps.

Release note: None

Currently if an IMPORT writing data into an existing, non-empty cluster fails
or is cancelled mid-IMPORT, to roll it back, any rows it had written are found
and deleted by scanning the table for rows with a timestamp greater than the
time at which the IMPORT started.

The reliance on MVCC timestamps during IMPORT rollbacks blocks
1) implementing MVCC AddSSTable for restores of tenants; 2) restoring importing
tables. To unblock these important features IMPORT rollbacks should no longer
rely on MVCC timestamps.

Release note: None
@msbutler msbutler requested review from dt and erikgrinaker July 29, 2022 19:00
@msbutler msbutler self-assigned this Jul 29, 2022
@msbutler msbutler requested a review from a team as a code owner July 29, 2022 19:00
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

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

I don't think this ends up being 100% accurate in terms of the actual implemented specifics (e.g. method/type names and such), but I also don't think it matters. It captures the gist of it.

import job ID that created the key-value. I.e.:
```` message ClientMeta {

int64 import_job_id = 2 [(gogoproto.customtype) = "JobID"];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
int64 import_job_id = 2 [(gogoproto.customtype) = "JobID"];
int64 import_job_id = 1 [(gogoproto.customtype) = "JobID"];

@msbutler
Copy link
Copy Markdown
Collaborator Author

msbutler commented Aug 9, 2022

closing as design might significantly change

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