Skip to main content

delete_branch_state

Function delete_branch_state 

Source
pub fn delete_branch_state(db: &Db, project: &str, branch: &str) -> Result<()>
Expand description

Drop both of (project, branch)’s rows in one write transaction.

One transaction because the two are halves of one fact. Deleting them separately leaves a window where a crash strands a reviews row whose threads are gone - review__get would then resolve a review whose comments no longer exist.