Skip to content

Conversation

@rdblue
Copy link
Contributor

@rdblue rdblue commented Jul 7, 2019

This adds a UUID to table metadata that is randomly generated when new table metadata is created. Existing tables without a UUID will assign a UUID on a successful snapshot commit.

taskOps.commit(base, updated);
// if the table UUID is missing, add it here. the UUID will be re-created each time this operation retries
// to ensure that if a concurrent operation assigns the UUID, this operation will not fail.
taskOps.commit(base, updated.withUUID());
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to make sure I understand: table UUID isn't supposed to change once assigned and cannot be set back to null, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. This identifies a table so you can't start an operation, drop and recreate the table, and then complete the operation. We had it happen once.

Copy link
Contributor

@aokolnychyi aokolnychyi left a comment

Choose a reason for hiding this comment

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

LGTM

@rdblue
Copy link
Contributor Author

rdblue commented Jul 9, 2019

Thanks for reviewing this, @aokolnychyi! I'm going to merge it.

@rdblue rdblue merged commit 13002b5 into apache:master Jul 9, 2019
Fokko added a commit that referenced this pull request Aug 22, 2023
* Python: Support add column

* Add integration tests (#264)

* Python: Support add column

* Add the requirement (#265)

* Python: Support add column

---------

Co-authored-by: Fokko Driesprong <[email protected]>
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.

2 participants