-
Notifications
You must be signed in to change notification settings - Fork 200
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 #40, move threader shutdown after all work has completed #42
Conversation
The threader shutdown is where it was because there is a dependency between the vm metrics and the vm perf counters (it assumes self._labels is populated already). So this is probably introducing a non deterministic race 😞 |
Ohhh... I see it now. Well, looks like using the threader after it was already shutdown is causing some issues. Perhaps the dependency can be more explicitly defined? maybe using separate execute contexts? |
Ahh! Because you can’t submit jobs after shutdown is called! Of course! Well I can probably get rid of the nested threads all together with a property collector (it can fetch all data for all hosts and data stores in one call). Will try and look at doing that. |
@dannyk81 I don't want to close this just yet. This might be the immediate fix, but not the log term solution. |
I think that this PR is unsafe, and is trading one race for another. After this PR is merged the extra code that runs early depends on self._labels. That structure is generated on a thread. The current way ensures that structure is populated before the code that uses it runs. The new way allows it to run before it exists. |
@pryorda I didn't see the issue that pushing down the shutdown was creating, but this fix as-is creates another problem. I suggest to close this and work on a fix which will reconcile both races properly. |
We should able to force a thread completion before moving on. I think you're right in saying that maybe we should remove some of the nested threading |
I suggest we close this one and discuss this over in #40 |
@pryorda @Jc2k this fixes #40 for me
please take a look