[
https://issues.apache.org/jira/browse/YUNIKORN-3364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109581#comment-18109581
]
Dale Richardson commented on YUNIKORN-3364:
-------------------------------------------
Heads-up for #1133: the forwarder has a second bare {{consumer <- event}}
inside its main loop (currently {{event_streaming.go:127}}), reachable in
production via the slow-consumer eviction path, and
{{TestEventStreaming_SlowConsumer}} still leaks under goleak after #1135
because of it. Filed as YUNIKORN-3436 with the same {{select}} fix. If it's
convenient to cover both sends in #1133 that would let the
{{CreateEventStream}} goleak exemption go in one step; otherwise 3436 stands on
its own.
> Event stream history replay blocks forever if the client disconnects before
> the stream opens with a non-zero history request
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: YUNIKORN-3364
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3364
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: core - scheduler
> Reporter: Dale Richardson
> Assignee: weichen lai
> Priority: Minor
> Labels: newbie, pull-request-available
>
> {{EventStreaming.CreateEventStream}} replays the event history to a new
> consumer with a bare blocking send ({{{}consumer <- event{}}}) *outside* the
> forwarder's select ({{{}event_streaming.go{}}}, the history-replay loop at
> stream open). If the requesting client closes the connection before the
> stream is really started, and it requested a non-zero history (not the
> default), that push blocks with no stop channel reachable: the forwarder
> goroutine, its consumer buffer and its {{seen}} map are pinned for the life
> of the process. Confirmed by the maintainer on PR #1124.
> Proposed fix: make the history-replay send selectable so
> {{{}stop{}}}/{{{}e.stopCh{}}} can reach it:
> {code:java}
> select {
> case consumer <- event:
> case <-stop:
> close(consumer)
> return
> case <-e.stopCh:
> close(consumer)
> return
> }
> {code}
> Then delete the {{events.(*EventStreaming).CreateEventStream}} exemption in
> {{{}pkg/common/leakcheck/leakcheck.go{}}}.
> Note: a second, test-only cause shares the same top frame (a test that
> creates a stream and never calls {{{}RemoveStream{}}}); it is tracked
> separately as the stream test-hygiene follow-up.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]