use super::LogCompactor;
use crate::host::CompactStore;
impl<S: CompactStore> LogCompactor<S> {
#[inline]
pub(super) fn is_stale_subkey(&self, key: &[u8]) -> bool {
self.store.is_stale_subkey(key)
}
pub(super) async fn judge_dead<F>(
&self,
session: &S::Session,
is_tombstone: bool,
key: &[u8],
val: &[u8],
now: i64,
is_deleted: &mut F,
) -> bool
where
F: FnMut(&[u8], &[u8]) -> bool,
{
is_tombstone
|| is_deleted(key, val)
|| self.is_stale_subkey(key)
|| self
.store
.is_expired_or_orphan_record(session, key, val, now)
.await
}
}