river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patricia Shanahan <p...@acm.org>
Subject Re: TaskManager requirements
Date Tue, 13 Jul 2010 17:03:12 GMT
Greg Trasuk wrote:
> What would you propose to do in case of a "catastrophic" Throwable? 
> System.exit()?  Is that up to TaskManager to decide? Again, I'd say if
> the task author has some reasonable action in mind, let them catch the
> Throwable and take their action.

I'll keep the current functionality for now. It does allow maximum 
flexibility to task authors. However, I reserve my question about the 
issue as a matter for task authors - the ones I have read so far do not 
catch Throwable in their run methods.

Several customers have, over the years, beat into my head the 
understanding that a crash is better than a wrong answer. That is 
particularly the case for a redundant service.

Meanwhile, I have a question about a related issue. If a Task runAfter 
method throws anything it is logged and TaskManager acts as though 
runAfter had returned false, indicating no dependencies.

That is the high performance but high functional risk option. It may 
create low frequency, hard to reproduce, timing bugs, my least favorite 
type of bug.

An alternative would be to make the task wait for completion of all 
older tasks. That is worse performance but much safer.



View raw message