feat(perf): Add configurable bitrot skip for reads (#2110)

Co-authored-by: houseme <housemecn@gmail.com>
Co-authored-by: 安正超 <anzhengchao@gmail.com>
This commit is contained in:
evan slack
2026-03-10 20:59:00 -06:00
committed by GitHub
parent f00d01ec2d
commit 4b480727d6
9 changed files with 47 additions and 18 deletions
+7
View File
@@ -164,6 +164,13 @@ pub async fn get_opts(
opts.version_suspended = version_suspended;
opts.versioned = versioned;
// Optionally skip per-shard bitrot hash verification on reads to save CPU.
// Background scanner still performs full integrity checks asynchronously.
opts.skip_verify_bitrot = rustfs_utils::get_env_bool(
rustfs_config::ENV_OBJECT_GET_SKIP_BITROT_VERIFY,
rustfs_config::DEFAULT_OBJECT_GET_SKIP_BITROT_VERIFY,
);
fill_conditional_writes_opts_from_header(headers, &mut opts)?;
Ok(opts)