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

make bvar_max_dump_multi_dimension_metric_number modifiable #2322

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/bvar/mvariable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ DECLARE_bool(bvar_abort_on_same_name);
extern bool s_bvar_may_abort;

DEFINE_int32(bvar_max_multi_dimension_metric_number, 1024, "Max number of multi dimension");
DEFINE_int32(bvar_max_dump_multi_dimension_metric_number, 0,
DEFINE_int32(bvar_max_dump_multi_dimension_metric_number, 1024,
serverglen marked this conversation as resolved.
Show resolved Hide resolved
"Max number of multi dimension metric number to dump by prometheus rpc service");

static bool validator_bvar_max_multi_dimension_metric_number(const char*, int32_t v) {
static bool validator_bvar_max_multi_dimension_metric_number(const char* flag_name, int32_t v) {
if (v < 1) {
LOG(ERROR) << "Invalid bvar_max_multi_dimension_metric_number=" << v;
LOG(ERROR) << "Invalid " << flag_name << "=" << v;
return false;
}
return true;
Expand All @@ -50,6 +50,9 @@ static bool validator_bvar_max_multi_dimension_metric_number(const char*, int32_
const bool ALLOW_UNUSED dummp_bvar_max_multi_dimension_metric_number = ::GFLAGS_NS::RegisterFlagValidator(
&FLAGS_bvar_max_multi_dimension_metric_number, validator_bvar_max_multi_dimension_metric_number);

const bool ALLOW_UNUSED dummp_bvar_max_dump_multi_dimension_metric_number = ::GFLAGS_NS::RegisterFlagValidator(
&FLAGS_bvar_max_dump_multi_dimension_metric_number, validator_bvar_max_multi_dimension_metric_number);
lhsoft marked this conversation as resolved.
Show resolved Hide resolved

class MVarEntry {
public:
MVarEntry() : var(NULL) {}
Expand Down
Loading