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

Use task's class name if not a TimedPrioritizeRunnable #11610

Merged
merged 1 commit into from Jun 11, 2015

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Jun 11, 2015

This is helpful to track down the origin of pending_tasks that aren't
expected. In tests we catch this with an assert, but in production
asserts may not be enabled so we should at least add the class name.

@dakrone
Copy link
Member Author

dakrone commented Jun 11, 2015

This is an enhancement, but I'd like to treat it as a bug and backport this as far as possible. Without it, debugging large queue lengths of unknown tasks is very difficult.

@@ -318,7 +318,7 @@ public void run() {
timeInQueue = runnable.timeSinceCreatedInMillis();
} else {
assert false : "expected TimedPrioritizedRunnable got " + task.getClass();
source = "unknown";
source = "unknown: " + task.getClass();
Copy link
Contributor

Choose a reason for hiding this comment

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

how about "unknown [" + task.getClass() + "]" ?

Copy link
Member Author

Choose a reason for hiding this comment

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

+1, sure, will change.

@bleskes
Copy link
Contributor

bleskes commented Jun 11, 2015

LGTM. Left one minor suggestion

@s1monw
Copy link
Contributor

s1monw commented Jun 11, 2015

+1

This is helpful to track down the origin of pending_tasks that aren't
expected. In tests we catch this with an assert, but in production
asserts may not be enabled so we should at least add the class name.
@dakrone dakrone merged commit 483a15a into elastic:master Jun 11, 2015
@kevinkluge kevinkluge removed the review label Jun 11, 2015
@clintongormley clintongormley added :Core/Infra/Logging Log management and logging utilities and removed >enhancement labels Jun 12, 2015
@dakrone dakrone deleted the pending-task-classname branch August 16, 2016 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants