2

Improve shutdown speed during initialization by Smjert · Pull Request #7106 · os...

 2 years ago
source link: https://github.com/osquery/osquery/pull/7106
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Copy link

Member

Smjert commented on May 14, 2021

Interrupt the extension plugin initialization retry loop
as soon as the request to shutdown is received.
Also attempt to avoid doing any additional work along the path
of initialization.

Related to #7068

Copy link

Member

theopolis commented on May 23, 2021

What about focusing on the Initializer::start method itself as the place where shutdownRequested is checked before each step? I think that is easier to understand, when any new initialization work done there, that should also perform a check.

For example, instead of checking shutdownRequested in Registry::setUp, we check within Initializer::start before calling Registry::setUp.

@@ -224,6 +225,10 @@ std::string RegistryFactory::getActive(const std::string& registry_name) const {

}

void RegistryFactory::setUp() {

if (shutdownRequested()) {

@@ -427,6 +428,10 @@ void EventFactory::delay() {

return;

}

if (shutdownRequested()) {

Could you combine this check and the check in attachEvents into a single check within Initializer::start?

Smjert

merged commit 5abaa76 into

osquery:master on May 26, 2021

11 checks passed

Smjert

deleted the stefano/improvement/init-respect-shutdown branch

7 months ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK