mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-08 20:44:30 +01:00
sanity checks as debug_assert
This commit is contained in:
parent
77c97960e2
commit
1079c55ea5
@ -745,14 +745,12 @@ fn compute_facet_level_database(
|
|||||||
let _entered = span.enter();
|
let _entered = span.enter();
|
||||||
match delta {
|
match delta {
|
||||||
super::merger::FacetFieldIdDelta::Bulk => {
|
super::merger::FacetFieldIdDelta::Bulk => {
|
||||||
/// TODO: remove info before shipping (or downgrade to debug)
|
tracing::debug!(%fid, "bulk string facet processing");
|
||||||
tracing::info!(%fid, "bulk string facet processing");
|
|
||||||
FacetsUpdateBulk::new_not_updating_level_0(index, vec![fid], FacetType::String)
|
FacetsUpdateBulk::new_not_updating_level_0(index, vec![fid], FacetType::String)
|
||||||
.execute(wtxn)?
|
.execute(wtxn)?
|
||||||
}
|
}
|
||||||
super::merger::FacetFieldIdDelta::Incremental(delta_data) => {
|
super::merger::FacetFieldIdDelta::Incremental(delta_data) => {
|
||||||
/// TODO: remove info before shipping (or downgrade to debug)
|
tracing::debug!(%fid, len=%delta_data.len(), "incremental string facet processing");
|
||||||
tracing::info!(%fid, len=%delta_data.len(), "incremental string facet processing");
|
|
||||||
FacetsUpdateIncremental::new(
|
FacetsUpdateIncremental::new(
|
||||||
index,
|
index,
|
||||||
FacetType::String,
|
FacetType::String,
|
||||||
@ -772,14 +770,12 @@ fn compute_facet_level_database(
|
|||||||
let _entered = span.enter();
|
let _entered = span.enter();
|
||||||
match delta {
|
match delta {
|
||||||
super::merger::FacetFieldIdDelta::Bulk => {
|
super::merger::FacetFieldIdDelta::Bulk => {
|
||||||
/// TODO: remove info before shipping (or downgrade to debug)
|
tracing::debug!(%fid, "bulk number facet processing");
|
||||||
tracing::info!(%fid, "bulk number facet processing");
|
|
||||||
FacetsUpdateBulk::new_not_updating_level_0(index, vec![fid], FacetType::Number)
|
FacetsUpdateBulk::new_not_updating_level_0(index, vec![fid], FacetType::Number)
|
||||||
.execute(wtxn)?
|
.execute(wtxn)?
|
||||||
}
|
}
|
||||||
super::merger::FacetFieldIdDelta::Incremental(delta_data) => {
|
super::merger::FacetFieldIdDelta::Incremental(delta_data) => {
|
||||||
/// TODO: remove info before shipping (or downgrade to debug)
|
tracing::debug!(%fid, len=%delta_data.len(), "incremental number facet processing");
|
||||||
tracing::info!(%fid, len=%delta_data.len(), "incremental number facet processing");
|
|
||||||
/// TODO: check is_valid lmdb key
|
/// TODO: check is_valid lmdb key
|
||||||
FacetsUpdateIncremental::new(
|
FacetsUpdateIncremental::new(
|
||||||
index,
|
index,
|
||||||
@ -793,8 +789,7 @@ fn compute_facet_level_database(
|
|||||||
.execute(wtxn)?
|
.execute(wtxn)?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// TODO: remove me before shipping!
|
debug_assert!(crate::update::facet::sanity_checks(
|
||||||
crate::update::facet::sanity_checks(
|
|
||||||
index,
|
index,
|
||||||
wtxn,
|
wtxn,
|
||||||
fid,
|
fid,
|
||||||
@ -803,7 +798,7 @@ fn compute_facet_level_database(
|
|||||||
FACET_MIN_LEVEL_SIZE as usize,
|
FACET_MIN_LEVEL_SIZE as usize,
|
||||||
FACET_MAX_GROUP_SIZE as usize,
|
FACET_MAX_GROUP_SIZE as usize,
|
||||||
)
|
)
|
||||||
.expect("sanity check failed");
|
.is_ok());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user