mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
set RBF sizes smaller for test
We end up hitting race detector limits on MacOS. This should mitigate that.
This commit is contained in:
parent
dad8211709
commit
fb3e60f88a
3 changed files with 10 additions and 1 deletions
|
|
@ -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...)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue