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

Set CompactionIterator::valid_ to false when PrepareBlobOutput indicates error #6170

Closed
wants to merge 2 commits into from

Conversation

ltamasi
Copy link
Contributor

@ltamasi ltamasi commented Dec 13, 2019

Summary:
With #6121, errors returned by PrepareBlobValue
result in CompactionIterator::status_ being set to Corruption or IOError
as appropriate, however, valid_ is not set to false. The error is eventually propagated in
CompactionJob::ProcessKeyValueCompaction but only after the main loop completes.
Setting valid_ to false upon errors enables us to terminate the loop early and fail the
compaction sooner.

Test Plan:
Ran make check and used db_bench in BlobDB mode.

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.

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

@facebook-github-bot
Copy link
Contributor

@ltamasi has updated the pull request. Re-import the pull request

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.

@ltamasi 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 02aa229.

wolfkdy pushed a commit to wolfkdy/rocksdb that referenced this pull request Dec 22, 2019
…tes error

Summary:
With facebook#6121, errors returned by `PrepareBlobValue`
result in `CompactionIterator::status_` being set to `Corruption` or `IOError`
as appropriate, however, `valid_` is not set to `false`. The error is eventually propagated in
`CompactionJob::ProcessKeyValueCompaction` but only after the main loop completes.
Setting `valid_` to `false` upon errors enables us to terminate the loop early and fail the
compaction sooner.
Pull Request resolved: facebook#6170

Test Plan:
Ran `make check` and used `db_bench` in BlobDB mode.

fbshipit-source-id: a2ca88a3ca71115e2605bd34a4c795d8a28bef27
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.

None yet

3 participants