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

receive: implement worker architecture #76

Merged
merged 2 commits into from
Jan 5, 2024
Merged

Conversation

GiedriusS
Copy link
Collaborator

Instead of spawning a goroutine for each individual remote write gRPC request, spawn a fixed number of them and send work over channels.

Instead of spawning a goroutine for each individual remote write gRPC
request, spawn a fixed number of them and send work over channels.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Comment on lines 1247 to 1250
if err != nil {
w.errResult = &err
}
w.wg.Done()
Copy link

@krisleipus krisleipus Jan 5, 2024

Choose a reason for hiding this comment

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

Maybe chan err for response would be more correct than writing to pointer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think there would be any difference but maybe with channels the code would be more Go-like. Let me make the change

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
@GiedriusS GiedriusS merged commit dc60d10 into 0.32.0+vinted Jan 5, 2024
6 of 8 checks passed
@GiedriusS GiedriusS deleted the receive_workers branch January 5, 2024 12:41
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.

4 participants