fix the field distribution when upgrading from the v1_12

This commit is contained in:
Tamo 2025-01-20 15:54:43 +01:00 committed by Louis Dureuil
parent cfc1e193b6
commit 20ac59c946
No known key found for this signature in database
5 changed files with 59 additions and 13 deletions

View file

@ -0,0 +1,29 @@
use heed::RwTxn;
use crate::{make_enum_progress, Result};
use crate::{progress::Progress, Index};
// The field distribution was not computed correctly in the v1.12 until the v1.12.3
pub(super) fn v1_12_to_v1_12_3(
wtxn: &mut RwTxn,
index: &Index,
progress: Progress,
) -> Result<bool> {
make_enum_progress! {
enum FieldDistribution {
RebuildingFieldDistribution,
}
};
progress.update_progress(FieldDistribution::RebuildingFieldDistribution);
crate::update::new::reindex::field_distribution(index, wtxn, &progress)?;
Ok(true)
}
pub(super) fn v1_12_3_to_v1_13(
_wtxn: &mut RwTxn,
_index: &Index,
_progress: Progress,
) -> Result<bool> {
Ok(false)
}