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

storage: Fix CheckSSTConflicts stats calculations #98426

Merged
merged 1 commit into from
Mar 12, 2023

Conversation

itsbilal
Copy link
Member

Previously we were missing some cases of range key overlaps with other range keys, or were too eagerly stepping over engine keys that did not conflict with sstable keys, resulting in incorrect stats. This change adds more targeted test cases to TestEvalAddSSTable to test for those previously-unaccounted cases, and fixes them in CheckSSTConflicts.

Informs #94140 and #98408.
Fixes #94141.

Epic: none

Release note: None

@itsbilal itsbilal requested review from a team as code owners March 11, 2023 04:06
@itsbilal itsbilal self-assigned this Mar 11, 2023
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@itsbilal
Copy link
Member Author

I got a couple hundred runs of the updated KVNemesis running successfully after this change. I'll do a longer stress run on Monday to see if something is still missing.

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.

Nice, thanks. The logic here is too complex to eyeball, so I'll rely on kvnemesis to verify that it's correct.

Previously we were missing some cases of range key
overlaps with other range keys, or were too eagerly
stepping over engine keys that did not conflict with
sstable keys, resulting in incorrect stats. This change
adds more targeted test cases to TestEvalAddSSTable to
test for those previously-unaccounted cases, and fixes them
in CheckSSTConflicts.

Informs cockroachdb#94140 and cockroachdb#98408.
Fixes cockroachdb#94141.

Epic: none

Release note: None
@itsbilal itsbilal force-pushed the checksstconflicts-stats-fixes branch from 8e4775b to 7d00079 Compare March 12, 2023 01:04
@itsbilal
Copy link
Member Author

Had to do two more fixes before kvnemesis would go into the thousands of runs, and now it seems to chug along well. 🤞

@itsbilal
Copy link
Member Author

bors r=erikgrinaker

@craig
Copy link
Contributor

craig bot commented Mar 12, 2023

Build succeeded:

@craig craig bot merged commit 2f2e85d into cockroachdb:master Mar 12, 2023
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.

storage: CheckSSTConflicts computes incorrect stats for SST range keys
3 participants