Skip to content

Remove write queue synchronization from WriteOptionsFile - #11951

Closed
pdillinger wants to merge 1 commit into
meta:mainfrom
pdillinger:write_options_file_no_write_thread
Closed

pdillinger wants to merge 1 commit into
meta:mainfrom
pdillinger:write_options_file_no_write_thread

Conversation

@pdillinger

@pdillinger pdillinger commented Oct 12, 2023 •

Copy link
Copy Markdown
Contributor

Summary: This has become obsolete with the new options_mutex_ in #11929

  • Remove now-unnecessary parameter from WriteOptionsFile
  • Rename (and negate) other parameter for better clarity (the caller shouldn't tell the callee what the callee needs, just what the caller knows, provides, and requests)
  • Move a ROCKS_LOG_WARN (I/O) in WriteOptionsFile to outside of holding DB mutex.
  • Also avoid (but not always eliminate) write queue synchronization in SetDBOptions. Still needed if there was a change to WAL size limit or other configuration.
  • Improve some comments

Test Plan: existing unit tests and TSAN crash test local run

Summary: This has become obsolete with the new `options_mutex_` in

* Remove now-unnecessary parameter from WriteOptionsFile
* Rename (and negate) other parameter for better clarity (the caller
shouldn't tell the callee what the callee needs, just what the caller
knows, provides, and requests)
* Move a ROCKS_LOG_WARN (I/O) in WriteOptionsFile to outside of
holding DB mutex.
* Also *avoid* (but not always eliminate) write queue synchronization
in SetDBOptions. Still needed if there was a change to WAL size limit
or other configuration.
* Improve some comments

Test Plan: unit tests, and TSAN crash test local run
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@ajkr ajkr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@pdillinger merged this pull request in 2fd850c.

Tim-Reed pushed a commit to Tim-Reed/rocksdb that referenced this pull request Oct 1, 2026
Summary:
This has become obsolete with the new `options_mutex_` in meta#11929

* Remove now-unnecessary parameter from WriteOptionsFile
* Rename (and negate) other parameter for better clarity (the caller shouldn't tell the callee what the callee needs, just what the caller knows, provides, and requests)
* Move a ROCKS_LOG_WARN (I/O) in WriteOptionsFile to outside of holding DB mutex.
* Also *avoid* (but not always eliminate) write queue synchronization in SetDBOptions. Still needed if there was a change to WAL size limit or other configuration.
* Improve some comments

Pull Request resolved: meta#11951

Test Plan: existing unit tests and TSAN crash test local run

Reviewed By: ajkr

Differential Revision: D50247904

Pulled By: pdillinger

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