I wanted to say that at one point we were using call timers in one of the implementations that were batted around, and we decided that they wouldn't work or would be too costly, but I can't find any evidence of it in the PRs.
In any case, it's more consistent with the design as described, so if it's doable it should be done. +1 - Brian On Saturday, March 22, 2014 6:55:55 AM UTC-4, Patrik Nordwall wrote: > > > > > On Fri, Mar 21, 2014 at 8:26 PM, <[email protected] <javascript:>> wrote: > >> Thanks for the quick reply Patrik, >> >> I've created the ticket here: >> https://www.assembla.com/spaces/akka/tickets/3950#/activity/ticket: >> >> Thank you > > >> -Will >> >> >> On Friday, March 21, 2014 4:16:31 AM UTC-5, Patrik Nordwall wrote: >> >>> Hi Will, >>> >>> >>> On Fri, Mar 21, 2014 at 4:19 AM, <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> I have a question about the Circuit Breaker's behaviour, specifically >>>> how the callTimeout parameter interacts with failures being counted >>>> >>>> It seems that the Circuit Breaker doesn't register a failure until the >>>> call is completed, rather than when the call takes longer than the >>>> callTimeout duration. I'm wondering if this is the intended behaviour. >>>> >>>> val breaker = >>>> new CircuitBreaker(context.system.scheduler, >>>> maxFailures = 1, >>>> callTimeout = 1.seconds, >>>> resetTimeout = 10.seconds).onOpen(log.debug("onOpen")) >>>> >>>> breaker.withCircuitBreaker( >>>> Future { >>>> Thread.sleep(10000) //10 seconds >>>> } >>>> ) >>>> >>>> In the code above, the Circuit Breaker won't register a failure, and >>>> transition to the open state, until the call is finished(10 seconds), >>>> rather than when the call surpasses the callTimeout duration(1 second). >>>> I'm >>>> wondering if this is the intended behaviour, as I assumed that it would >>>> register a failure as soon as the call surpasses the callTimeout duration. >>>> >>> >>> Good point. That would require scheduling a timeout for each call, but >>> that is probably what it should do. Please open a >>> ticket<http://doc.akka.io/docs/akka/current/project/issue-tracking.html> >>> . >>> >>> Thanks, >>> Patrik >>> >>> >>>> >>>> -Will >>>> >>>> -- >>>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/ >>>> current/additional/faq.html >>>> >>>>>>>>>> Search the archives: https://groups.google.com/ >>>> group/akka-user >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Akka User List" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> >>>> Visit this group at http://groups.google.com/group/akka-user. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> >>> Patrik Nordwall >>> Typesafe <http://typesafe.com/> - Reactive apps on the JVM >>> Twitter: @patriknw >>> >>> -- >> >>>>>>>>>> Read the docs: http://akka.io/docs/ >> >>>>>>>>>> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user >> --- >> You received this message because you are subscribed to the Google Groups >> "Akka User List" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > > Patrik Nordwall > Typesafe <http://typesafe.com/> - Reactive apps on the JVM > Twitter: @patriknw > > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
