0
0
Fork 0

Merge pull request #769 from steveyen/scorch-rollback-ignores-unsafeBatch

scorch rollback ignores unsafeBatch flag
This commit is contained in:
Steve Yen 2018-02-15 18:51:59 -08:00 committed by GitHub
commit 656220ca9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -149,10 +149,7 @@ func (s *Scorch) Rollback(to *RollbackPoint) error {
revert.snapshot = indexSnapshot
revert.applied = make(chan error)
if !s.unsafeBatch {
revert.persisted = make(chan error)
}
revert.persisted = make(chan error)
return nil
})
@ -172,9 +169,5 @@ func (s *Scorch) Rollback(to *RollbackPoint) error {
return fmt.Errorf("Rollback: failed with err: %v", err)
}
if revert.persisted != nil {
err = <-revert.persisted
}
return err
return <-revert.persisted
}