pub trait CompactionPersistence: Send + Sync {
// Required method
fn after_compaction<'a>(
&'a self,
compacted_count: usize,
summary_content: &'a str,
summary: &'a str,
compacted_trust_level: Option<u8>,
) -> Pin<Box<dyn Future<Output = (bool, Option<QdrantPersistFuture>)> + Send + 'a>>;
}Expand description
Persistence completion hook invoked after the in-memory drain/reinsert is finalized.
Returns:
persist_failed: whether the synchronousSQLitepersistence step failed.qdrant_future: optional'staticfuture for the off-thread Qdrant write, bubbled back to the caller viaCompactionOutcome::Compacted::qdrant_future.
Required Methods§
Sourcefn after_compaction<'a>(
&'a self,
compacted_count: usize,
summary_content: &'a str,
summary: &'a str,
compacted_trust_level: Option<u8>,
) -> Pin<Box<dyn Future<Output = (bool, Option<QdrantPersistFuture>)> + Send + 'a>>
fn after_compaction<'a>( &'a self, compacted_count: usize, summary_content: &'a str, summary: &'a str, compacted_trust_level: Option<u8>, ) -> Pin<Box<dyn Future<Output = (bool, Option<QdrantPersistFuture>)> + Send + 'a>>
Persist the compaction result and return the Qdrant write future.
compacted_trust_level is the worst-case MessageMetadata::trust_level across the
compacted-away messages (issue #6558 follow-up, S3) — implementors must persist it
alongside the summary row so the memory-consent gate’s context tag survives a session
reload, not just the in-memory summary message.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".