Skip to content

Commit 3e8339c

Browse files
authored
Merge pull request #9606 from bhandras/skip-migration-rename
config: rename skip-sql-invoice-migration to skip-native-sql-migration
2 parents 053d63e + 5559595 commit 3e8339c

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

config_builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ func (d *DefaultDatabaseBuilder) BuildDatabase(
10991099
// run. If the database version is already above this custom
11001100
// migration's version (7), it will be skipped permanently,
11011101
// regardless of the flag.
1102-
if !d.cfg.DB.SkipSQLInvoiceMigration {
1102+
if !d.cfg.DB.SkipNativeSQLMigration {
11031103
migrationFn := func(tx *sqlc.Queries) error {
11041104
err := invoices.MigrateInvoicesToSQL(
11051105
ctx, dbs.ChanStateDB.Backend,

docs/release-notes/release-notes-0.19.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,10 @@ The underlying functionality between those two options remain the same.
368368
](https://github.com/lightningnetwork/lnd/pull/9438) tombstone after native
369369
SQL migration.
370370

371+
* [Rename of skip migration
372+
flag](https://github.com/lightningnetwork/lnd/pull/9606/) for future
373+
compatibility.
374+
371375
## Code Health
372376

373377
* A code refactor that [moves all the graph related DB code out of the

lncfg/db.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ type DB struct {
8787

8888
UseNativeSQL bool `long:"use-native-sql" description:"Use native SQL for tables that already support it."`
8989

90-
SkipSQLInvoiceMigration bool `long:"skip-sql-invoice-migration" description:"Do not migrate invoices stored in our key-value database to native SQL."`
90+
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."`
9191

9292
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."`
9393

@@ -117,8 +117,8 @@ func DefaultDB() *DB {
117117
MaxConnections: defaultSqliteMaxConnections,
118118
BusyTimeout: defaultSqliteBusyTimeout,
119119
},
120-
UseNativeSQL: false,
121-
SkipSQLInvoiceMigration: false,
120+
UseNativeSQL: false,
121+
SkipNativeSQLMigration: false,
122122
}
123123
}
124124

sample-lnd.conf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,9 +1478,10 @@
14781478
; own risk.
14791479
; db.use-native-sql=false
14801480

1481-
; If set to true, native SQL invoice migration will be skipped. Note that this
1482-
; option is intended for users who experience non-resolvable migration errors.
1483-
; db.skip-sql-invoice-migration=false
1481+
; If set to true, the KV to native SQL migration will be skipped. Note that
1482+
; this option is intended for users who experience non-resolvable migration
1483+
; errors.
1484+
; db.skip-native-sql-migration=false
14841485

14851486
[etcd]
14861487

0 commit comments

Comments
 (0)