1
0
Fork 0

Check for error with specific text

master
Philip O'Toole 9 months ago
parent f18fb66665
commit 6333b8cd82

@ -1217,8 +1217,11 @@ func (s *Store) Backup(br *proto.BackupRequest, dst io.Writer) (retErr error) {
}
} else {
// Snapshot to ensure the main SQLite file has all the latest data.
if err := s.Snapshot(0); err != nil && err != raft.ErrNothingNewToSnapshot {
return fmt.Errorf("pre-backup snapshot failed: %s", err.Error())
if err := s.Snapshot(0); err != nil {
if err != raft.ErrNothingNewToSnapshot ||
!strings.Contains(err.Error(), "wait until the configuration entry at") {
return fmt.Errorf("pre-backup snapshot failed: %s", err.Error())
}
}
// Pause any snapshotting and which will allow us to read the SQLite
// file without it changing underneath us. Any new writes will be

Loading…
Cancel
Save