-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[master] Make reactor engine less blocking the EventPublisher #66158
[master] Make reactor engine less blocking the EventPublisher #66158
Conversation
329a4c4
to
abaf59c
Compare
This change needs tests and a changelog. |
abaf59c
to
c1dba43
Compare
@whytewolf sorry, I've missed the notification. Not sure about the test is it good enough, but the idea is to move the process to the separate thread as soon as possible. |
c1dba43
to
9d78994
Compare
@vzhestkov hey there. unfortunately i don't really do much with salt anymore. I left the core team. I am tagging @dwoz in reviewing this. |
Seems this change has some negative effect in combination with |
What does this PR do?
The
reactor
engine in some cases could cause blocking on reading the events from EventPublisher so it has to hold the events until they will be retrived by the engine.This change improves the way of handling the events by the
reactor
engine by pushing more work to the thread pool which is already available inside the engine, in this case more work is handled with the distinct thread instead of performing this work with the main thread of thereactor
engine.Previous Behavior
In some cases could cause some growth of the memory consumption with
EventPublisher
as it has to hold the events to be consumed by the stream fromreactor
engine.New Behavior
The events from the stream from
EventPublisher
are handled faster.Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes/No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.