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

Improve search histogram resolution auto selection #2289

Merged
merged 1 commit into from May 26, 2016

Conversation

Projects
None yet
2 participants
@edmundoa
Member

edmundoa commented May 26, 2016

This PR improves the way we auto calculate the histogram resolution on searches over all messages, by:

  • Calculate the search duration from the oldest index we have (before we ordered the indices the other way around)
  • Take into account that sometimes the deflector index may not have proper index ranges, and they default to 1 Jan 1970. In that case we try to get the search duration from the second oldest index (which would be, in fact the oldest one). In case there aren't any more indices available, we assume the search duration is immediate, so we will effectively use the "minute" resolution on the histogram.

This also applies to field charts, so please also take a little time looking that they work as expected.

The changes should go into master as well.

Fixes #2148

Improve search histogram resolution auto selection
This commit improves the way we auto calculate the histogram selection
on searches over all messages:

- Fix ordering of indices, so we actually get the oldest one as we
  intended
- Take into account that under some circumstances the deflector index
  does not have proper index ranges, and they default to 1 Jan 1970

Fixes #2148

@edmundoa edmundoa added this to the 2.0.2 milestone May 26, 2016

@kroepke kroepke self-assigned this May 26, 2016

@kroepke

This comment has been minimized.

Member

kroepke commented May 26, 2016

lgtm, also tested with just one (deflector) index, works as expected. new field graphs use the same resolution

@kroepke kroepke merged commit dbccec2 into 2.0 May 26, 2016

4 checks passed

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

@kroepke kroepke deleted the issue-2148 branch May 26, 2016

kroepke added a commit that referenced this pull request May 26, 2016

Improve search histogram resolution auto selection (#2289)
This commit improves the way we auto calculate the histogram selection
on searches over all messages:

- Fix ordering of indices, so we actually get the oldest one as we
  intended
- Take into account that under some circumstances the deflector index
  does not have proper index ranges, and they default to 1 Jan 1970

Fixes #2148
(cherry picked from commit dbccec2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment