Skip to content

Commit

Permalink
fix bug in auto-compact
Browse files Browse the repository at this point in the history
  • Loading branch information
WIZARD-CXY committed Mar 15, 2018
1 parent 15926e0 commit 6f79f13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compactor/periodic.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func (t *Periodic) Run() {
}
plog.Noticef("Starting auto-compaction at revision %d (retention: %v)", rev, t.period)
_, err := t.c.Compact(t.ctx, &pb.CompactionRequest{Revision: rev})

// update the last compaction time
last = clock.Now()

if err == nil || err == mvcc.ErrCompacted {
t.revs = remaining
plog.Noticef("Finished auto-compaction at revision %d", rev)
Expand Down

0 comments on commit 6f79f13

Please sign in to comment.