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

Add support for updating extractors in InputService #3910

Merged
merged 2 commits into from Jun 22, 2017

Conversation

Projects
None yet
2 participants
@joschi
Contributor

joschi commented Jun 13, 2017

Instead of calling InputService#deleteExtractor() followed by InputService#addExtractor(),
which also emits the InputUpdated event twice, the InputService#updateExtractor() method
replaces the extractor in the embedded document in the "inputs" collection in MongoDB and
only emits the InputUpdated event once, which hopefully resolves the race condition described
in #3903.

Fixes #3903

@joschi joschi added this to the 2.3.0 milestone Jun 13, 2017

@bernd bernd self-assigned this Jun 21, 2017

@bernd

I think we should have the #updateExtractor() method, that's fine. In addition, I think we should introduce a ExtractorUpdated event type. There is no reason to restart the input just because we updated an extractor. The ExtractorFilter should then listen on that new event.

joschi added some commits Jun 13, 2017

Add support for updating extractors in InputService
Instead of calling `InputService#deleteExtractor()` followed by `InputService#addExtractor()`,
which also emits the `InputUpdated` event twice, the `InputService#updateExtractor()` method
replaces the extractir un the  embedded document in the "inputs" collection in MongoDB and
only emits the `InputUpdated` event once, which hopefully resolves the race condition described
in #3903.

Fixes #3903

@joschi joschi force-pushed the issue-3903 branch from dce4be1 to 2f855c6 Jun 21, 2017

@bernd

bernd approved these changes Jun 22, 2017

LGTM 👍

@bernd bernd merged commit b9c7910 into master Jun 22, 2017

4 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 1766 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
graylog-project/pr Jenkins build graylog-project-pr-snapshot 261 has succeeded
Details

@bernd bernd deleted the issue-3903 branch Jun 22, 2017

@bernd bernd removed the ready-for-review label Jun 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment