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 calculation of age of pending tasks #15995

Merged
merged 1 commit into from Jan 15, 2016

Conversation

Projects
None yet
3 participants
@jasontedor
Copy link
Member

commented Jan 14, 2016

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

}

// package visible for testing
PrioritizedRunnable(Priority priority, LongSupplier relativeTimeProvider) {

This comment has been minimized.

Copy link
@nik9000

nik9000 Jan 14, 2016

Contributor

Could you just take a long here?

This comment has been minimized.

Copy link
@nik9000

nik9000 Jan 14, 2016

Contributor

Ah. I see.

@nik9000

This comment has been minimized.

Copy link
Contributor

commented Jan 14, 2016

LGTM

@bleskes

This comment has been minimized.

Copy link
Member

commented Jan 15, 2016

LGTM2. Good catch.

Fix calculation of age of pending tasks
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

Merge pull request #15995 from jasontedor/prioritized-runnable-age
Fix calculation of age of pending tasks

Closes #15988

@jasontedor jasontedor merged commit aa28133 into elastic:master Jan 15, 2016

1 check passed

CLA Commit author is a member of Elasticsearch
Details

@jasontedor jasontedor deleted the jasontedor:prioritized-runnable-age branch Jan 15, 2016

jasontedor added a commit that referenced this pull request Jan 15, 2016

Fix calculation of age of pending tasks
This commit backports commit aa28133
from master to 2.x.

Relates #15995

jasontedor added a commit that referenced this pull request Jan 15, 2016

Fix calculation of age of pending tasks
This commit backports commit aa28133
from master to 2.2.

Relates #15995

jasontedor added a commit that referenced this pull request Jan 15, 2016

Fix calculation of age of pending tasks
This commit backports commit aa28133
from master to 2.1.

Relates #15995

jasontedor added a commit that referenced this pull request Jan 15, 2016

Fix calculation of age of pending tasks
This commit backports commit aa28133
from master to 2.0.

Relates #15995

jasontedor added a commit that referenced this pull request Jan 17, 2016

Add real clock test for age of PrioritizedRunnable
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
You can’t perform that action at this time.