From 075ca0764849ca8f979ea35789a920ad77466dd7 Mon Sep 17 00:00:00 2001 From: Seebs Date: Wed, 31 Aug 2022 16:35:37 -0500 Subject: [PATCH] set RBF sizes smaller for test We end up hitting race detector limits on MacOS. This should mitigate that. --- test/cluster.go | 9 ++++++++- test/holder.go | 1 + test/index.go | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/test/cluster.go b/test/cluster.go index 5c66b9b2d..dc688f8ed 100644 --- a/test/cluster.go +++ b/test/cluster.go @@ -592,8 +592,14 @@ func prependOpts(opts [][]server.CommandOption, size int) [][]server.CommandOpti return opts } -// prependTestServerOpts prepends opts with the OpenInMemTranslateStore. +// prependTestServerOpts prepends opts with the OpenInMemTranslateStore, +// tweaks to initial startup delay, and storage config to disable fsync and +// specify a smaller RBF size. func prependTestServerOpts(opts []server.CommandOption) []server.CommandOption { + cfg := pilosa.DefaultHolderConfig() + cfg.RBFConfig.FsyncEnabled = false + cfg.RBFConfig.MaxSize = (1 << 28) + cfg.RBFConfig.MaxWALSize = (1 << 28) defaultOpts := []server.CommandOption{ server.OptCommandServerOptions( pilosa.OptServerOpenTranslateStore(pilosa.OpenInMemTranslateStore), @@ -602,6 +608,7 @@ func prependTestServerOpts(opts []server.CommandOption) []server.CommandOption { Backend: storage.DefaultBackend, FsyncEnabled: false, }), + pilosa.OptServerRBFConfig(cfg.RBFConfig), ), } return append(defaultOpts, opts...) diff --git a/test/holder.go b/test/holder.go index 8b25555cd..fd7acbf67 100644 --- a/test/holder.go +++ b/test/holder.go @@ -28,6 +28,7 @@ func NewHolder(tb testing.TB) *Holder { cfg := pilosa.DefaultHolderConfig() cfg.StorageConfig.FsyncEnabled = false cfg.RBFConfig.FsyncEnabled = false + cfg.RBFConfig.MaxSize = (1 << 28) h := &Holder{Holder: pilosa.NewHolder(path, cfg), tb: tb} return h diff --git a/test/index.go b/test/index.go index 27466c9a6..b1872bcdd 100644 --- a/test/index.go +++ b/test/index.go @@ -24,6 +24,7 @@ func newIndex(tb testing.TB) *Index { cfg := pilosa.DefaultHolderConfig() cfg.StorageConfig.FsyncEnabled = false cfg.RBFConfig.FsyncEnabled = false + cfg.RBFConfig.MaxSize = (1 << 28) h := pilosa.NewHolder(path, cfg) testhook.Cleanup(tb, func() { h.Close()