[#77] Use writecache in local scenarios #78

Merged
fyrchik merged 1 commit from ale64bit/xk6-frostfs:fix/77-writecache-local-scenario into master 2023-06-30 12:50:43 +00:00
Showing only changes of commit 6f44858287 - Show all commits

View file

@ -292,7 +292,9 @@ func storageEngineOptionsFromConfig(c *config.Config, debug bool) ([]engine.Opti
// write cache
if wc := sc.WriteCache(); wc.Enabled() {
opts = append(opts, shard.WithWriteCacheOptions(
opts = append(opts,
shard.WithWriteCache(true),
shard.WithWriteCacheOptions(
writecache.WithPath(wc.Path()),
writecache.WithMaxBatchSize(wc.BoltDB().MaxBatchSize()),
writecache.WithMaxBatchDelay(wc.BoltDB().MaxBatchDelay()),
@ -302,7 +304,8 @@ func storageEngineOptionsFromConfig(c *config.Config, debug bool) ([]engine.Opti
writecache.WithMaxCacheSize(wc.SizeLimit()),
writecache.WithNoSync(wc.NoSync()),
writecache.WithLogger(&logger.Logger{Logger: log}),
))
),
)
}
// tree