[#1524] writecache: Add some bolt parameters to the configuration

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-06-16 18:21:10 +03:00 committed by LeL
parent 07e06249d5
commit 972ca83e23
4 changed files with 32 additions and 0 deletions

View file

@ -38,6 +38,9 @@ func (c *cache) openStore() error {
return fmt.Errorf("could not open database: %w", err)
}
c.db.MaxBatchSize = c.maxBatchSize
c.db.MaxBatchDelay = c.maxBatchDelay
err = c.db.Update(func(tx *bbolt.Tx) error {
_, err := tx.CreateBucketIfNotExists(defaultBucket)
return err