-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Milestone
Description
Should we consider adding a WithCircuitBreaker<TState,TResult>
overload to the circuit breakers to get rid of an allocation here? (Pass this
and message
in, get vaue of readHighestSequenceNrFrom
inside the function:)
var highSequenceNr = await _breaker.WithCircuitBreaker((this,message),(state) =>
ReadHighestSequenceNrAsync(message.PersistenceId, Math.Max(0L, message.FromSequenceNr - 1)));
That should? actually also get rid of one local on top of the closure allocation in question.
OTOH, this is the read side, which isn't as hot as the write side.
Originally posted by @to11mtm in #5505 (comment)