-
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
graph: ensure topology subscriber handling and network msg handling is synchronous #9515
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 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
This reverts commit d757b3b.
d56c368
to
f39a004
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, thank your for the quick fix! 🥇
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.
🌹
We want to ensure that when a caller cancels a topology subscription, then any channel/node updates after that are not notified on the subscription. To ensure this, we make the Cancel function blocking.
In #9476, we removed announcement update handling (
case update := <-b.networkUpdates:
) from the mainnetworkHander
loop since the handling of any updates was immediately spun off into a goroutine anyways.However, this did serve some purpose because it ensured that if we did the following:
then
case ntfnUpdate := <-b.ntfnClientUpdates:
would be hit first ensuring that the<-b.networkUpdates
case could not be triggered. Then by the time the update is handled, when it went to notify subscribers, the subscriber would have already been removed from the set of clients.The same type of thing can happen if a new topology subscriber is registered and very soon thereafter an update arrives. In this case, a notification might be missed.
So this PR just reverts this change.
Fixes #9514
part of #9494