Skip to content

Commit

Permalink
Add a compact before close (#30)
Browse files Browse the repository at this point in the history
* Add a compact before close

* Add a compact before close

* Fix the order

* Add a compact before close
  • Loading branch information
a9kitkumarsinha committed Jun 10, 2020
1 parent c5167c6 commit 565435b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/storage/compact/compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,6 @@ func (s *Storage) merge(keys []key.Key, blocks []block.Block, schema typeof.Sche
// Close is used to gracefully close storage.
func (s *Storage) Close() error {
s.compact.Cancel()
s.Compact(context.Background())
return storage.Close(s.buffer, s.dest)
}

0 comments on commit 565435b

Please sign in to comment.