feat: wire parity into ingest pipeline, optimize restore with nonce caching
- Parity generation auto-triggers after every N packs during ingest - ParityConfig stored in repository config.json - Nonce stored in global index entries, eliminating IDX re-reads during encrypted restore (fast path) with IDX cache fallback - Repair now attempts parity-based pack reconstruction before reindexing
This commit is contained in:
@@ -11,6 +11,16 @@ pub struct RepositoryConfig {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub encryption: Option<EncryptionConfig>,
|
||||
pub pack_target_size: u64,
|
||||
#[serde(default)]
|
||||
pub parity: Option<ParityConfigSpec>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ParityConfigSpec {
|
||||
pub algorithm: String,
|
||||
pub data_count: usize,
|
||||
pub parity_count: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -92,6 +102,11 @@ impl RepositoryConfig {
|
||||
compression: "gzip".to_string(),
|
||||
encryption,
|
||||
pack_target_size: 8 * 1024 * 1024, // 8 MB
|
||||
parity: Some(ParityConfigSpec {
|
||||
algorithm: "reed-solomon".to_string(),
|
||||
data_count: 20,
|
||||
parity_count: 1,
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user