Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Snap plugin thread safety during initialization of plugins #1449

Closed
8 tasks done
nanliu opened this issue Dec 20, 2016 · 2 comments
Closed
8 tasks done

Snap plugin thread safety during initialization of plugins #1449

nanliu opened this issue Dec 20, 2016 · 2 comments

Comments

@lmroz
Copy link
Contributor

lmroz commented Apr 3, 2017

This list might be not valid, because most (if not all) of these plugins use ConcurrencyCount = 1. Some are using this value from very beginning, but for some that was added during development, even for smart intelsdi-x/snap-plugin-collector-smart@63ee15e#diff-65647fbc09fddf28c78c248603ed1656L45
This commit sets ConcurrencyCount to 1 which makes the issue I reported originally perhaps inexistent (I haven't expected that plugin's Meta changed).

That's of course if there is no way that single workflow will make overlapping CollectMetrics call, but I don't know if there any circumstances that might happen.

Moreover, I've seen code of some of these plugins (i.e. processes) and there is no issue regardless of ConcurrencyCount value, because no struct variables (changed during callback) exists.

@IzabellaRaulin
Copy link
Contributor

This plugin uses sticky routing strategy, so concurrency count is set to 1, what means there is no possibilities to use a single plugin instance by two or more tasks.

Based on above, I will close this issue. Of course, please do not hesitate to re-open if you notice that this issue is still valid in some circumstances. Thank You.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants