mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-16 18:08:21 +00:00
fix(scanner): make distributed usage convergence authoritative (#5151)
* fix(scanner): make distributed usage cycles authoritative * fix(scanner): close distributed refresh races * fix(config): align scanner reload integration * fix(admin): scope config test helpers * fix(scanner): harden distributed usage convergence * fix(scanner): preserve rolling activity compatibility * fix(admin): expose non-secret optional config values * fix(scanner): acknowledge distributed dirty usage * fix(ecstore): make bucket mutations cancellation safe * fix(scanner): preserve pending dirty acknowledgements * test(obs): account for superseded scanner metric * fix(api): reject excess detached bucket mutations * test: close scanner convergence coverage gaps * fix(scanner): make path tracking cleanup one-shot --------- Co-authored-by: Henry Guo <marshawcoco@users.noreply.github.com> Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
@@ -698,13 +698,24 @@ impl NodeService {
|
||||
Ok(volume_infos) => {
|
||||
let volume_infos = volume_infos
|
||||
.into_iter()
|
||||
.filter_map(|volume_info| serde_json::to_string(&volume_info).ok())
|
||||
.collect();
|
||||
Ok(Response::new(ListVolumesResponse {
|
||||
success: true,
|
||||
volume_infos,
|
||||
error: None,
|
||||
}))
|
||||
.enumerate()
|
||||
.map(|(index, volume_info)| {
|
||||
serde_json::to_string(&volume_info)
|
||||
.map_err(|err| DiskError::other(format!("encode list volumes entry {index} failed: {err}")))
|
||||
})
|
||||
.collect::<std::result::Result<Vec<_>, DiskError>>();
|
||||
match volume_infos {
|
||||
Ok(volume_infos) => Ok(Response::new(ListVolumesResponse {
|
||||
success: true,
|
||||
volume_infos,
|
||||
error: None,
|
||||
})),
|
||||
Err(err) => Ok(Response::new(ListVolumesResponse {
|
||||
success: false,
|
||||
volume_infos: Vec::new(),
|
||||
error: Some(err.into()),
|
||||
})),
|
||||
}
|
||||
}
|
||||
Err(err) => Ok(Response::new(ListVolumesResponse {
|
||||
success: false,
|
||||
|
||||
Reference in New Issue
Block a user