diff options
author | Changyu Bi <changyubi@meta.com> | 2024-07-19 19:12:45 -0700 |
---|---|---|
committer | Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> | 2024-07-19 19:12:45 -0700 |
commit | c064ac3bc556fc6b7b8e8bfdf8f4a7f2a44cf414 (patch) | |
tree | 22af2ba915fd1020d93094bbb1a93212edf1cff6 /unreleased_history | |
parent | 4384dd5eeec033926c02d57b4bc3996f388927d1 (diff) |
Avoid opening table files and reading table properties under mutex (#12879)
Summary:
InitInputTableProperties() can open and do IOs and is called under mutex_. This PR removes it from FinalizeInputInfo(). It is now called in CompactionJob::Run() and BuildCompactionJobInfo() (called in NotifyOnCompactionBegin()) without holding mutex_.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/12879
Test Plan: existing unit tests. Added assert in GetInputTableProperties() to ensure that input_table_properties_ is initialized whenever it's called.
Reviewed By: hx235
Differential Revision: D59933195
Pulled By: cbi42
fbshipit-source-id: c8089e13af8567fa3ab4b94d9ec384ae98ab2ec8
Diffstat (limited to 'unreleased_history')
-rw-r--r-- | unreleased_history/performance_improvements/compaction-io-mutex.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/unreleased_history/performance_improvements/compaction-io-mutex.md b/unreleased_history/performance_improvements/compaction-io-mutex.md new file mode 100644 index 000000000..42c2952ec --- /dev/null +++ b/unreleased_history/performance_improvements/compaction-io-mutex.md @@ -0,0 +1 @@ +* Fix an issue where compactions were opening table files and reading table properties while holding db mutex_.
\ No newline at end of file |