-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
channeldb+routing+gossiper: add local updates to graph immediately #4964
channeldb+routing+gossiper: add local updates to graph immediately #4964
Conversation
fedac28
to
1b182bf
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.
LGTM 🎉
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.
Did not test, but changes seem straightforward. One nit
batch/interface.go
Outdated
lazy bool | ||
} | ||
|
||
// SchedulerOption is a type that can be can supply options to a scheduled |
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.
can be can
-> can
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.
LGTM 🤽♂️
There appears to be an itest failure related to private channels. |
f3d8d99
to
23f7958
Compare
The flakes seems to just be the same as those seen in master, not clear whether this PR makes it worse. I think we should wait until we have #4953 or similar merged. |
23f7958
to
7993d19
Compare
@halseth are they? I'm seeing blanket failures across all the itests for this PR. |
7993d19
to
cea1b1c
Compare
Yeah, looks like this makes it worse indeed. I still think the root cause is fixed by #4953 though, probably some timing interaction of this PR that makes it more likely to flake. |
cea1b1c
to
5a3e195
Compare
Rebased on #5003 to check travis |
We make the default non-lazy, and will make the incoming gossip requests lazy.
Since the batch interval can potentially be long, adding local updates to the graph could be slow. This would slow down operations like adding our own channel update and announcements during the funding process, and updating edge policies for local channels. Now we instead check whether the update is remote or not, and only for remote updates use the SchedulerOption to lazily add them to the graph.
5a3e195
to
c9afc93
Compare
rebased on master |
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.
LGMTv2
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.
LGTM 🧃
// If this is a remote update, we set the scheduler option to lazily | ||
// add it to the graph. | ||
var schedulerOp []batch.SchedulerOption | ||
if nMsg.isRemote { |
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.
👍
Since the batch interval can potentially be long, adding local updates
to the graph could be slow. This would slow down operations like adding
our own channel update and announcements during the funding process, and
updating edge policies for local channels.
Now we instead check whether the update is remote or not, and use the
SchedulerOption to immediately add local updates to the graph.
Companion PR to #4958