Skip to content

Conversation

@jasontedor
Copy link
Member

This commit addresses a time unit conversion bug in calculating the age
of a PrioritizedRunnable. The issue was an incorrect conversion from
nanoseconds to milliseconds as instead the conversion was to
microseconds. This leads to the timeInQueue metric for pending tasks to
be off by three orders of magnitude.

Closes #15988

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just take a long here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I see.

@nik9000
Copy link
Member

nik9000 commented Jan 14, 2016

LGTM

@bleskes
Copy link
Contributor

bleskes commented Jan 15, 2016

LGTM2. Good catch.

This commit addresses a time unit conversion bug in calculating the age
of a PrioritizedRunnable. The issue was an incorrect conversion from
nanoseconds to milliseconds as instead the conversion was to
microseconds. This leads to the timeInQueue metric for pending tasks to
be off by three orders of magnitude.
@jasontedor jasontedor removed the review label Jan 15, 2016
jasontedor added a commit that referenced this pull request Jan 15, 2016
Fix calculation of age of pending tasks

Closes #15988
@jasontedor jasontedor merged commit aa28133 into elastic:master Jan 15, 2016
@jasontedor jasontedor deleted the prioritized-runnable-age branch January 15, 2016 13:01
jasontedor added a commit that referenced this pull request Jan 15, 2016
This commit backports commit aa28133
from master to 2.x.

Relates #15995
jasontedor added a commit that referenced this pull request Jan 15, 2016
This commit backports commit aa28133
from master to 2.2.

Relates #15995
jasontedor added a commit that referenced this pull request Jan 15, 2016
This commit backports commit aa28133
from master to 2.1.

Relates #15995
jasontedor added a commit that referenced this pull request Jan 15, 2016
This commit backports commit aa28133
from master to 2.0.

Relates #15995
jasontedor added a commit that referenced this pull request Jan 17, 2016
This commit adds a test for calculating the age of PrioritizedRunnable
that allows real clock time to elapse. The test ensures that at least
one millisecond has passed, and that the resolution of System#nanoTime
on the underlying system is actually able to detect this.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants