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

Fix BufferedTask initial stream #6991

Merged
merged 1 commit into from
Mar 1, 2023
Merged

Conversation

Qwerty5Uiop
Copy link
Collaborator

@Qwerty5Uiop Qwerty5Uiop commented Feb 28, 2023

Resolves #6988
Related to #6951

Motivation

Currently, BufferedTask executes initial stream every time the flush is called. And, since it's working via Task.Supervisor.async, it may cause large amount of fetcher's init execution at the same time (especially if init stream executes complicated query) and therefore it may load database dramatically.

Changelog

Added a guard for BufferedTask initial stream so it won't execute fetcher's init until the previous one is done.

@Qwerty5Uiop Qwerty5Uiop force-pushed the fix-buffered-task-initial-stream branch from cd6945d to 357239a Compare February 28, 2023 10:19
@vbaranov vbaranov merged commit 314b843 into master Mar 1, 2023
@vbaranov vbaranov deleted the fix-buffered-task-initial-stream branch March 1, 2023 20:04
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.

Token instances fetcher causes high loading of DB
2 participants