Skip to content
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

contractcourt: modify the incoming contest resolver to use concurrent… #8024

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

Roasbeef
Copy link
Member

… queue

In this commit, we modify the incoming contest resolver to use a concurrent queue. This is meant to ensure that the invoice registry subscription loop never blocks. This change is meant to be minimal and implements option 5 as outlined here:
#8023.

With this change, the inner loop of the subscription dispatch method in the invoice registry will no longer block, as the concurrent queue uses a fixed buffer of a queue, then overflows into another queue when that gets full.

Fixes #7917

Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

One question about when to stop the queue, otherwise looks good.
Might also want to add release notes.

contractcourt/htlc_incoming_contest_resolver.go Outdated Show resolved Hide resolved
… queue

In this commit, we modify the incoming contest resolver to use a
concurrent queue. This is meant to ensure that the invoice registry
subscription loop never blocks. This change is meant to be minimal and
implements option `5` as outlined here:
lightningnetwork#8023.

With this change, the inner loop of the subscription dispatch method in
the invoice registry will no longer block, as the concurrent queue uses
a fixed buffer of a queue, then overflows into another queue when that
gets full.

Fixes lightningnetwork#7917
Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link
Collaborator

@yyforyongyu yyforyongyu left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! LGTM⛵️

@guggero guggero added this pull request to the merge queue Sep 26, 2023
@guggero guggero removed this pull request from the merge queue due to a manual request Sep 26, 2023
@Roasbeef Roasbeef modified the milestones: v0.17.1, v0.17.0 Sep 26, 2023
@guggero guggero merged commit 3821baa into lightningnetwork:master Sep 26, 2023
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: LND can't connect to peers/channels, sync to chain is lost
4 participants