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

kvserver: Fix missing increment in SSTSnapshotStorage refcount #84367

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

itsbilal
Copy link
Contributor

Previously, in rare cases where we had two SSTSnapshotStorageScratch
for a given range, we'd have not incremented the refcount for the
second scratch creation, leading to an inconsistent refcount
panic down the line. This change fixes it and adds a test to
exercise the concurrent case.

Bug popped up in #84100.

Release note: None.

Previously, in rare cases where we had two SSTSnapshotStorageScratch
for a given range, we'd have not incremented the refcount for the
second scratch creation, leading to an inconsistent refcount
panic down the line. This change fixes it and adds a test to
exercise the concurrent case.

Bug popped up in cockroachdb#84100.

Release note: None.
@itsbilal itsbilal requested a review from sumeerbhola July 13, 2022 17:22
@itsbilal itsbilal requested a review from a team as a code owner July 13, 2022 17:22
@itsbilal itsbilal self-assigned this Jul 13, 2022
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
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.

My bad, sorry for missing this in my initial review -- thanks for catching it @sumeerbhola!

@itsbilal
Copy link
Contributor Author

TFTR!

bors r=erikgrinaker

@craig
Copy link
Contributor

craig bot commented Jul 13, 2022

Build succeeded:

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