[release-4.21] OCPBUGS-83583: Fix EventOutCh deadlock by making publish non-blocking#665
Conversation
PublishEventViaAPI sends to EventOutCh with a blocking channel send. When ProcessOutChannel (the consumer) is slow due to HTTP POST failures (e.g., unreachable subscribers), the 100-slot buffer fills up and the next publish blocks forever. This deadlocks the processMessages goroutine, freezing socket I/O and causing cloud-event-proxy to hang silently. Fix by using select with default to drop events when the channel is full instead of blocking indefinitely. Dropped events are logged as warnings and counted as failures in metrics. Signed-off-by: Jack Ding <jackding@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-83583, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
This is an automated cherry-pick of #664
/assign jzding