Skip to main content

clear_segment_read_locks

Function clear_segment_read_locks 

Source
pub async fn clear_segment_read_locks(pool: &SqlitePool) -> Result<()>
Expand description

Clear any transient segment read-locks left over from a crash. clip/snapshot export set segments.locked = 1 while ffmpeg reads a segment and release it afterwards; if the process died mid-read those segments would stay locked (and never be pruned by retention). Clearing at startup makes the read-lock crash-safe. NOTE: this means locked is reserved for transient read-locks — a future durable evidence-hold must use a separate column, not this one.