orleans icon indicating copy to clipboard operation
orleans copied to clipboard

StreamSubscriptionManager Throws ArgumentException when StreamIdentifier has null namespace

Open gavinjensen opened this issue 8 years ago • 2 comments

@jason-bragg @xiazen The StreamSubscription manager's GetSubscriptions method throws a ArgumentException when the namespace of the StreamIdentity is null for the StreamIdentitiy that is passed into the method.

Steps to reproduce the problem: In a IBootstrapProvider's init method do the following.

IStreamSubscriptionManager subscriptionManager = providerRuntime.ServiceProvider.GetService<IStreamSubscriptionManagerAdmin>()
                    .GetStreamSubscriptionManager(StreamSubscriptionManagerType.ExplicitSubscribeOnly);
var streamIdentity = new StreamIdentity(context.GetStreamId(), "sinkhost");
var currentSubscriptions = await subscriptionManager.GetSubscriptions(context.GetStreamProviderName(), streamIdentity);
The Exception:
System.AggregateException occurred
  HResult=0x80131500
  Message=One or more errors occurred.
  Source=mscorlib
  StackTrace:
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Orleans.Streams.Core.StreamSubscriptionManager.<>c.<GetSubscriptions>b__5_0(Task`1 subs)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
...

Inner Exception 1:
ArgumentException: The stream ID doesn't have an associated namespace.
Parameter name: streamId

gavinjensen avatar Dec 21 '17 22:12 gavinjensen

Thanks for reporting, we will fix it and include it in our next release

xiazen avatar Dec 22 '17 00:12 xiazen

fixed by #3843

xiazen avatar Jan 09 '18 23:01 xiazen