From c95d662010549fda7068029320646795af8fad88 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Sun, 15 Oct 2023 21:07:25 -0400 Subject: [PATCH] Sink uses DELETE mode --- snapshot2/sink.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/snapshot2/sink.go b/snapshot2/sink.go index bdad5c75..5753b661 100644 --- a/snapshot2/sink.go +++ b/snapshot2/sink.go @@ -162,12 +162,11 @@ func (s *Sink) processSnapshotData() (retErr error) { if db.IsValidSQLiteWALFile(snapNewWAL) { // The most recent snapshot was created from a WAL file, so we need to replay // that WAL file into the previous SQLite file. We do this by opening the - // previous SQLite file, and then closing it. This will replay the WAL file - // into the previous SQLite file. + // previous SQLite file in DELETE mode, and then closing it again. if err := os.Rename(snapPrevDB, snapNewDB); err != nil { return err } - db, err := db.Open(snapNewDB, false, true) + db, err := db.Open(snapNewDB, false, false) if err != nil { return err }