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

release-20.2: filetable: fix race in userfile table creation #62547

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

pbardea
Copy link
Contributor

@pbardea pbardea commented Mar 24, 2021

Backport 1/1 commits from #62461.

/cc @cockroachdb/release


Previously, userfile would create the userfile table in a separate
transaction from the one that checked to see if it existed. This lead to
a potential race between concurrent userfile uploads where one upload
would first see that the table does not yet exist, but by the time it
went to create the table another thread had already created it.

This lead to some file writes erroring with a relation already exists
error.

Fixes #61816.

Release note (bug fix): Writing files to userfile would sometimes
results in an error claiming that the userfile table already exists.
This is now fixed.

Previously, userfile would create the userfile table in a separate
transaction from the one that checked to see if it existed. This lead to
a potential race between concurrent userfile uploads where one upload
would first see that the table does not yet exist, but by the time it
went to create the table another thread had already created it.

This lead to some file writes erroring with a relation already exists
error.

Release note (bug fix): Writing files to userfile would sometimes
results in an error claiming that the userfile table already exists.
This is now fixed.
@pbardea pbardea requested review from adityamaru and a team March 24, 2021 18:20
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@pbardea pbardea merged commit b48f884 into cockroachdb:release-20.2 Mar 25, 2021
@pbardea pbardea deleted the backport20.2-62461 branch March 25, 2021 13:16
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.

None yet

3 participants