logical/testing: immediate rollback, ignore RollbackMinAge

This commit is contained in:
Mitchell Hashimoto
2015-03-21 11:18:33 +01:00
parent c872e0f788
commit a04df95177
3 changed files with 9 additions and 1 deletions

View File

@@ -224,6 +224,9 @@ func (b *Backend) handleRollback(
age = 10 * time.Minute
}
minAge := time.Now().UTC().Add(-1 * age)
if _, ok := req.Data["immediate"]; ok {
minAge = time.Now().UTC().Add(1000 * time.Hour)
}
for _, k := range keys {
entry, err := GetWAL(req.Storage, k)