mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-12 07:16:52 +00:00
Implement getting missing blocks when RC increases
Issue: RC increases also when the block ref entry is first put by the actual client. At that point the client is probably already sending us the block content, so we don't need to do a get... We should add a delay before the task is added or find something to do.
This commit is contained in:
+5
-5
@@ -17,7 +17,7 @@ use crate::proto::*;
|
||||
use crate::rpc_server;
|
||||
use crate::table::*;
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct Config {
|
||||
pub metadata_dir: PathBuf,
|
||||
pub data_dir: PathBuf,
|
||||
@@ -39,7 +39,7 @@ pub struct Config {
|
||||
pub rpc_tls: Option<TlsConfig>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct TlsConfig {
|
||||
pub ca_cert: String,
|
||||
pub node_cert: String,
|
||||
@@ -48,9 +48,9 @@ pub struct TlsConfig {
|
||||
|
||||
pub struct Garage {
|
||||
pub db: sled::Db,
|
||||
pub background: Arc<BackgroundRunner>,
|
||||
pub system: Arc<System>,
|
||||
pub block_manager: Arc<BlockManager>,
|
||||
pub background: Arc<BackgroundRunner>,
|
||||
|
||||
pub table_rpc_handlers: HashMap<String, Box<dyn TableRpcHandler + Sync + Send>>,
|
||||
|
||||
@@ -66,9 +66,9 @@ impl Garage {
|
||||
db: sled::Db,
|
||||
background: Arc<BackgroundRunner>,
|
||||
) -> Arc<Self> {
|
||||
let block_manager = Arc::new(BlockManager::new(&db, config.data_dir.clone()));
|
||||
let system = Arc::new(System::new(config.clone(), id, background.clone()));
|
||||
|
||||
let system = Arc::new(System::new(config, id, background.clone()));
|
||||
let block_manager = BlockManager::new(&db, config.data_dir.clone(), system.clone()).await;
|
||||
|
||||
let data_rep_param = TableReplicationParams {
|
||||
replication_factor: system.config.data_replication_factor,
|
||||
|
||||
Reference in New Issue
Block a user