From 1fc76a1401223d6e00a12c39ffb33dcd959c4be6 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Mon, 14 Aug 2023 16:35:49 +0100 Subject: [PATCH] widen both sides of the witness loader window to 2x ingestor roll up time --- iot_verifier/src/loader.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/iot_verifier/src/loader.rs b/iot_verifier/src/loader.rs index 9652309a7..5cc539666 100644 --- a/iot_verifier/src/loader.rs +++ b/iot_verifier/src/loader.rs @@ -183,15 +183,17 @@ impl Loader { // this is to allow for a witness being in a rolled up file // from just before or after the beacon files // the width extention needs to be at least equal to that - // of the ingestor roll up time + // of the ingestor roll up time plus a buffer + // to account for the potential of the ingestor write time for + // witness reports being out of sync with that of beacon files // for witnesses we do need the filter but not the arc match self .process_events( FileType::IotWitnessIngestReport, &self.ingest_store, gateway_cache, - after - self.ingestor_rollup_time, - before + self.ingestor_rollup_time, + after - (self.ingestor_rollup_time + ChronoDuration::seconds(120)), + before + (self.ingestor_rollup_time + ChronoDuration::seconds(120)), None, Some(&filter), )