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

shared_client: fix fail-safe mechanism #15

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

bimmlerd
Copy link
Member

If a shared client exchange fell into the fail-safe timeout of one minute, but the handler loop (due to either an error, closing or a very delayed response) would write to the now reader-less channel, it would block all future progress of this shared client. Prevent that from happening by buffering the channel for the one message it will receive.

Fixes: 4e6b438 (shared client: add fail-safe mechanism for stuck requests.)

If a shared client exchange fell into the fail-safe timeout of one
minute, but the handler loop (due to either an error, closing or a
_very_ delayed response) would write to the now reader-less channel, it
would block all future progress of this shared client. Prevent that from
happening by buffering the channel for the one message it will receive.

Fixes: 4e6b438 (shared client: add fail-safe mechanism for stuck requests.)

Signed-off-by: David Bimmler <[email protected]>
Copy link

@marseel marseel left a comment

Choose a reason for hiding this comment

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

Thanks 😮‍💨

@aanm aanm merged commit 9e187d7 into cilium:master Oct 28, 2024
2 checks passed
bimmlerd added a commit to bimmlerd/cilium that referenced this pull request Oct 28, 2024
If a shared client exchange fell into the fail-safe timeout of one
minute, but the handler loop (due to either an error, closing or a
_very_ delayed response) would write to the now reader-less channel, it
would block all future progress of this shared client. Prevent that from
happening by buffering the channel for the one message it will receive.

The corresponding, backportable change cilium/dns is cilium/dns#15.

Signed-off-by: David Bimmler <[email protected]>
@bimmlerd bimmlerd deleted the pr/bimmlerd/fix-stuck-shared-client branch October 28, 2024 11:10
github-merge-queue bot pushed a commit to cilium/cilium that referenced this pull request Oct 29, 2024
If a shared client exchange fell into the fail-safe timeout of one
minute, but the handler loop (due to either an error, closing or a
_very_ delayed response) would write to the now reader-less channel, it
would block all future progress of this shared client. Prevent that from
happening by buffering the channel for the one message it will receive.

The corresponding, backportable change cilium/dns is cilium/dns#15.

Signed-off-by: David Bimmler <[email protected]>
joamaki pushed a commit to cilium/cilium that referenced this pull request Nov 5, 2024
[ upstream commit 392821c ]

If a shared client exchange fell into the fail-safe timeout of one
minute, but the handler loop (due to either an error, closing or a
_very_ delayed response) would write to the now reader-less channel, it
would block all future progress of this shared client. Prevent that from
happening by buffering the channel for the one message it will receive.

The corresponding, backportable change cilium/dns is cilium/dns#15.

Signed-off-by: David Bimmler <[email protected]>
Signed-off-by: Jussi Maki <[email protected]>
github-merge-queue bot pushed a commit to cilium/cilium that referenced this pull request Nov 7, 2024
[ upstream commit 392821c ]

If a shared client exchange fell into the fail-safe timeout of one
minute, but the handler loop (due to either an error, closing or a
_very_ delayed response) would write to the now reader-less channel, it
would block all future progress of this shared client. Prevent that from
happening by buffering the channel for the one message it will receive.

The corresponding, backportable change cilium/dns is cilium/dns#15.

Signed-off-by: David Bimmler <[email protected]>
Signed-off-by: Jussi Maki <[email protected]>
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.

3 participants