Skip to content

Commit

Permalink
Mark as not in preparation after a snapshot failure (#433)
Browse files Browse the repository at this point in the history
This PR changes the snapshot business logic ensuring that if the
preparation stage fails the status of in_preparation is switched back to
false after the failure is internally reported.
  • Loading branch information
danielealbano authored Oct 12, 2023
1 parent 5f682cc commit 561ec5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/storage/db/storage_db_snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ bool storage_db_snapshot_rdb_prepare(
if (snapshot_fd > 0) {
close(snapshot_fd);
}

db->snapshot.in_preparation = false;
MEMORY_FENCE_STORE();
}

return result;
Expand Down

0 comments on commit 561ec5a

Please sign in to comment.