Refactor DB.checkpoint() to accept any mode.
This was originally meant to add a TRUNCATE checkpoint before starting a new generation, however, there is a write lock that blocks the checkpoint and it's more complicated to roll it back and attempt the truncation.
This commit is contained in:
@@ -27,6 +27,14 @@ const (
|
||||
GenerationNameLen = 16
|
||||
)
|
||||
|
||||
// SQLite checkpoint modes.
|
||||
const (
|
||||
CheckpointModePassive = "PASSIVE"
|
||||
CheckpointModeFull = "FULL"
|
||||
CheckpointModeRestart = "RESTART"
|
||||
CheckpointModeTruncate = "TRUNCATE"
|
||||
)
|
||||
|
||||
// Litestream errors.
|
||||
var (
|
||||
ErrNoSnapshots = errors.New("no snapshots available")
|
||||
|
||||
Reference in New Issue
Block a user