Skip to content

Commit 29ff13d

Browse files
authored
Merge pull request #9973 from ZZiigguurraatt/skip-native-sql-migration-doc-update
sqldb: clarify native sql options in `lnd.conf`
2 parents 6b80796 + 4a4d196 commit 29ff13d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

lncfg/db.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ type DB struct {
8686

8787
Sqlite *sqldb.SqliteConfig `group:"sqlite" namespace:"sqlite" description:"Sqlite settings."`
8888

89-
UseNativeSQL bool `long:"use-native-sql" description:"Use native SQL for tables that already support it."`
89+
UseNativeSQL bool `long:"use-native-sql" description:"If set to true, native SQL will be used instead of KV emulation for tables that support it. Subsystems which support native SQL tables: Invoices."`
9090

91-
SkipNativeSQLMigration bool `long:"skip-native-sql-migration" description:"Do not run the KV to native SQL migration. It should only be used if errors are encountered normally."`
91+
SkipNativeSQLMigration bool `long:"skip-native-sql-migration" description:"If set to true, the KV to native SQL migration will be skipped. Note that this option is intended for users who experience non-resolvable migration errors. Enabling after there is a non-resolvable migration error that resulted in an incomplete migration will cause that partial migration to be abandoned and ignored and an empty database will be used instead. Since invoices are currently the only native SQL database used, our channels will still work but the invoice history will be forgotten. This option has no effect if native SQL is not in use (db.use-native-sql=false)."`
9292

9393
NoGraphCache bool `long:"no-graph-cache" description:"Don't use the in-memory graph cache for path finding. Much slower but uses less RAM. Can only be used with a bolt database backend."`
9494

sample-lnd.conf

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,13 +1489,19 @@
14891489
; db.no-rev-log-amt-data=false
14901490

14911491
; If set to true, native SQL will be used instead of KV emulation for tables
1492-
; that support it already. Note: this is an experimental feature, use at your
1493-
; own risk.
1492+
; that support it.
1493+
; Subsystems which support native SQL tables:
1494+
; - Invoices
14941495
; db.use-native-sql=false
14951496

14961497
; If set to true, the KV to native SQL migration will be skipped. Note that
14971498
; this option is intended for users who experience non-resolvable migration
1498-
; errors.
1499+
; errors. Enabling after there is a non-resolvable migration error that resulted
1500+
; in an incomplete migration will cause that partial migration to be abandoned
1501+
; and ignored and an empty database will be used instead. Since invoices are
1502+
; currently the only native SQL database used, our channels will still work but
1503+
; the invoice history will be forgotten. This option has no effect if native SQL
1504+
; is not in use (db.use-native-sql=false).
14991505
; db.skip-native-sql-migration=false
15001506

15011507
[etcd]

0 commit comments

Comments
 (0)