Skip to content

[sql-35]: firewalldb+rpcserver: refactor ListActions #1068

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

Merged
merged 1 commit into from
May 9, 2025

Conversation

ellemouton
Copy link
Member

Here we move the filter logic behind the method so that our sql implementation of ListActions can make use of indexes later on instead of how it is done in the bbolt where the filters are applied in memory.

This is quite a big diff in a single commit - so I'm just dedicating this PR to the single commit to help with review load.

@ellemouton ellemouton self-assigned this May 8, 2025
@ellemouton ellemouton added no-changelog This PR is does not require a release notes entry sql-ize labels May 8, 2025
Copy link
Contributor

@ViktorTigerstrom ViktorTigerstrom left a comment

Choose a reason for hiding this comment

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

Nice, LGTM 🚀!

Comment on lines 201 to 204
// ListActions returns a list of Actions that pass the filterFn requirements.
// The indexOffset and maxNum params can be used to control the number of
// actions returned. The return values are the list of actions, the last index
// and the total count (iff query.CountTotal is set).
Copy link
Member Author

Choose a reason for hiding this comment

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

oops - noticed the duplicate comment now. Will remove after final review round

Copy link
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.

Really nice change, LGTM 🎉

Here we move the filter logic behind the interface so that our sql
implementation can make use of indexes.
@ellemouton ellemouton merged commit 9b3349b into lightninglabs:master May 9, 2025
22 checks passed
@ellemouton ellemouton deleted the sql35 branch May 9, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog This PR is does not require a release notes entry sql-ize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants