mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-07 21:33:13 +00:00
Add blocks in errored state to garage stats
This commit is contained in:
@@ -265,6 +265,11 @@ impl BlockManager {
|
||||
self.resync_queue.len()
|
||||
}
|
||||
|
||||
/// Get number of blocks that have an error
|
||||
pub fn resync_errors_len(&self) -> usize {
|
||||
self.resync_errors.len()
|
||||
}
|
||||
|
||||
/// Get number of items in the refcount table
|
||||
pub fn rc_len(&self) -> usize {
|
||||
self.rc.rc.len()
|
||||
|
||||
@@ -728,6 +728,12 @@ impl AdminRpcHandler {
|
||||
self.garage.block_manager.resync_queue_len()
|
||||
)
|
||||
.unwrap();
|
||||
writeln!(
|
||||
&mut ret,
|
||||
" blocks with resync errors: {}",
|
||||
self.garage.block_manager.resync_errors_len()
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user