From 110dc01f4004a9f2c935dd133a8bc3d73465b990 Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 18 Jul 2024 11:00:56 +0200 Subject: [PATCH] only check the consistency of the index-scheduler on snapshots when running in release mode --- index-scheduler/src/insta_snapshot.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index c65bb0716..f295e35b6 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -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 {