libsql_wal/storage/compaction/strategy/identity.rs
1use crate::storage::compaction::SegmentSet;
2
3use super::PartitionStrategy;
4
5/// partition strategy that doesn't split the passed set
6pub struct IdentityStrategy;
7
8impl PartitionStrategy for IdentityStrategy {
9 fn partition(&self, segments: &SegmentSet) -> Vec<SegmentSet> {
10 let mut out = Vec::with_capacity(1);
11 out.push(segments.clone());
12 out
13 }
14}