Skip to content
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

Update gopsutil dependency #1234

Merged
merged 1 commit into from
May 20, 2016
Merged

Update gopsutil dependency #1234

merged 1 commit into from
May 20, 2016

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented May 19, 2016

Required for all PRs:

  • CHANGELOG.md updated
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

closes #1233

@sparrc sparrc merged commit 56aee1c into master May 20, 2016
@sparrc sparrc deleted the cs1233 branch May 20, 2016 14:41
@damm damm mentioned this pull request Jun 30, 2016
@popey popey mentioned this pull request Sep 13, 2021
3 tasks
howardyoo added a commit to howardyoo/telegraf that referenced this pull request Oct 1, 2021
input plugin would fail (and result in seg fault) because there was no check to see if newStat.Metrics.Repl.Network.GetMores was nil or not. Added a checking so that the assignment would happen only when newStat.Metrics.Repl.Network.GetMores is not nil.

### Required for all PRs:

<!-- Complete the tasks in the following list. Change [ ] to [x] to
show completion. -->

- [ ] Updated associated README.md.
- [ ] Wrote appropriate unit tests.
- [x] Pull request title or commits are in [conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/#summary) (e.g. feat: or fix:)

<!-- Link to issues that describe the need for the change. Issues
should include context that will help reviewers understand why the
change is needed.

Make sure to link issues and using a keyword like "resolves influxdata#1234".
https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->

resolves influxdata#9845

<!-- Finally, include a summary of the code change itself. This
description should tell reviewers how the issues were resolved.
example: Added an input plugin to gather yak shaving metrics using
golang library yaktech/shaver. -->

This code change will make sure to check the newStat.Metrics.Repl.Network.GetMores is not null, before performing any access to its underlying variables. This will prevent the mongodb plugin from resulting into segmentation violation that the issue influxdata#9845 reported.

```
if newStat.Metrics.Repl.Network.GetMores != nil {
					returnVal.ReplNetworkGetmoresNum = newStat.Metrics.Repl.Network.GetMores.Num
					returnVal.ReplNetworkGetmoresTotalMillis = newStat.Metrics.Repl.Network.GetMores.TotalMillis
				}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update gopsutil dependency
1 participant