chenBright commented on code in PR #2894:
URL: https://github.com/apache/brpc/pull/2894#discussion_r1959966376
##########
src/bvar/mvariable.cpp:
##########
@@ -60,6 +60,17 @@ DEFINE_int32(bvar_max_dump_multi_dimension_metric_number,
1024,
BUTIL_VALIDATE_GFLAG(bvar_max_dump_multi_dimension_metric_number,
validator_bvar_max_dump_multi_dimension_metric_number);
+static bool validator_max_multi_dimension_stats_count(const char*, int32_t v) {
+ if (v < 0) {
+ LOG(ERROR) << "Invalid max_multi_dimension_stats_count=" << v;
+ return false;
+ }
+ return true;
+}
+DEFINE_int32(max_multi_dimension_stats_count, 20000, "Max stats count of a
multi dimension metric.");
Review Comment:
定义为uint32,校验函数用PositiveInteger,这样是不是简单点?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]