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

Remove deprecated ObjectLibrary::Register() (and Regex public API) #9439

Closed
wants to merge 3 commits into from

Conversation

pdillinger
Copy link
Contributor

@pdillinger pdillinger commented Jan 26, 2022

Summary: Regexes are considered potentially problematic for use in
registering RocksDB extensions, so we are removing
ObjectLibrary::Register() and the Regex public API it depended on (now
unused).

In reference to #9389

Why?

  • The power of Regexes can make it hard to reason about which extension
    will match what. (The replacement API isn't perfect, but we are at least
    "holding the line" on patterns we have seen in practice.)
  • It is easy to make regexes that don't quite mean what you think they
    mean, such as forgetting that the . in foo.bar can match any character
    or that matching is nondeterministic, as in a:b:42 matching .*:[0-9]+.
  • Some regexes and implementations can have disastrously bad
    performance. This might not be much practical concern for ObjectLibray
    here, but we don't want to encourage potentially dangerous further use
    in production code. (Testing code is fine. See TestRegex.)

Test Plan: CI

Summary: Regexes are considered potentially problematic for use in
registering RocksDB extensions, so we are removing
ObjectLibrary::Register() and the Regex public API it depended on (now
unused).

Why?
* The power of Regexes can make it hard to reason about which extension
will match what. (The replacement API isn't perfect, but we are at least
"holding the line" on patterns we have seen in practice.)
* It is easy to make regexes that don't quite mean what you think they
mean, such as forgetting that the . in "foo.bar" can match any character
or that matching is nondeterministic, as in "a:b:42" matching ".*:[0-9]+".
* Some regexes and implementations can have disastrously bad
performance. This might not be much practical concern for ObjectLibray
here, but we don't want to encourage potentially dangerous further use
in production code. (Testing code is fine. See TestRegex.)

Test Plan: CI
Copy link
Contributor

@mrambacher mrambacher left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

hx235 added a commit to hx235/rocksdb that referenced this pull request Jan 29, 2022
hx235 added a commit to hx235/rocksdb that referenced this pull request Jan 29, 2022
facebook-github-bot pushed a commit to facebook/mysql-5.6 that referenced this pull request Jan 31, 2022
Summary:
See facebook/rocksdb#9439

update-submodule: rocksdb

Reviewed By: yizhang82

Differential Revision: D33832993

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