[#77] Use writecache in local scenarios #78
1 changed files with 14 additions and 11 deletions
|
@ -292,17 +292,20 @@ func storageEngineOptionsFromConfig(c *config.Config, debug bool) ([]engine.Opti
|
||||||
|
|
||||||
// write cache
|
// write cache
|
||||||
if wc := sc.WriteCache(); wc.Enabled() {
|
if wc := sc.WriteCache(); wc.Enabled() {
|
||||||
opts = append(opts, shard.WithWriteCacheOptions(
|
opts = append(opts,
|
||||||
writecache.WithPath(wc.Path()),
|
shard.WithWriteCache(true),
|
||||||
writecache.WithMaxBatchSize(wc.BoltDB().MaxBatchSize()),
|
shard.WithWriteCacheOptions(
|
||||||
writecache.WithMaxBatchDelay(wc.BoltDB().MaxBatchDelay()),
|
writecache.WithPath(wc.Path()),
|
||||||
writecache.WithMaxObjectSize(wc.MaxObjectSize()),
|
writecache.WithMaxBatchSize(wc.BoltDB().MaxBatchSize()),
|
||||||
writecache.WithSmallObjectSize(wc.SmallObjectSize()),
|
writecache.WithMaxBatchDelay(wc.BoltDB().MaxBatchDelay()),
|
||||||
writecache.WithFlushWorkersCount(wc.WorkersNumber()),
|
writecache.WithMaxObjectSize(wc.MaxObjectSize()),
|
||||||
writecache.WithMaxCacheSize(wc.SizeLimit()),
|
writecache.WithSmallObjectSize(wc.SmallObjectSize()),
|
||||||
writecache.WithNoSync(wc.NoSync()),
|
writecache.WithFlushWorkersCount(wc.WorkersNumber()),
|
||||||
writecache.WithLogger(&logger.Logger{Logger: log}),
|
writecache.WithMaxCacheSize(wc.SizeLimit()),
|
||||||
))
|
writecache.WithNoSync(wc.NoSync()),
|
||||||
|
writecache.WithLogger(&logger.Logger{Logger: log}),
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// tree
|
// tree
|
||||||
|
|
Loading…
Reference in a new issue