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

Improve fault injection to MultiRead #8937

Closed
wants to merge 9 commits into from

Conversation

siying
Copy link
Contributor

@siying siying commented Sep 20, 2021

Summary:
Several improvements to MultiRead:

  1. Fix a bug in stress test which causes false positive when both MultiRead() return and individual read request have failure injected.
  2. Add two more types of fault that should be handled: empty read results and checksum mismatch
  3. Add a message indicating which type of fault is injected
  4. Increase the failure rate

Test Plan:

Summary:
Right now BlockBasedTable::RetrieveMultipleBlocks() override error from MaybeReadBlockAndLoadToCache() with checksum checking error. MaybeReadBlockAndLoadToCache() only inserts blocks to cache in this path, so error can happen when checksum mismatch or block cache full. It's not clear whether it is a problem if we swallow checksum mismatch error and recheck it. I think it is a better practice stop operation we see an error.

Test Plan: Run all existing tests.
Summary:
Several improvements to MultiRead:
1. Add two more types of fault that should be handled: empty read results and checksum mismatch
2. Add a message indicating which type of fault is injected
3. Increase the failure rate

Test Plan:
@siying
Copy link
Contributor Author

siying commented Sep 20, 2021

The problem is that, sometimes the stress test fails. Not sure it's the test issue or a bug.

@siying siying changed the title Stress multiget [WIP] Improve fault injection to MultiRead Sep 20, 2021
@siying siying changed the title [WIP] Improve fault injection to MultiRead Improve fault injection to MultiRead Sep 21, 2021
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@siying has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@siying has updated the pull request. You must reimport the pull request before landing.

@@ -497,6 +503,13 @@ class FaultInjectionTestFS : public FileSystemWrapper {
// saved callstack
void PrintFaultBacktrace();

void AddThreadLocalMessage(const std::string& m) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not being called from anywhere. Dead code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I can remove it. I used it for adding manual code in all the places to debug...

@facebook-github-bot
Copy link
Contributor

@siying has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@siying has imported 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 9320067.

yoori pushed a commit to yoori/rocksdb that referenced this pull request Nov 26, 2023
Summary:
Several improvements to MultiRead:
1. Fix a bug in stress test which causes false positive when both MultiRead() return and individual read request have failure injected.
2. Add two more types of fault that should be handled: empty read results and checksum mismatch
3. Add a message indicating which type of fault is injected
4. Increase the failure rate

Pull Request resolved: facebook/rocksdb#8937

Reviewed By: anand1976

Differential Revision: D31085930

fbshipit-source-id: 3a04994a3cadebf9a64d25e1fe12b14b7a272fba
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