Implicit stream subscription dies on network partition
Hi,
We're experiencing a problem during a network partition. Some (not all) implicit subscribed grains stop processing new messages.
We're seeing this exception in the log, not sure if it's related..
Trying to send a message Request S10.0.0.4:20015:239358855-> #196448: on a silo not from within grain and not from within system target (RuntimeContext is not set to SchedulingContext) RuntimeContext.Current=null TaskScheduler.Current=Orleans.Runtime.Scheduler.OrleansTaskScheduler
System.InvalidOperationException:
at Orleans.Runtime.InsideRuntimeClient.SendRequestMessage (OrleansRuntime, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null)
at Orleans.Runtime.GrainReference.InvokeMethod_Impl (Orleans, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null)
at Orleans.Runtime.GrainReference.InvokeMethodAsync (Orleans, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null)
at Orleans.Streams.OrleansCodeGenStreamQueueBalanceListenerReference.QueueDistributionChangeNotification (Orleans, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null)
at Orleans.Streams.ConsistentRingQueueBalancer.RangeChangeNotification (OrleansRuntime, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null)
at Orleans.Runtime.ConsistentRing.EquallyDividedRangeRingProvider.RangeChangeNotification (OrleansRuntime, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null)
When we restart the silo with the halted subscription, the queued messages are processed.
We're using orleans 1.5.1 on ServiceFabric and the Azure Queue stream provider
Some (not all) implicit subscribed grains stop processing new messages.
Does this grains still receive messages from their stream, just stop processing them? or they stopped receive messages?
Just to confirm, this 'halted subscription' behavior keep happening after the network partition is restored?
I can't say for sure. The grain is not processing any messages, but resumes processing queued messages in the stream after restarting the faulty silo.
During the network partition, it's possible that consumer grains stop processing messages because pulling agent and some consumer grains are in different silos, hence messaging between the two parties are interrupted by network partition, which caused pulling agent failed delivering messages to some consumers. This will create the impression of consumer stopped processing messages. But the actual fact maybe consumer stopped receiving messages. Does this guess match what you have seen?
To verify this guess, try look at PersistentStreamPullingAgent logs and see if there's any exception related to message delivery.
Does this keep happening after you fixed the network partition?
Looks as if it's the same issue that https://github.com/dotnet/orleans/pull/3256 is trying to address.
@xiazen what you describe seems to be happening, after fixing the partition the processing is resumed.
@rikbosch Can we close this then?
🖒