prabhatbhattarai / project-voldemort

Automatically exported from code.google.com/p/project-voldemort
Apache License 2.0
0 stars 0 forks source link

Scheduled jobs fail with no exception #193

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The background scheduler attempts to add an uncaught exception handler to
the the thread factory, but this does not seem to log exceptions. Likewise
overriding afterExecute() and checking for an exception does not seem to work.

To reproduce this just create a job that fails with an exception.

Original issue reported on code.google.com by jay.kr...@gmail.com on 14 Jan 2010 at 7:20

GoogleCodeExporter commented 8 years ago
I was able to use the suggestions here...

    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6459119

...to get a stack trace like this to be logged...

    [2010-02-16 23:50:29,470 voldemort.server.scheduler.SchedulerService] ERROR Error
thrown by scheduled job 
    java.lang.RuntimeException: Error on purpose
        at voldemort.server.scheduler.SlopPusherJob.run(SlopPusherJob.java:56)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(
ScheduledThreadPoolExecutor.java:98)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Schedul
edThreadPoolExecutor.java:207)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
86)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

Please take a look at the attached diff and let me know if it's correct.

Thanks.

Original comment by kirktrue.im@gmail.com on 17 Feb 2010 at 7:56

Attachments:

GoogleCodeExporter commented 8 years ago
Jay, are you working on this?

Original comment by kirktrue.im@gmail.com on 18 Nov 2010 at 7:03