forked from Deuxfleurs/garage
Add blocks in errored state to garage stats
This commit is contained in:
parent
42dde54126
commit
913f7754bb
2 changed files with 11 additions and 0 deletions
|
@ -265,6 +265,11 @@ impl BlockManager {
|
||||||
self.resync_queue.len()
|
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
|
/// Get number of items in the refcount table
|
||||||
pub fn rc_len(&self) -> usize {
|
pub fn rc_len(&self) -> usize {
|
||||||
self.rc.rc.len()
|
self.rc.rc.len()
|
||||||
|
|
|
@ -728,6 +728,12 @@ impl AdminRpcHandler {
|
||||||
self.garage.block_manager.resync_queue_len()
|
self.garage.block_manager.resync_queue_len()
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
writeln!(
|
||||||
|
&mut ret,
|
||||||
|
" blocks with resync errors: {}",
|
||||||
|
self.garage.block_manager.resync_errors_len()
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue