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

Run scheduled flushes in background #2281

Merged
merged 1 commit into from
Jan 23, 2017
Merged

Run scheduled flushes in background #2281

merged 1 commit into from
Jan 23, 2017

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented Jan 17, 2017

doing this unblocks incoming metrics while waiting for a flush to take
place.

we have to create a semaphore so that we can
'skip' flushes that try to run while a flush is already running.

closes #2262

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

<-semaphore
default:
// skipping this flush because one is already happening
log.Println("D! Skipping a scheduled flush because there is" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be better as a warning. If the flush operation is taking so long that it's overlapping into the next flush, then the admin should investigate. Either their flush interval is too short, or something is causing a slow down.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, I'll make it a warning

doing this unblocks incoming metrics while waiting for a flush to take
place.

we have to create a semaphore so that we can
'skip' flushes that try to run while a flush is already running.

closes #2262
@sparrc sparrc merged commit 6df3f0f into master Jan 23, 2017
@sparrc sparrc deleted the cs2262 branch January 24, 2017 04:58
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.

Flush jitter causes input collection to freeze
2 participants