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

Improve StreamingHub's grouping writer #416

Merged
merged 3 commits into from
Mar 22, 2021

Conversation

neuecc
Copy link
Member

@neuecc neuecc commented Mar 21, 2021

When server is under heavy-load, StreamingHub's grouping writer's lock (Group.WriteInAsyncLockVoid) causes a race condition.
AsyncLock(SemaphoreSlim) creates many task-completion linkedlist node, it causes similar to memory leak.
This huge number of locks, the server will not be able to recover even if the high load condition is resolved.

This PR removes AsyncLock and write under Channel.

@neuecc neuecc requested a review from mayuki March 22, 2021 01:31
Copy link
Member

@mayuki mayuki left a comment

Choose a reason for hiding this comment

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

Looks yosasou to me

@mayuki mayuki merged commit c7609f8 into master Mar 22, 2021
@mayuki mayuki deleted the improve-streminghub-performance branch March 22, 2021 06:22
AntonC9018 pushed a commit to AntonC9018/MagicOnion that referenced this pull request Sep 13, 2022
…rmance

Improve StreamingHub's grouping writer
AntonC9018 pushed a commit to AntonC9018/MagicOnion that referenced this pull request Sep 13, 2022
…rmance

Improve StreamingHub's grouping writer
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