databendlabs/databend · error
remove_percent MUST in [0, 100)!
Error message
remove_percent MUST in [0, 100)!
What it means
metaverifier's `remove_percent` option controls what fraction of keys to remove during verification, and must be within [0, 100). The binary bails with this error when the configured value exceeds 100 (the message documents the half-open range: 100 itself is invalid).
Solutions
- Set remove_percent to a value in the range 0..=99 in the metaverifier config.
- If you intended to remove everything, use 99 (the tool intentionally excludes 100).
- Add pre-flight validation in whatever generates the config so out-of-range values are rejected earlier.
Example fix
// before (config.toml) remove_percent = 100 // after (config.toml) remove_percent = 50
Defensive patterns
Strategy: validation
Validate before calling
// validate remove_percent before launching metaverifier
let pct: u64 = config.remove_percent;
if pct > 99 {
return Err(anyhow::anyhow!("remove_percent must be in [0, 100), got {}", pct));
} Type guard
fn remove_percent_valid(p: u64) -> bool {
p <= 99
} Try / catch
match run_metaverifier(&config).await {
Err(e) if e.to_string().contains("remove_percent") => {
eprintln!("set remove_percent to 0..=99 and rerun");
std::process::exit(2);
}
other => other.expect("metaverifier failed"),
} Prevention
- Remember remove_percent is a half-open range: 100 is invalid.
- Clamp generated configs to 0..=99 at write time.
- Add a unit test for the config loader with boundary values 0, 99, 100.
When it happens
Trigger: Running metaverifier with config `remove_percent = 100` or higher (or a negative-check shortcut being absent, so any value >100 passes the only guard).
Common situations: Misreading the option as a percentage that can be 100; typo like 1000 instead of 10; programmatic config generation producing out-of-range values.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- grpc_api_address MUST not be empty!
- raft_dir of meta service must be an absolute path, but got
- Invalid config.rpc
- not implemented: Not implemented for storage type
- Failed to create client
AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11).
Data as JSON: /api/errors/8000d53bb9d331d4.
Report an issue: GitHub.
Appendix: source
Thrown at src/meta/binaries/metaverifier/main.rs:109
on: true,
level: "WARN".to_string(),
format: LogFormat::Text,
},
..Default::default()
};
let guards = init_logging("databend-metaverifier", &log_config, BTreeMap::new());
Box::new(guards).leak();
println!("config: {:?}", config);
if config.grpc_api_address.is_empty() {
println!("grpc_api_address MUST not be empty!");
bail!("grpc_api_address MUST not be empty!");
}
if config.remove_percent > 100 {
println!("remove_percent MUST in [0, 100)!");
bail!("remove_percent MUST in [0, 100)!");
}
let start = Instant::now();
let mut client_num = 0;
let (tx, rx) = mpsc::channel::<()>();
let mut handles = Vec::new();
// write a file as start
fs::write(VERIFIER_RESULT_FILE, "START")?;
while client_num < config.client {
client_num += 1;
let prefix = config.prefix;
let addrs: Vec<_> = config
.grpc_api_address
.split(',')
.map(|addr| addr.to_string())
.collect();View on GitHub (pinned to 288d84d76e)