only check the consistency of the index-scheduler on snapshots when running in release mode

This commit is contained in:
Tamo 2024-07-18 11:00:56 +02:00
parent abe128476f
commit 110dc01f40

View File

@ -11,6 +11,9 @@ use crate::index_mapper::IndexMapper;
use crate::{IndexScheduler, Kind, Status, BEI128};
pub fn snapshot_index_scheduler(scheduler: &IndexScheduler) -> String {
// Since we'll snapshot the index right afterward, we don't need to ensure it's internally consistent for every run.
// We can only do it for the release run, where the function runs way faster.
#[cfg(not(debug_assertions))]
scheduler.assert_internally_consistent();
let IndexScheduler {