Skip to content

fix: remove closeChannelWhenEmpty busy loop#2594

Merged
tedim52 merged 13 commits intomainfrom
tedi/perf
Nov 10, 2024
Merged

fix: remove closeChannelWhenEmpty busy loop#2594
tedim52 merged 13 commits intomainfrom
tedi/perf

Conversation

@tedim52
Copy link
Copy Markdown
Collaborator

@tedim52 tedim52 commented Nov 7, 2024

Description

Addresses #2593 by getting rid of the busy loop entirely. The loop was checking to make sure all values from the channel were read before closing the channel. When following logs, if a stream is cancelled before reading all logs in the channel, it loops infinitely. This changes the consumer to loop until it's read everything from the channel, even after its been closed.

Also, adds a port for pprof to help with profiling in the future.

Is this change user facing?

YES

References

#2593

Copy link
Copy Markdown
Collaborator

@praetoriansentry praetoriansentry left a comment

Choose a reason for hiding this comment

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

Looks good to me.

The only minor comment I would have is that adding an additional HTTP server and port might be unnecessary. The pprof endpoints can be handled over port 9711 as well if that's preferable. That being said, a dedicated pprof port is a bit clearer for someone just running docker ps and seeing which ports are mapped.

@tedim52
Copy link
Copy Markdown
Collaborator Author

tedim52 commented Nov 10, 2024

good point, would prefer kurtosis engine to not take up another port if it doesn't need to so I'll remove 6060

@tedim52 tedim52 enabled auto-merge November 10, 2024 00:13
@tedim52 tedim52 added this pull request to the merge queue Nov 10, 2024
@tedim52 tedim52 removed this pull request from the merge queue due to a manual request Nov 10, 2024
@tedim52 tedim52 enabled auto-merge November 10, 2024 00:46
@tedim52 tedim52 added this pull request to the merge queue Nov 10, 2024
Merged via the queue into main with commit dbb2193 Nov 10, 2024
@tedim52 tedim52 deleted the tedi/perf branch November 10, 2024 01:09
github-merge-queue Bot pushed a commit that referenced this pull request Nov 19, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.4.2](v1.4.1...1.4.2)
(2024-11-10)


### Bug Fixes

* don't include component name in release please tags
([#2590](#2590))
([28582cc](28582cc))
* make releases work again without v in tags
([#2586](#2586))
([a87f945](a87f945))
* remove closeChannelWhenEmpty busy loop
([#2594](#2594))
([dbb2193](dbb2193))
* wrong config structure for release please
([#2588](#2588))
([e7263c3](e7263c3))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: kurtosisbot <kurtosisbot@users.noreply.github.com>
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.

2 participants