pub struct BackfillConfig {
pub batch_size: usize,
pub max_concurrent: usize,
pub dual_write: bool,
pub target_query_threshold: f64,
pub rollback_window_secs: u64,
}Expand description
Configuration for the backfill coordinator.
Controls batch sizing, concurrency, dual-write behavior, and the threshold at which queries switch to the target model.
§Example
use lattice_embed::backfill::BackfillConfig;
let config = BackfillConfig {
batch_size: 200,
max_concurrent: 8,
dual_write: true,
target_query_threshold: 0.9,
rollback_window_secs: 3600, // 1 hour
};
assert_eq!(config.batch_size, 200);Fields§
§batch_size: usizeBatch size for backfill operations.
max_concurrent: usizeMaximum concurrent backfill batches.
dual_write: boolWhether new documents should be dual-written during migration.
target_query_threshold: f64Minimum progress fraction before allowing target-only queries [0.0, 1.0].
When the migration progress reaches this threshold, query routing switches from legacy to target embeddings.
rollback_window_secs: u64Duration in seconds to continue dual-writing after cutover.
During the rollback window, queries use the new target model but writes continue to both models. This ensures atoms created after cutover exist in both indexes, enabling instant rollback without data loss.
Default: 86400 seconds (24 hours).
Trait Implementations§
Source§impl Clone for BackfillConfig
impl Clone for BackfillConfig
Source§fn clone(&self) -> BackfillConfig
fn clone(&self) -> BackfillConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more