Add blocks in errored state to garage stats

This commit is contained in:
Alex Auvolat 2022-03-28 15:47:23 +02:00
parent 42dde54126
commit 913f7754bb
No known key found for this signature in database
GPG Key ID: 0E496D15096376BE
2 changed files with 11 additions and 0 deletions

View File

@ -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()

View File

@ -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
} }