diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-16 11:14:27 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-16 11:14:27 +0100 |
commit | 1d9961e4118af0e26068e1d6c5c6c009a1292a88 (patch) | |
tree | e05bc162772e8c4a5bd658f437de02108b55c5a2 /src/model/garage.rs | |
parent | 6a8439fd1345ecae7414386f76dda7a03eb14df2 (diff) | |
download | garage-1d9961e4118af0e26068e1d6c5c6c009a1292a88.tar.gz garage-1d9961e4118af0e26068e1d6c5c6c009a1292a88.zip |
Simplify replication logic
Diffstat (limited to 'src/model/garage.rs')
-rw-r--r-- | src/model/garage.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/model/garage.rs b/src/model/garage.rs index ced3c29e..5f7a67c9 100644 --- a/src/model/garage.rs +++ b/src/model/garage.rs @@ -54,18 +54,23 @@ impl Garage { ); let data_rep_param = TableShardedReplication { + system: system.clone(), replication_factor: config.data_replication_factor, write_quorum: (config.data_replication_factor + 1) / 2, read_quorum: 1, }; let meta_rep_param = TableShardedReplication { + system: system.clone(), replication_factor: config.meta_replication_factor, write_quorum: (config.meta_replication_factor + 1) / 2, read_quorum: (config.meta_replication_factor + 1) / 2, }; - let control_rep_param = TableFullReplication::new(config.control_write_max_faults); + let control_rep_param = TableFullReplication { + system: system.clone(), + max_faults: config.control_write_max_faults, + }; info!("Initialize block manager..."); let block_manager = BlockManager::new( |