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

Add kOptionsStatistics to GetProperty() #3966

Closed
4 changes: 2 additions & 2 deletions db/internal_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ const std::string DB::Properties::kBlockCacheUsage =
rocksdb_prefix + block_cache_usage;
const std::string DB::Properties::kBlockCachePinnedUsage =
rocksdb_prefix + block_cache_pinned_usage;
const std::string DB::Properties::kStatistics =
const std::string DB::Properties::kOptionsStatistics =
rocksdb_prefix + options_statistics;

const std::unordered_map<std::string, DBPropertyInfo>
Expand Down Expand Up @@ -465,7 +465,7 @@ const std::unordered_map<std::string, DBPropertyInfo>
{DB::Properties::kBlockCachePinnedUsage,
{false, nullptr, &InternalStats::HandleBlockCachePinnedUsage, nullptr,
nullptr}},
{DB::Properties::kStatistics,
{DB::Properties::kOptionsStatistics,
{false, nullptr, nullptr, nullptr,
&DBImpl::GetPropertyHandleOptionsStatistics}},
};
Expand Down
2 changes: 1 addition & 1 deletion include/rocksdb/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ class DB {

// "rocksdb.options-statistics" - returns multi-line string
Copy link
Contributor

Choose a reason for hiding this comment

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

This confuses me that the property name kStatistics = "rocksdb.options-statistics".

// containing options.statistics
Copy link
Contributor

Choose a reason for hiding this comment

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

"containing options.statistics" feels a little bit odd to me. Maybe "for options.statistics", or "of options.statistics"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will fix it, using "of options.statistics"

static const std::string kStatistics;
static const std::string kOptionsStatistics;
};
#endif /* ROCKSDB_LITE */

Expand Down