Struct garage_model::block::BlockManager
source · [−]pub struct BlockManager {
pub replication: TableShardedReplication,
pub data_dir: PathBuf,
/* private fields */
}
Expand description
The block manager, handling block exchange between nodes, and block storage on local node
Fields
replication: TableShardedReplication
Replication strategy, allowing to find on which node blocks should be located
data_dir: PathBuf
Directory in which block are stored
Implementations
pub fn new(
db: &Db,
data_dir: PathBuf,
replication: TableShardedReplication,
system: Arc<System>
) -> Arc<Self>
Ask nodes that might have a block for it
Send block to nodes that should have it
Launch the repair procedure on the data store
This will list all blocks locally present, as well as those that are required because of refcount > 0, and will try to fix any mismatch between the two.
Verify integrity of each block on disk. Use speed_limit
to limit the load generated by
this function.
Get lenght of resync queue
Increment the number of time a block is used, putting it to resynchronization if it is required, but not known
Decrement the number of time a block is used
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for BlockManager
impl Send for BlockManager
impl Sync for BlockManager
impl Unpin for BlockManager
impl !UnwindSafe for BlockManager
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more