Skip to content

[sql-69] multi: improve kvdb migration progress logging#1301

Merged
ViktorT-11 merged 1 commit into
lightninglabs:masterfrom
ViktorT-11:2026-05-improve-migration-progress-logging
May 19, 2026
Merged

[sql-69] multi: improve kvdb migration progress logging#1301
ViktorT-11 merged 1 commit into
lightninglabs:masterfrom
ViktorT-11:2026-05-improve-migration-progress-logging

Conversation

@ViktorT-11
Copy link
Copy Markdown
Contributor

This PR adds clearer progress logging across the KVDB to SQL migration paths for accounts, sessions, and firewalldb.

We try to log the total number of items to migrate for the different stores where it is cheap to determine up front, and emit progress updates every 100 migrated items.

@ViktorT-11 ViktorT-11 marked this pull request as ready for review May 8, 2026 16:34
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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 enhances the observability of the KVDB to SQL migration process. By introducing structured progress logging and reporting total item counts for accounts, sessions, and firewall database entries, it allows operators to better monitor the status and completion of data migrations.

Highlights

  • Improved Migration Logging: Added progress logging for KVDB to SQL migrations across accounts, sessions, and firewalldb stores.
  • Progress Tracking: Implemented periodic progress updates every 100 items migrated to provide better visibility during long-running migration tasks.
  • Total Count Reporting: Added initial collection logging to report the total number of items to be migrated before the process begins.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. 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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a 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 progress logging for several SQL migration processes, including accounts, firewall database entries, privacy mapper rows, actions, and sessions. It establishes a consistent logging interval and updates migration functions to track and report the number of migrated items. A review comment suggests ensuring that the final log message for the privacy mapper migration accurately reflects the total number of rows migrated rather than the number of session groups.

Comment thread firewalldb/sql_migration.go
@ViktorT-11 ViktorT-11 force-pushed the 2026-05-improve-migration-progress-logging branch from 7d9fa11 to 1eac12e Compare May 11, 2026 10:40
@ViktorT-11 ViktorT-11 requested a review from bitromortac May 11, 2026 10:41
@ViktorT-11 ViktorT-11 changed the title multi: improve kvdb migration progress logging [sql-69] multi: improve kvdb migration progress logging May 11, 2026
Copy link
Copy Markdown
Contributor

@bitromortac bitromortac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

Add clearer progress logging across the KVDB to SQL migration paths
for accounts, sessions, and firewalldb.

Log the total number of items to migrate where it is cheap to
determine up front, and emit progress updates every 100 migrated
items.
@ViktorT-11 ViktorT-11 force-pushed the 2026-05-improve-migration-progress-logging branch from 1eac12e to 2f5de80 Compare May 19, 2026 09:23
@ViktorT-11 ViktorT-11 changed the base branch from sql-migration-base to master May 19, 2026 09:23
@ViktorT-11
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a 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 progress logging for various KV to SQL migration processes, including accounts, firewall database entries, privacy mapper rows, actions, and sessions. By adding a constant interval for logging and tracking the migration count, the system now provides better visibility into long-running migration tasks. I have no feedback to provide as there were no review comments.

@ViktorT-11 ViktorT-11 merged commit 0f31fb5 into lightninglabs:master May 19, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants