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

db_stress sometimes generates keys close to SST file boundaries #6037

Closed
wants to merge 3 commits into from

Conversation

siying
Copy link
Contributor

@siying siying commented Nov 14, 2019

Summary: Recently, a bug was found related to a seek key that is close to SST file boundary. However, it only occurs in a very small chance in db_stress, because the chance that a random key hits SST file boundaries is small. To boost the chance, with 1/16 chance, we pick keys that are close to SST file boundaries.

Test Plan: Did some manual printing out, and hack to cover the key generation logic to be correct.

Summary: Recently, a bug was found related to a seek key that is close to SST file boundary. However, it only occurs in a very small chance in db_stress, because the chance that a random key hits SST file boundaries is small. To boost the chance, with 1/16 chance, we pick keys that are close to SST file boundaries.

Test Plan: Did some manual printing out, and hack to cover the key generation logic to be correct.
@maysamyabandeh
Copy link
Contributor

tools/db_stress_tool.cc:2425:9: error: ‘class rocksdb::DB’ has no member named ‘GetColumnFamilyMetaData’
     db->GetColumnFamilyMetaData(cfh, &cfmd);

@siying
Copy link
Contributor Author

siying commented Nov 19, 2019

@maysamyabandeh can you take another look? It shows that AppVeyor fails, but when I clicked into it it didn't show any failure. It passed the compilation phase, which is all is needed for this PR, because we don't run stress test in those tests.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@siying is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 4e0dcd3.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 4e0dcd3.

wolfkdy pushed a commit to wolfkdy/rocksdb that referenced this pull request Dec 22, 2019
…book#6037)

Summary:
Recently, a bug was found related to a seek key that is close to SST file boundary. However, it only occurs in a very small chance in db_stress, because the chance that a random key hits SST file boundaries is small. To boost the chance, with 1/16 chance, we pick keys that are close to SST file boundaries.
Pull Request resolved: facebook#6037

Test Plan: Did some manual printing out, and hack to cover the key generation logic to be correct.

Differential Revision: D18598476

fbshipit-source-id: 13b76687d106c5be4e3e02a0c77fa5578105a071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants