[infinispan-dev] Dist.exec failover

Mircea Markus mircea.markus at jboss.com
Tue Oct 23 11:40:11 EDT 2012


On 22 Oct 2012, at 19:48, Vladimir Blagojevic wrote:

> Hey guys,
> 
> Erik noted that we should by default have no failover policy installed 
> rather the default random policy we currently have.
The random policy tries to re-run the task in case of a cluster failure. I imagine the user would do the same, so not sure why not to add it..
Erik, mind comment about the cons of having this failover in place? 
 
> Also he noted that 
> keys are never supplied to failover policy and they might be important 
> when it comes to a deciding where to dispatch the failed over task.
The main reason for passing the keys is in order to calculate the locality of the task based on consistent hash. We don't have a reference to the consistent hash in the DistributedTaskFailoverPolicy, so not sure this would be useful as it is.
> 
> Our current interface is :
> 
> public interface DistributedTaskFailoverPolicy {
> Address failover(Address failedExecution, List<Address> 
> executionCandidates, Exception cause);
> }
> 
> Rather than adding yet another parameter here maybe we should make a 
> simple container class
> 
> public class FailoverContext {
> 
> Address failedExecution;
> List<Address> executionCandidates;
> Exception cause;
> List<Object> inputKeys;
> }
> 
> and have
> 
> 
> public interface DistributedTaskFailoverPolicy {
> Address failover(FailoverContext context);
> }
> 
> WDYT?
> 
> Regards,
> Vladimir
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

Cheers,
-- 
Mircea Markus
Infinispan lead (www.infinispan.org)




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20121023/ff2007c8/attachment.html 


More information about the infinispan-dev mailing list