From 3ebb387a90a2b871fdd6377d89d1eafdbfc413f9 Mon Sep 17 00:00:00 2001 From: Aaditya Sondhi Date: Tue, 22 Dec 2020 16:19:26 -0500 Subject: [PATCH] options: enable read based compactions This change enables read based compactions by default and sets the read sampling threshold. This is based on the findings in https://github.com/cockroachdb/pebble/issues/29. --- options.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options.go b/options.go index db5d908e3b2..36ebc9005f3 100644 --- a/options.go +++ b/options.go @@ -600,8 +600,8 @@ func (o *Options) EnsureDefaults() *Options { if o.Experimental.ReadCompactionRate == 0 { o.Experimental.ReadCompactionRate = 16000 } - if o.Experimental.ReadSamplingMultiplier != 0 { - o.Experimental.ReadSamplingMultiplier = 0 + if o.Experimental.ReadSamplingMultiplier == 0 { + o.Experimental.ReadSamplingMultiplier = 1 } o.initMaps()