sql partial refresh support#8914
Open
rustyrussell wants to merge 9 commits intoElementsProject:masterfrom
Open
sql partial refresh support#8914rustyrussell wants to merge 9 commits intoElementsProject:masterfrom
rustyrussell wants to merge 9 commits intoElementsProject:masterfrom
Conversation
1. Refresh time would say "dont refresh if it's only this old" but better is to simply make refresh more efficient, which we've done and continue to do. 2. time_msec could be used in two places, but floating point suffices. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This is trivial now, as the invoice table gets reloaded every time, but is an important check as we improve the implementation. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
It's a "have we initialized the table" flag, and we're going to use it for more than setting up the indices, so rename it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We can actually just make struct table_desc non-const where required, and hand its var directly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We now always watch for deleted/created/updated, and keep multiple flags and indices (though we don't use them yet!). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We're going to need this once we start using `wait updated` to track these. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
The current variable name is confusing, since it's an INSERT! This becomes more noticible in the next patch, where we add a delete statement. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…ndex values. This will let us (efficiently) delete a single entry, so we can wean tables with created_index off the default "delete all and reload" behavior. Change insert_stmt to a const, too (and use a temporary when we're building it). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
For these, when things change, we simply delete amd recreate the changed entries. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: Plugins: `sql` plugin tables "htlcs", "forwards", "invoices", "sendpays" and "networkevents" are now updated more efficiently.
faa785e to
e3859eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #8841
This properly adds wait support to all supported tables (ie. all list commands which support indexing) in the sql plugin. It's a little tricky, so we do this in easy stages.
The final result is far more optimal for queries to those tables.