mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
storage: reject to compact on future rev
Compaction on future rev is unreasonable.
This commit is contained in:
parent
47b243be5d
commit
353f10ca2b
@ -158,6 +158,9 @@ func (s *store) Compact(rev int64) error {
|
||||
if rev <= s.compactMainRev {
|
||||
return ErrCompacted
|
||||
}
|
||||
if rev > s.currentRev.main {
|
||||
return ErrFutureRev
|
||||
}
|
||||
|
||||
s.compactMainRev = rev
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user