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

statistics.cc: fix mistype #11509

Closed
wants to merge 4 commits into from
Closed

statistics.cc: fix mistype #11509

wants to merge 4 commits into from

Conversation

loskutov
Copy link
Contributor

@loskutov loskutov commented Jun 5, 2023

Add new tickers: rocksdb.error.handler.bg.error.count, rocksdb.error.handler.bg.io.error.count, rocksdb.error.handler.bg.retryable.io.error.count to replace the misspelled ones: rocksdb.error.handler.bg.errro.count, rocksdb.error.handler.bg.io.errro.count, rocksdb.error.handler.bg.retryable.io.errro.count ('error' instead of 'errro'). Users should switch to use the new tickers before 9.0 release as the misspelled old tickers will be completely removed then.

@facebook-github-bot
Copy link
Contributor

Hi @loskutov!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@jowlyzhang jowlyzhang self-requested a review June 7, 2023 19:05
@jowlyzhang
Copy link
Contributor

@loskutov thanks for the PR to help make RocksDB better. As for the typo, we have some concerns that such change could cause breakage for users who are looking for exactly "errro" in their monitoring systems. We plan to do this type of clean up in a major release. Before that, we can give users enough heads up and offer a transitioning period by exposing the same counter with both the misspelled and the correct name, and clean up the misspelled name in a major release.

Let me know if you are interested in adding the correctly named counters. Otherwise, we will create some internal task for this. Thanks!

@loskutov
Copy link
Contributor Author

loskutov commented Jun 7, 2023

@jowlyzhang I've updated the PR, now the misspelled names are also available.

@@ -131,6 +131,12 @@ inline void RecordTick(Statistics* statistics, uint32_t ticker_type,
uint64_t count = 1) {
if (statistics) {
statistics->recordTick(ticker_type, count);
if (ticker_type == ERROR_HANDLER_BG_ERROR_COUNT ||
Copy link
Contributor

Choose a reason for hiding this comment

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

When we clean up the "_MISSPELLED" tickers, it's not very obvious this code needs to be taken care of too. Without that, it will cause counting to unintended tickers. I know it's more duplicated code, but what about adding the ticker incrementing code to the source of when these tickers's counter parts get incremented in error_handler.cc. That way, the clean up is purely removing a couple of lines.

BTW, do you mind adding an entry for this change to unreleased_history/public_api_changes directory, you basically need to create a separate .md file, e.g. fix_ticker_typo.md into the directory, and describe the change in the file.

ERROR_HANDLER_BG_ERROR_COUNT,
ERROR_HANDLER_BG_ERROR_COUNT_MISSPELLED,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: would you mind adding this note as a such as TODO : deprecate the misspelled tickers in next major release.

@jowlyzhang
Copy link
Contributor

@jowlyzhang I've updated the PR, now the misspelled names are also available.

@loskutov thanks for making the change. I added some minor comments!

@@ -0,0 +1,4 @@
Some tickers (namely, `ERROR_HANDLER_BG_ERROR_COUNT`, `ERROR_HANDLER_BG_IO_ERROR_COUNT`, and `ERROR_HANDLER_BG_RETRYABLE_IO_ERROR_COUNT`)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: it would be great if this can be updated to refer to the publicly visible names of these tickers like rocksdb.error.handler.bg.errro.count, since ERROR_HANDLER_BG_ERROR_COUNT is the enum type RocksDB internally uses to refer to the ticker type.

How about:
Add new tickers: rocksdb.error.handler.bg.error.count, rocksdb.error.handler.bg.retryable.io.error.count, rocksdb.error.handler.bg.error.count to replace the misspelled ones: rocksdb.error.handler.bg.errro.count, rocksdb.error.handler.bg.retryable.io.errro.count, rocksdb.error.handler.bg.errro.count. Users should switch to use the new tickers before 9.0 release as the misspelled old tickers will be completely removed then.

We usually make this a one paragraph message so it shows up as one entry in HISTORY.md later when we make the release.

Copy link
Contributor

@jowlyzhang jowlyzhang left a comment

Choose a reason for hiding this comment

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

@loskutov Thanks for the change. LGTM, just have some minor comment! Would you mind updating the PR with a short description, thanks!

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@jowlyzhang merged this pull request in 7c67aee.

jowlyzhang pushed a commit to jowlyzhang/rocksdb that referenced this pull request Jun 14, 2023
Summary:
Add new tickers: `rocksdb.error.handler.bg.error.count`, `rocksdb.error.handler.bg.io.error.count`, `rocksdb.error.handler.bg.retryable.io.error.count` to replace the misspelled ones: `rocksdb.error.handler.bg.errro.count`, `rocksdb.error.handler.bg.io.errro.count`, `rocksdb.error.handler.bg.retryable.io.errro.count` ('error' instead of 'errro'). Users should switch to use the new tickers before 9.0 release as the misspelled old tickers will be completely removed then.

Pull Request resolved: facebook#11509

Reviewed By: ltamasi

Differential Revision: D46542809

Pulled By: jowlyzhang

fbshipit-source-id: a2a6d8354af46a060de81d40ef6f5336a80bd32e
facebook-github-bot pushed a commit that referenced this pull request Jan 29, 2024
Summary:
As titled, the replacement tickers have been introduced in #11509  and in use since release 8.4. This PR completely removes the misspelled ones.

Pull Request resolved: #12302

Test Plan: CI tests

Reviewed By: jaykorean

Differential Revision: D53196935

Pulled By: jowlyzhang

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