Skip to content

[bug]: better docs for the db.skip-native-sql-migration option #9675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ZZiigguurraatt opened this issue Apr 3, 2025 · 2 comments
Open
Labels
bug Unintended code behaviour needs triage

Comments

@ZZiigguurraatt
Copy link

We need a bit more explanation of the new db.skip-native-sql-migration config option at

lnd/sample-lnd.conf

Lines 1484 to 1489 in 6a3845b

; 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.
; db.skip-native-sql-migration=false
and

lnd/lncfg/db.go

Lines 89 to 91 in 6a3845b

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

What the user is not told is that if we have db.use-native-sql=true and db.skip-native-sql-migration=true that basically means you're starting with an empty invoice DB and forgetting their existing invoice database.

@ZZiigguurraatt ZZiigguurraatt added bug Unintended code behaviour needs triage labels Apr 3, 2025
@ZZiigguurraatt
Copy link
Author

Also, the option db.skip-native-sql-migration=true seems to exist so that if you have some error when trying to do DB migration, you can stop LND, enable this option, then restart LND using the old KV DB and the partially migrated DB is not used.

@Lymah123
Copy link

Hi @ZZiigguurraatt , can I work on the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour needs triage
Projects
None yet
Development

No branches or pull requests

2 participants