From 397984a9f22e57cdb4fa35471040c278955be6e2 Mon Sep 17 00:00:00 2001 From: ZZiigguurraatt Date: Fri, 20 Jun 2025 11:57:02 -0400 Subject: [PATCH] sqldb: clarify native sql options --- lncfg/db.go | 4 ++-- sample-lnd.conf | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lncfg/db.go b/lncfg/db.go index 60c12ddc3..3485d8c4f 100644 --- a/lncfg/db.go +++ b/lncfg/db.go @@ -86,9 +86,9 @@ type DB struct { Sqlite *sqldb.SqliteConfig `group:"sqlite" namespace:"sqlite" description:"Sqlite settings."` - UseNativeSQL bool `long:"use-native-sql" description:"Use native SQL for tables that already support it."` + 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 already (currently this is the invoices DB)."` - 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."` + 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)."` 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."` diff --git a/sample-lnd.conf b/sample-lnd.conf index fd4e7677b..39a0bbc49 100644 --- a/sample-lnd.conf +++ b/sample-lnd.conf @@ -1489,13 +1489,17 @@ ; db.no-rev-log-amt-data=false ; If set to true, native SQL will be used instead of KV emulation for tables -; that support it already. Note: this is an experimental feature, use at your -; own risk. +; that support it already (currently this is the invoices DB). ; db.use-native-sql=false ; 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. +; 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). ; db.skip-native-sql-migration=false [etcd]