Merge pull request #3745 from hashicorp/restore-timeout

Removes timeout when restoring snapshots.
This commit is contained in:
James Phillips 2017-12-13 14:14:52 -08:00 committed by GitHub
commit f95c117aad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -10,7 +10,6 @@ import (
"io/ioutil" "io/ioutil"
"log" "log"
"os" "os"
"time"
"github.com/hashicorp/raft" "github.com/hashicorp/raft"
) )
@ -185,7 +184,7 @@ func Restore(logger *log.Logger, in io.Reader, r *raft.Raft) error {
} }
// Feed the snapshot into Raft. // Feed the snapshot into Raft.
if err := r.Restore(&metadata, snap, 60*time.Second); err != nil { if err := r.Restore(&metadata, snap, 0); err != nil {
return fmt.Errorf("Raft error when restoring snapshot: %v", err) return fmt.Errorf("Raft error when restoring snapshot: %v", err)
} }