farisbasha opened a new pull request, #3759:
URL: https://github.com/apache/brpc/pull/3759

   ### What problem does this PR solve?
   
   Issue Number: none (small docs fix)
   
   Problem Summary:
   
   The gflags table in `docs/cn/mbvar_c++.md` says 
`bvar_max_dump_multi_dimension_metric_number` defaults to `0` and that the 
default exports no mbvar at all ("默认是0,即不导出任何mbvar"). The flag is defined in 
`src/bvar/mvariable.cpp` as
   
   ```cpp
   DEFINE_int32(bvar_max_dump_multi_dimension_metric_number, 1024,
                "Max number of multi dimension metric number to dump by 
prometheus rpc service");
   ```
   
   so by default up to 1024 metrics are dumped. A value of `0` still means 
"dump nothing": `LimitedDumper` in `MVariableBase::dump_exposed()` starts with 
a budget of `FLAGS_bvar_max_dump_multi_dimension_metric_number` and refuses 
every metric once that budget is `0`. The default has been 1024 in every 
version of `mvariable.cpp` since at least July 2026.
   
   ### What is changed and the side effects?
   
   Changed:
   
   - First table: default `0` -> `1024`, and the description now says the 
default is 1024 and that `0` exports no mbvar.
   - Second table (the example with the flag set to 2000): same correction of 
the description sentence; the example value 2000 is unchanged.
   
   Side effects:
   - Performance effects: none (docs only)
   
   - Breaking backward compatibility: none
   
   ---
   ### Check List:
   - Docs-only change; nothing to compile. The default was compared with the 
`DEFINE_int32` in `src/bvar/mvariable.cpp` and the dump logic in the same file.
   
   This was found with the help of an AI assistant.
   


-- 
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]

Reply via email to