diff --git a/src/commons/eventsourcing/store.rs b/src/commons/eventsourcing/store.rs index 58483c6c..dd875fcc 100644 --- a/src/commons/eventsourcing/store.rs +++ b/src/commons/eventsourcing/store.rs @@ -640,15 +640,8 @@ where fn get_latest_no_lock(&self, handle: &Handle) -> StoreResult> { trace!("Trying to load aggregate id: {}", handle); - let info_key = Self::key_for_info(handle); - let limit = self - .kv - .get::(&info_key) - .map_err(|_| AggregateStoreError::InfoCorrupt(handle.clone()))? - .map(|info| info.last_event); - match self.cache_get(handle) { - None => match self.get_aggregate(handle, limit)? { + None => match self.get_aggregate(handle, None)? { None => { error!("Could not load aggregate with id: {} from disk", handle); Err(AggregateStoreError::UnknownAggregate(handle.clone())) @@ -663,7 +656,7 @@ where Some(mut arc) => { if self.has_updates(handle, &arc)? { let agg = Arc::make_mut(&mut arc); - self.update_aggregate(handle, agg, limit)?; + self.update_aggregate(handle, agg, None)?; } trace!("Loaded aggregate id: {} from memory", handle); Ok(arc)