forked from TrueCloudLab/frostfs-node
[#1302] writecache: Allow to specify custom page size
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
fa82854af4
commit
68029d756e
12 changed files with 35 additions and 4 deletions
|
@ -48,6 +48,8 @@ type options struct {
|
|||
metrics Metrics
|
||||
// disableBackgroundFlush is for testing purposes only.
|
||||
disableBackgroundFlush bool
|
||||
// pageSize is bbolt's page size config value
|
||||
pageSize int
|
||||
}
|
||||
|
||||
// WithLogger sets logger.
|
||||
|
@ -173,3 +175,10 @@ func WithDisableBackgroundFlush() Option {
|
|||
o.disableBackgroundFlush = true
|
||||
}
|
||||
}
|
||||
|
||||
// WithPageSize sets bbolt's page size.
|
||||
func WithPageSize(s int) Option {
|
||||
return func(o *options) {
|
||||
o.pageSize = s
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue