offload initial iterator seeks to threadpool

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-12-02 08:51:59 +00:00
parent 320b0680bd
commit b5006a4c41
20 changed files with 361 additions and 131 deletions

View file

@ -2,7 +2,7 @@ use conduit::{implement, Result};
use futures::stream::{Stream, StreamExt};
use serde::Deserialize;
use crate::{keyval, keyval::KeyVal, stream};
use crate::{keyval, keyval::KeyVal, stream, stream::Cursor};
/// Iterate key-value entries in the map from the end.
///
@ -24,5 +24,5 @@ where
#[tracing::instrument(skip(self), fields(%self), level = "trace")]
pub fn rev_raw_stream(&self) -> impl Stream<Item = Result<KeyVal<'_>>> + Send {
let opts = super::read_options_default();
stream::ItemsRev::new(&self.db, &self.cf, opts, None)
stream::ItemsRev::new(&self.db, &self.cf, opts).init(None)
}