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

Fix entry count metric for lookup caches #4558

Merged
merged 1 commit into from Feb 2, 2018
Merged

Fix entry count metric for lookup caches #4558

merged 1 commit into from Feb 2, 2018

Conversation

@joschi
Copy link
Contributor

@joschi joschi commented Feb 2, 2018

  • Fix entry count metric for lookup caches

The way the LookupCache#entryCount() method was defined, caused implementers to write incorrect implementations.

For example GuavaLookupCache#entryCount() returned a constant Gauge<Long> on the first call (in the constructor
of LookupCache) which was never updated.

Additionally, the CacheTableEntry tried to access the entry count metric through an invalid object path which
resulted in the metric always being displayed as "NaN" in the web interface.

Fixes #4540

  • Make entry count Gauge compatible with Graylog 2.4.x

Refs #4499

Refs #4541
(cherry picked from commit 0ddbeac)

* Fix entry count metric for lookup caches

The way the `LookupCache#entryCount()` method was defined, caused implementers to write incorrect implementations.

For example `GuavaLookupCache#entryCount()` returned a constant `Gauge<Long>` on the first call (in the constructor
of `LookupCache`) which was never updated.

Additionally, the `CacheTableEntry` tried to access the entry count metric through an invalid object path which
resulted in the metric always being displayed as "NaN" in the web interface.

Fixes #4540

* Make entry count Gauge compatible with Graylog 2.4.x

Refs #4499

Refs #4541
(cherry picked from commit 0ddbeac)
@joschi joschi added this to the 2.4.4 milestone Feb 2, 2018
@ghost ghost assigned joschi Feb 2, 2018
@bernd bernd self-assigned this Feb 2, 2018
@bernd
bernd approved these changes Feb 2, 2018
@bernd bernd merged commit 1f4bcbd into 2.4 Feb 2, 2018
2 of 5 checks passed
2 of 5 checks passed
@garybot2
ci-web-linter Jenkins build graylog-pr-linter-check 2240 has failed
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@garybot2
graylog-project/pr Jenkins build graylog-project-pr-snapshot 983 has succeeded
Details
license/cla Contributor License Agreement is signed.
Details
@ghost ghost removed the ready-for-review label Feb 2, 2018
@bernd bernd deleted the issue-4540-2.4 branch Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants