From e25e9bf86e780c75d271bb54f6d8ca2e7ca3a02a Mon Sep 17 00:00:00 2001 From: Zoran Cvetkov Date: Fri, 15 Nov 2024 16:21:00 +0200 Subject: [PATCH] remove get_range from the Queue and Writer --- store/postgres/src/writable.rs | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/store/postgres/src/writable.rs b/store/postgres/src/writable.rs index 6c2faef3e14..1869c2cbca7 100644 --- a/store/postgres/src/writable.rs +++ b/store/postgres/src/writable.rs @@ -1228,14 +1228,6 @@ impl Queue { Ok(map) } - fn get_range( - &self, - entity_type: &EntityType, - block_range: Range, - ) -> Result>, StoreError> { - self.store.get_range(entity_type, block_range) - } - fn get_derived( &self, derived_query: &DerivedEntityQuery, @@ -1448,17 +1440,6 @@ impl Writer { } } - fn get_range( - &self, - entity_type: &EntityType, - block_range: Range, - ) -> Result>, StoreError> { - match self { - Writer::Sync(store) => store.get_range(entity_type, block_range), - Writer::Async { queue, .. } => queue.get_range(entity_type, block_range), - } - } - fn get_derived( &self, key: &DerivedEntityQuery, @@ -1587,12 +1568,14 @@ impl ReadStore for WritableStore { self.writer.get_many(keys) } + // The entities that are returned are only the ones from the database. + // The ones in the queue are ignored. fn get_range( &self, entity_type: &EntityType, block_range: Range, ) -> Result>, StoreError> { - self.writer.get_range(entity_type, block_range) + self.store.get_range(entity_type, block_range) } fn get_derived(