-
Notifications
You must be signed in to change notification settings - Fork 2.2k
docs: added a user guide for db migration #10315
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
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @saubyk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new user guide for LND node operators, outlining a strategic two-stage database migration process. The guide facilitates the transition from the existing bbolt key-value store to more scalable and performant SQLite or PostgreSQL backends. It details how to first migrate to a SQL-based key-value database and then incrementally move specific LND subsystems to a fully relational database structure, aiming to resolve performance bottlenecks and enhance operational efficiency. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a comprehensive user guide for LND's database migration process. The guide is well-structured and provides valuable information for node operators planning to migrate from bbolt to a SQL backend. My review focuses on improving clarity and consistency within the document. I've pointed out a couple of typos, a grammatical issue, and some inconsistencies regarding the availability of the SQLite migration script that could confuse users. I've also suggested a minor rephrasing for better formality. Overall, this is a great addition to the documentation.
9032c0b to
82dfbc4
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a comprehensive user guide for the LND database migration process. The guide is well-structured and covers the two-stage migration from bbolt to SQL backends. My review includes a few suggestions to improve clarity, fix a broken link, and address minor formatting issues to enhance the quality of the documentation.
82dfbc4 to
0ab4460
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new user guide for database migration in LND. The guide is well-structured and provides valuable information for node operators. I've added a few comments to improve clarity, consistency, and correctness of the examples provided.
f38a352 to
f795e44
Compare
f795e44 to
6465792
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice write up 🙏 a few comments
| ## Known Limitations and Edge Cases | ||
|
|
||
| - **Single database engine required**: LND requires a single consistent backend. | ||
| You cannot run invoices in relational mode while payments remain in kvdb *unless* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use a real example like invoices & graph (since the reference to payments would at this stage be confusing)
| | Postgres | Mediocre | No | ✅ | | ||
| | SQLite | Good | **Yes (future)** | ✅ | | ||
|
|
||
| > 💡 **Recommendation**: Unless you require Postgres for infrastructure reasons, **migrate to SQLite kvdb** as your interim backend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although, there is no current planned migration between the two.. so it isnt really an interim rn
| ### Backup and Validation | ||
|
|
||
| 1. Stop LND. | ||
| 2. Backup entire `~/.lnd/` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we actually recommend this? is it not dangerous to have 2 copies of channel.db lying around? cause what if we later startup pointing to the wrong one than then broadcast invalid states?
Change Description
Added a user guide for database migration journey on LND.
This guide would be updated as LND data stores are incrementally migrated to relational database.