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

ExponentiallyDecayingReservoir stops registering updates #793

Closed
sotodel opened this issue May 6, 2015 · 3 comments
Closed

ExponentiallyDecayingReservoir stops registering updates #793

sotodel opened this issue May 6, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@sotodel
Copy link

sotodel commented May 6, 2015

In ExponentiallyDecayingReservoir, if enough time has passed since you created it (~13+ hours), the weight calculation https://github.com/dropwizard/metrics/blob/master/metrics-core/src/main/java/com/codahale/metrics/ExponentiallyDecayingReservoir.java#L97 returns Double.Infinity, causing priority to be also Double.Infinity, causing collisions in the Map and therefore no new updates (assuming newCount > size).

update calls are therefore almost no-op. They only increment the count.

We originally noticed this in the .NET port https://github.com/danielcrenna/metrics-net/issues/45.

@ryantenney ryantenney self-assigned this May 7, 2015
@ryantenney ryantenney added the bug label May 7, 2015
@ryantenney ryantenney added this to the 3.1.3 milestone May 7, 2015
@nickbabcock
Copy link
Contributor

Does longPeriodsOfInactivityShouldNotCorruptSamplingState test not cover this concern?

@ryantenney
Copy link
Contributor

You're right, it does.

@arteam
Copy link
Member

arteam commented Jan 5, 2017

Should be fixed by #1033

@arteam arteam closed this as completed Jan 5, 2017
@arteam arteam modified the milestones: 3.2.0, 3.1.3 Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants