logo
pub trait MergePolicy: Send + Sync + Debug {
    fn compute_merge_candidates(
        &self,
        segments: &[SegmentMeta]
    ) -> Vec<MergeCandidate>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
; }
Expand description

The MergePolicy defines which segments should be merged.

Every time a the list of segments changes, the segment updater asks the merge policy if some segments should be merged.

Required Methods

Given the list of segment metas, returns the list of merge candidates.

This call happens on the segment updater thread, and will block other segment updates, so all implementations should happen rapidly.

Implementors