1
0
Fork 0

Remove restriction on non-WAL restore

Never really had a strong reason for it.
master
Philip O'Toole 9 months ago
parent 5c4b48f798
commit 21dc186186

@ -679,13 +679,6 @@ func (s *Service) handleLoad(w http.ResponseWriter, r *http.Request, qp QueryPar
Data: b,
}
if db.IsWALModeEnabled(b) {
s.logger.Printf("SQLite database file is in WAL mode - rejecting load request")
http.Error(w, `SQLite database file is in WAL mode - convert it to DELETE mode via 'PRAGMA journal_mode=DELETE'`,
http.StatusBadRequest)
return
}
err := s.store.Load(lr)
if err != nil && err != store.ErrNotLeader {
http.Error(w, err.Error(), http.StatusInternalServerError)

@ -367,9 +367,6 @@ func (s *Store) SetRestorePath(path string) error {
if !sql.IsValidSQLiteFile(path) {
return fmt.Errorf("file %s is not a valid SQLite file", path)
}
if sql.IsWALModeEnabledSQLiteFile(path) {
return fmt.Errorf("file %s is in WAL mode - convert to DELETE mode", path)
}
s.RegisterReadyChannel(s.restoreDoneCh)
s.restorePath = path

Loading…
Cancel
Save