lncfg+itest: expose configurable batch-commit-interval
This will permit a greater degree of tuning or customization depending on various hardware/environmental factors.
This commit is contained in:
8 files changed
+58
-26
No files matched your search
@@ -31,6 +31,10 @@ type Options struct {
|
||||
// channel cache.
|
||||
ChannelCacheSize int
|
||||
|
||||
// BatchCommitInterval is the maximum duration the batch schedulers will
|
||||
// wait before attempting to commit a pending set of updates.
|
||||
BatchCommitInterval time.Duration
|
||||
|
||||
// clock is the time source used by the database.
|
||||
clock clock.Clock
|
||||
|
||||
@@ -92,6 +96,14 @@ func OptionAutoCompactMinAge(minAge time.Duration) OptionModifier {
|
||||
}
|
||||
}
|
||||
|
||||
// OptionSetBatchCommitInterval sets the batch commit interval for the internval
|
||||
// batch schedulers.
|
||||
func OptionSetBatchCommitInterval(interval time.Duration) OptionModifier {
|
||||
return func(o *Options) {
|
||||
o.BatchCommitInterval = interval
|
||||
}
|
||||
}
|
||||
|
||||
// OptionClock sets a non-default clock dependency.
|
||||
func OptionClock(clock clock.Clock) OptionModifier {
|
||||
return func(o *Options) {
|
||||
|
||||
Reference in new issue
Block a user