-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[draft] graph/db+sqldb: graph store SQL implementation + migration #9932
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
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
So that we can use it in our SQLStore implementation too without needing to fetch the entire ChannelEdgePolicy.
Note that this table will only contain entries for channels that we have deleted from the `channels` table which is why we cannot use foreign keys. Similarly, we may no longer have node entries for the nodes in the table.
Here we implement the SQLStore methods: - MarkEdgeZombie - MarkEdgeLive - IsZombieEdge - NumZombies These will be tested in the next commit as one more method implementation is required.
This lets us run TestGraphZombieIndex against the SQL backends.
And run `TestEdgeInsertionDeletion` against our SQL backends.
And run `TestEdgeInfoUpdates` against our SQL backends.
Which lets us then run `TestFilterKnownChanIDsZombieRevival` and `TestFilterKnownChanIDs` against our SQL backends.
Which lets us run `TestFilterChannelRange` against our SQL backends.
Which lets us run `TestNodeIsPublic` against our SQL DB backends. Note that we need to tweak the tests a little bit so that `AddLightningNode` for the same node is always called with a newer LastUpdate time else it will fail the SQL constraint that only allows the upsert if the update is newer than the persisted one.
Which lets us run `TestDisabledChannelIDs` against our SQL DB backends.
Define the schema for the prune log.
Which lets us run `TestChannelEdgePruningUpdateIndexDeletion` against our SQL backends.
Which lets us run `TestGraphPruning` and `TestBatchedAddChannelEdge` against our SQL backends.
Which lets us run `TestDisconnectBlockAtHeight` and `TestStressTestChannelGraphAPI` against our SQL backends.
Just to be very sure that we don't miss a valid ID.
And delete the old MakeTestGraph function
closing this now as all the sub PRs have been merged. |
This is a draft PR that includes all the commits necessary to complete #9795.
This is just for demonstration purposes and to give reviewers the full picture if it perhaps
helps them with review of the smaller PRs which will be syphoned off from this one.
Fixes #9795