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:
Conner Fromknecht committed 2020-11-25 16:45:25 -08:00
1 parent e8c545e909
commit 82a238317c
8 files changed
+58 -26

No files matched your search

+3
View File
@@ -1381,6 +1381,7 @@ func initializeDatabases(ctx context.Context,
databaseBackends.LocalDB,
channeldb.OptionSetRejectCacheSize(cfg.Caches.RejectCacheSize),
channeldb.OptionSetChannelCacheSize(cfg.Caches.ChannelCacheSize),
channeldb.OptionSetBatchCommitInterval(cfg.DB.BatchCommitInterval),
channeldb.OptionDryRunMigration(cfg.DryRunMigration),
)
switch {
@@ -1409,6 +1410,7 @@ func initializeDatabases(ctx context.Context,
databaseBackends.LocalDB,
channeldb.OptionSetRejectCacheSize(cfg.Caches.RejectCacheSize),
channeldb.OptionSetChannelCacheSize(cfg.Caches.ChannelCacheSize),
channeldb.OptionSetBatchCommitInterval(cfg.DB.BatchCommitInterval),
channeldb.OptionDryRunMigration(cfg.DryRunMigration),
)
switch {
@@ -1433,6 +1435,7 @@ func initializeDatabases(ctx context.Context,
remoteChanDB, err = channeldb.CreateWithBackend(
databaseBackends.RemoteDB,
channeldb.OptionDryRunMigration(cfg.DryRunMigration),
channeldb.OptionSetBatchCommitInterval(cfg.DB.BatchCommitInterval),
)
switch {
case err == channeldb.ErrDryRunMigrationOK: