-
Notifications
You must be signed in to change notification settings - Fork 912
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
broken database #4363
Comments
That error seems to indicate that you have a row with a NULL The statement is executed here: Lines 2222 to 2240 in fac8882
It is being accessed here: Line 2067 in fac8882
All codepaths touching the table set the field, except the insert statement in Lines 1893 to 1905 in fac8882
|
We fix it twice: once when accessing the field, and a second time by inserting the default value `0` on insert. The latter is likely to be preferred, but the latter former is also need to fix existing wallets. Fixes: ElementsProject#4363 Reported-by: Zoltán Gálli <@gallizoltan> Changelog-Fixed: db: Fixed an access to a NULL-field in the `channel_htlcs` table and resulting warning.
We fix it twice: once when accessing the field, and a second time by inserting the default value `0` on insert. The latter is likely to be preferred, but the latter former is also need to fix existing wallets. Fixes: ElementsProject#4363 Reported-by: Zoltán Gálli <@gallizoltan> Changelog-Fixed: db: Fixed an access to a NULL-field in the `channel_htlcs` table and resulting warning.
This ensures that after the migration in the previous commit we never insert a new htlc with a null value. Fixes: ElementsProject#4363 Reported-by: Zoltán Gálli <@gallizoltan> Changelog-Fixed: db: Fixed an access to a NULL-field in the `channel_htlcs` table and resulting warning.
This ensures that after the migration in the previous commit we never insert a new htlc with a null value. Fixes: ElementsProject#4363 Reported-by: Zoltán Gálli <@gallizoltan> Changelog-Fixed: db: Fixed an access to a NULL-field in the `channel_htlcs` table and resulting warning.
This ensures that after the migration in the previous commit we never insert a new htlc with a null value. Fixes: #4363 Reported-by: Zoltán Gálli <@gallizoltan> Changelog-Fixed: db: Fixed an access to a NULL-field in the `channel_htlcs` table and resulting warning.
This ensures that after the migration in the previous commit we never insert a new htlc with a null value. Fixes: ElementsProject#4363 Reported-by: Zoltán Gálli <@gallizoltan> Changelog-Fixed: db: Fixed an access to a NULL-field in the `channel_htlcs` table and resulting warning.
I've just updated to v0.10.0 and everything looks good! There is no more broken database message. Thank you very much! 😎 |
Issue and Steps to Reproduce
Every time I start
lightningd
, I see a**BROKEN** database
message in the log.Actually everything works fine, but I worry about that message.
TBH it is not a new thing. I checked my logs, and its first appearance was in December 2019, when I upgraded to
v0.8.0
. Since then, it is in the log at every start.getinfo
outputThe text was updated successfully, but these errors were encountered: