intelsdi-x / snap-plugin-collector-interface

Collects network interface metrics from /proc/interface
http://snap-telemetry.io/
Apache License 2.0
1 stars 13 forks source link

Potential thread safety issue during initialisation of plugin #16

Closed obourdon closed 7 years ago

obourdon commented 8 years ago

Snap version (use snapctl -v): ANY Environment:

Potential thread safety issue during initialisation of plugin

Looking at a PR which has been integrated earlier for the SMART plugin, and more specifically at commit bf7c332 and commit dada577 which have been added to comply with @lmroz comment r73497782, the same code should be integrated into interface collector plugin

katarzyna-z commented 7 years ago

@obourdon Thank you for reporting this issue. It should be carefully investigated.

IzabellaRaulin commented 7 years ago

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 tasks.

There is also an issue to provide Init() once function behavior to plugin lib to make easier manage initialization in plugins which require that - 👉 https://github.com/intelsdi-x/snap-plugin-lib-go/issues/79

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.