forked from facebook/rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Avoid deadlock between mutex_ and log_write_mutex_ (#5437) #35
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: To avoid deadlock mutex_ should never be acquired before log_write_mutex_. The patch documents that and also fixes one case in ::FlushWAL that acquires mutex_ through ::WriteStatusCheck when it already holds lock on log_write_mutex_. Pull Request resolved: facebook#5437 Differential Revision: D15749722 Pulled By: maysamyabandeh fbshipit-source-id: f57b69c44b4b80cc6d7ddf3d3fdf4a9eb5a5a45a
petermattis
approved these changes
Jun 14, 2019
ajkr
added a commit
to ajkr/cockroach
that referenced
this pull request
Jun 23, 2019
Includes the following changes, all of which have landed upstream. - cockroachdb/rocksdb#32: "Fix merging range tombstone covering put during flush/compaction" - cockroachdb/rocksdb#33: "Dynamic test whether sync_file_range returns ENOSYS" - cockroachdb/rocksdb#34: "Potential fix for stress test failure due to "SST file ahead of WAL" error" - cockroachdb/rocksdb#35: "Avoid deadlock between mutex_ and log_write_mutex_" Fixes cockroachdb#37752. Release note (bug fix): Fixed possible deadlock when storage engine write fails. Release note (bug fix): Fixed potential reappearance of deleted timeseries data, which could trip consistency checker. Release note (bug fix): Removed dependency on `sync_file_range` on Linux platforms on which it returns `ENOSYS`, such as WSL (Windows Subsystem for Linux).
craig bot
pushed a commit
to cockroachdb/cockroach
that referenced
this pull request
Jun 23, 2019
38170: c-deps: bump rocksdb for multiple backported PRs r=ajkr a=ajkr Includes the following changes, all of which have landed upstream. - cockroachdb/rocksdb#32: "Fix merging range tombstone covering put during flush/compaction" - cockroachdb/rocksdb#33: "Dynamic test whether sync_file_range returns ENOSYS" - cockroachdb/rocksdb#34: "Potential fix for stress test failure due to "SST file ahead of WAL" error" - cockroachdb/rocksdb#35: "Avoid deadlock between mutex_ and log_write_mutex_" Fixes #37752. Release note (bug fix): Fixed possible deadlock when storage engine write fails. Release note (bug fix): Fixed potential reappearance of deleted timeseries data, which could trip consistency checker. Release note (bug fix): Removed dependency on `sync_file_range` on Linux platforms on which it returns `ENOSYS`, such as WSL (Windows Subsystem for Linux). Co-authored-by: Andrew Kryczka <andrew.kryczka2@gmail.com>
ajkr
added a commit
to ajkr/cockroach
that referenced
this pull request
Jun 26, 2019
Includes the following changes, all of which have landed upstream. - cockroachdb/rocksdb#32: "Fix merging range tombstone covering put during flush/compaction" - cockroachdb/rocksdb#33: "Dynamic test whether sync_file_range returns ENOSYS" - cockroachdb/rocksdb#34: "Potential fix for stress test failure due to "SST file ahead of WAL" error" - cockroachdb/rocksdb#35: "Avoid deadlock between mutex_ and log_write_mutex_" Fixes cockroachdb#37752. Release note (bug fix): Fixed possible deadlock when storage engine write fails. Release note (bug fix): Fixed potential reappearance of deleted timeseries data, which could trip consistency checker. Release note (bug fix): Removed dependency on `sync_file_range` on Linux platforms on which it returns `ENOSYS`, such as WSL (Windows Subsystem for Linux).
ajkr
added a commit
to ajkr/cockroach
that referenced
this pull request
Jun 26, 2019
Includes clean backports of the following changes, which have landed upstream. - cockroachdb/rocksdb#32: "Fix merging range tombstone covering put during flush/compaction" - cockroachdb/rocksdb#35: "Avoid deadlock between mutex_ and log_write_mutex_" Includes an unclean backport of the below change, which has landed upstream. This unclean backport _has not been reviewed_. - cockroachdb/rocksdb#33: "Dynamic test whether sync_file_range returns ENOSYS" (cockroachdb/rocksdb@630e08e) Release note (bug fix): Fixed possible deadlock when storage engine write fails. Release note (bug fix): Fixed potential reappearance of deleted timeseries data, which could trip consistency checker. Release note (bug fix): Removed dependency on sync_file_range on Linux platforms on which it returns ENOSYS, such as WSL (Windows Subsystem for Linux).
craig bot
pushed a commit
to cockroachdb/cockroach
that referenced
this pull request
Jun 27, 2019
38478: release 19.1: c-deps: bump rocksdb for multiple backported PRs r=ajkr a=ajkr Includes clean backports of the following changes, which have landed upstream. - cockroachdb/rocksdb#32: "Fix merging range tombstone covering put during flush/compaction" - cockroachdb/rocksdb#35: "Avoid deadlock between mutex_ and log_write_mutex_" Includes an unclean backport of the below change, which has landed upstream. This unclean backport _has not been reviewed_. - cockroachdb/rocksdb#33: "Dynamic test whether sync_file_range returns ENOSYS" (backport commit: cockroachdb/rocksdb@630e08e) Release note (bug fix): Fixed possible deadlock when storage engine write fails. Release note (bug fix): Fixed potential reappearance of deleted timeseries data, which could trip consistency checker. Release note (bug fix): Removed dependency on sync_file_range on Linux platforms on which it returns ENOSYS, such as WSL (Windows Subsystem for Linux). Co-authored-by: Andrew Kryczka <andrew.kryczka2@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
To avoid deadlock mutex_ should never be acquired before log_write_mutex_. The patch documents that and also fixes one case in ::FlushWAL that acquires mutex_ through ::WriteStatusCheck when it already holds lock on log_write_mutex_.
Pull Request resolved: facebook#5437
Differential Revision: D15749722
Pulled By: maysamyabandeh
fbshipit-source-id: f57b69c44b4b80cc6d7ddf3d3fdf4a9eb5a5a45a
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)