scorch rollback ignores unsafeBatch flag
See also: https://github.com/blevesearch/bleve/issues/760
This commit is contained in:
parent
29663c2795
commit
57fc03258e
|
@ -149,10 +149,7 @@ func (s *Scorch) Rollback(to *RollbackPoint) error {
|
||||||
|
|
||||||
revert.snapshot = indexSnapshot
|
revert.snapshot = indexSnapshot
|
||||||
revert.applied = make(chan error)
|
revert.applied = make(chan error)
|
||||||
|
revert.persisted = make(chan error)
|
||||||
if !s.unsafeBatch {
|
|
||||||
revert.persisted = make(chan error)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
@ -172,9 +169,5 @@ func (s *Scorch) Rollback(to *RollbackPoint) error {
|
||||||
return fmt.Errorf("Rollback: failed with err: %v", err)
|
return fmt.Errorf("Rollback: failed with err: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if revert.persisted != nil {
|
return <-revert.persisted
|
||||||
err = <-revert.persisted
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue