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

feat(collector): add statistics for estimate key number of partition #435

Merged
merged 12 commits into from
Dec 3, 2019

Conversation

foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented Dec 3, 2019

What problem does this PR solve?

Some case needs get the count of table data, this pr provides the statistic for collector and named rdb.estimate_num_keys

What is changed and how it works?

In update_replica_rocksdb_statistics() of pegasus_server_impl.cpp, the pr add _db->GetProperty(rocksdb::DB::Properties::kEstimateNumKeys, &str_val), when the sever start, the statistic will be update periodically

Check List

Related changes

  • Need to cherry-pick to the release branch
    yes
  • Need to update the documentation
    no
  • Need to be included in the release note
    yes
  • Need update falcon screen
    yes

Other

If some key is duplicate, the value of key number will be count multi time, so only after compaction, the value just be relatively accurate.

New perf-counter:

app.pegasus*rdb.estimate_num_keys@<gpid>

src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/test/pegasus_server_impl_test.cpp Outdated Show resolved Hide resolved
src/server/test/pegasus_server_impl_test.cpp Outdated Show resolved Hide resolved
src/server/test/pegasus_server_impl_test.cpp Outdated Show resolved Hide resolved
src/server/test/pegasus_server_impl_test.cpp Outdated Show resolved Hide resolved
src/server/test/pegasus_server_impl_test.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/test/pegasus_server_impl_test.cpp Outdated Show resolved Hide resolved
src/server/test/pegasus_server_impl_test.cpp Outdated Show resolved Hide resolved
src/server/test/pegasus_server_impl_test.cpp Outdated Show resolved Hide resolved
@neverchanje neverchanje added the type/perf-counter PR that made modification on perf-counter, which should be noted in release note. label Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.12.1 type/perf-counter PR that made modification on perf-counter, which should be noted in release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants