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

(SDI-1827) Fix #1128 Loading collector twice causes task failure #1281

Closed
wants to merge 1 commit into from

Conversation

marcin-krolik
Copy link
Collaborator

@marcin-krolik marcin-krolik commented Oct 13, 2016

Fixes #1128

Summary of changes:

  • after plugin response is received, additional check added to look if plugin already exists in loaded plugins table

Testing done:

  • small
  • legacy

@intelsdi-x/snap-maintainers

@IRCody
Copy link
Contributor

IRCody commented Oct 13, 2016

Are you able to reproduce the issue from #1128 on master? I tried again just now and wasn't able to. Curious what steps I might be missing, can you provide the steps so I can properly test the PR?

@marcin-krolik
Copy link
Collaborator Author

@IRCody I can't reproduce this issue either on current master or on df51bec which is the last commit before the issue was reported. Weird ...

@IRCody
Copy link
Contributor

IRCody commented Oct 14, 2016

I was able to repro it at the time so that is very weird. I don't feel confident merging this fix though if we can't reproduce the original error and verify it's fixed.

@nanliu nanliu changed the title (SDI-1827): Fix #1128 Loading collector twice causes task failure (SDI-1827) Fix #1128 Loading collector twice causes task failure Oct 14, 2016
@marcin-krolik
Copy link
Collaborator Author

@IRCody I got your point, but at the same time if plugin is already loaded, this change helps to stop loading early, right after response is received.

@IRCody
Copy link
Contributor

IRCody commented Oct 17, 2016

@marcin-krolik: I think we still need to track down why we can't reproduce the issue and find out what's going on.

@marcin-krolik
Copy link
Collaborator Author

marcin-krolik commented Oct 20, 2016

@IRCody I used git bisect to track down the issue. This is quite messy, because at that time we were working on simplification of interaction between scheduler and control, and there are Matuesz's commits, mine and Joel's and it is hard to track it, but here is what I found:

  • Last commit with issue reproducible 3e91e77
  • Next commit is Matuesz commit and I could not compile snap with it
  • Following commit has this issue resolved 2afb26b

@IRCody
Copy link
Contributor

IRCody commented Oct 20, 2016

@marcin-krolik: Thanks for tracking it down. Do you think this PR is still needed? Is the advantage that it would fail earlier?

@jcooklin
Copy link
Collaborator

jcooklin commented Oct 20, 2016

After subscription groups was landed this issue was avoided because we get the loaded plugin through the pluginManager here.

The fact that metricType has a reference to a loaded plugin that can potentially be invalid is still a problem and should be fixed.

@marcin-krolik What do you think about changing the type of metricType.Plugin from *loadedPlugin to core.CatalogedPlugin. This will remove the the fact that the catalog has a reference to an invalid loadedPlugin (invalid in the sense that the path to the plugin is wrong). Your fix avoids hitting this with an invalid loadedPlugin but it might be cleaner to not store a reference to the loadedPlugin in the metricCatalog.

@marcin-krolik
Copy link
Collaborator Author

@jcooklin I like this idea. I'm going to start working on it.

@IRCody
Copy link
Contributor

IRCody commented Oct 21, 2016

@marcin-krolik: I'm going to go ahead and close this PR. Feel free to re-open this one when you're ready for a review.

@IRCody IRCody closed this Oct 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants