Skip to main content

rewrite_segment

Function rewrite_segment 

Source
pub async fn rewrite_segment<S: StorageEngine>(
    storage: &Arc<S>,
    name: &str,
    new_seg_id: u64,
    schema_hash: u64,
    tiles: &[(TileId, SparseTile)],
    old_seg_ids: &[u64],
) -> Result<Vec<u8>, LiteError>
Expand description

Compile a new merged segment from the provided (TileId, SparseTile) list and persist it, then delete the old segments.

Used by retention compaction. Returns the new segment ID and byte length.