Saga exceptions

62 views
Skip to first unread message

Sadprofessor

unread,
Nov 11, 2015, 6:29:58 AM11/11/15
to masstransit-discuss
Hey,

Should I be worried by excessive occurrences of the below in my logs:

08:22:06 - Error - An exception was thrown preparing the message consumers System.InvalidOperationException: Sequence contains no elements
   at
System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at MassTransit.Util.IndexedSagaProperty`
2.get_Item(Object key) in z:\Builds\work\4ed32a1c3fc3f594\src\MassTransit\Util\IndexedSagaProperty.cs:line 102
   at
MassTransit.Util.IndexedSagaDictionary`1.get_Item(Guid sagaId) in z:\Builds\work\4ed32a1c3fc3f594\src\MassTransit\Util\IndexedSagaDictionary.cs:line 45
   at MassTransit.Saga.InMemorySagaRepository`
1.<GetSaga>d__a`1.MoveNext() in z:\Builds\work\4ed32a1c3fc3f594\src\MassTransit\Saga\InMemorySagaRepository.cs:line 44
   at Automatonymous.AutomatonymousStateMachineSagaRepository`
1.<GetSaga>d__a`1.MoveNext()
   at MassTransit.Saga.Pipeline.SagaMessageSinkBase`
2.<Enumerate>d__0.MoveNext() in z:\Builds\work\4ed32a1c3fc3f594\src\MassTransit\Saga\Pipeline\SagaMessageSinkBase.cs:line 43
   at
System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`
2.MoveNext()
   at
System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at MassTransit.Context.ServiceBusReceiveContext.<ReceiveFromEndpoint>b__0(IReceiveContext context) in z:\Builds\work\4ed32a1c3fc3f594\src\MassTransit\Context\ServiceBusReceiveContext.cs:line 102
   at MassTransit.Transports.Endpoint.<>c__DisplayClassd.<Receive>b__5(IReceiveContext acceptContext) in z:\Builds\work\4ed32a1c3fc3f594\src\MassTransit\Transports\Endpoint.cs:line 282    at

We create lots of short lived sagas and I imagine this error is happening because a message is coming back after the saga has been cleaned up (maybe, that's a guess). Should I be worried? This is MT2 btw

Cheers,
Tom

Sadprofessor

unread,
Nov 17, 2015, 10:22:11 AM11/17/15
to masstransit-discuss

Bump :-)

Chris Patterson

unread,
Nov 17, 2015, 11:06:40 AM11/17/15
to masstrans...@googlegroups.com
Are you correlating on something other than the CorrelationId? I think so, based on the error, and it's not finding it.

You are using InMemory in production or just in unit tests?



Bump :-)
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/2f96dd46-1c1a-4427-88f1-92b48c847d6a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Sadprofessor

unread,
Nov 20, 2015, 5:32:57 AM11/20/15
to masstransit-discuss
Hey,

No it's a CorrelationId correlation. So it seems to happen when a saga is cancelled mid way through (on purpose, this is quite common to avoid doing unnecessary work in our domain) and a message already in flight comes back once the saga has been finalized. 

Looks like the IndexedSagaProperty leaves empty hashsets hanging around for a key. I've changed it to remove the hashset entirely when removing the last item and that seemed to fix it.

Are you still planning on releasing new versions of MT2, is it worth me pushing this?

Cheers,
Tom

Bump :-)
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.

To post to this group, send email to masstrans...@googlegroups.com.

Chris Patterson

unread,
Nov 20, 2015, 9:42:40 AM11/20/15
to masstrans...@googlegroups.com
Oh yes. MassTransit v2 will still be patched for fixes and such. And pull requests will be reviewed and pulled as well. 

__
Chris Patterson




To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.

To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages