Skip to content

Commit

Permalink
fix #1916: dont keep old versions on disk
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Schneider <matthias.schneider@retarus.de>
  • Loading branch information
Matthias Schneider committed Apr 3, 2020
1 parent 87b1910 commit 2a31ad7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugin/storage/badger/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger)

opts := badger.DefaultOptions
opts.TableLoadingMode = options.MemoryMap
// This is important. Without this Badger would keep atleast 1 version of very key.
opts.NumVersionsToKeep = 0

if f.Options.primary.Ephemeral {
opts.SyncWrites = false
Expand Down

0 comments on commit 2a31ad7

Please sign in to comment.