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

Make Message#getStreamIds() more reliable #2378

Merged
merged 1 commit into from Jun 20, 2016

Conversation

Projects
None yet
2 participants
@joschi
Contributor

joschi commented Jun 17, 2016

The Message#getStreamIds() method only checked for the existence of the "streams" message field and returned it. This only works for messages which have already been indexed and have that field.

For messages in-flight, the method always returned an empty list, even if StreamMatcherFilter had run before.

This commit extends Message#getStreamIds() to also query the internal "streams" list which is being populated by the StreamMatcherFilter if the "streams" message field doesn't exist.

Make Message#getStreamIds() more reliable
The getStreamIds() method only checked for the existence of the "streams" message field
and returned it. This only works for messages which have already been indexed and have
that field.

For messages in-flight, the method always returned an empty list, even if StreamMatcherFilter
had run before.

This commit extends getStreamIds() to also query the internal "streams" list which is
being populated by the StreamMatcherFilter if the "streams" message field doesn't exist.

@joschi joschi added this to the 2.0.3 milestone Jun 17, 2016

@joschi

This comment has been minimized.

Contributor

joschi commented Jun 17, 2016

This should also be ported into the master branch.

@dennisoelkers dennisoelkers self-assigned this Jun 20, 2016

@dennisoelkers dennisoelkers merged commit 1aa96fa into 2.0 Jun 20, 2016

4 checks passed

ci-server-integration Jenkins build graylog2-server-integration-pr 1000 has succeeded
Details
ci-web-linter Jenkins build graylog-pr-linter-check 486 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

@dennisoelkers dennisoelkers deleted the message-getStreamIds branch Jun 20, 2016

dennisoelkers added a commit that referenced this pull request Jun 20, 2016

Make Message#getStreamIds() more reliable (#2378)
The getStreamIds() method only checked for the existence of the "streams" message field
and returned it. This only works for messages which have already been indexed and have
that field.

For messages in-flight, the method always returned an empty list, even if StreamMatcherFilter
had run before.

This commit extends getStreamIds() to also query the internal "streams" list which is
being populated by the StreamMatcherFilter if the "streams" message field doesn't exist.
(cherry picked from commit 1aa96fa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment