{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/orleans/issues/147","labels_url":"https://api.github.com/repos/dotnet/orleans/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/147/comments","events_url":"https://api.github.com/repos/dotnet/orleans/issues/147/events","html_url":"https://github.com/dotnet/orleans/issues/147","id":58156473,"number":147,"title":"ObserverSubscriptionManager<T>.Notify silently remove an observer when action raise an exception","user":{"login":"jesuspsalas","id":793044,"avatar_url":"https://avatars.githubusercontent.com/u/793044?v=3","gravatar_id":"","url":"https://api.github.com/users/jesuspsalas","html_url":"https://github.com/jesuspsalas","followers_url":"https://api.github.com/users/jesuspsalas/followers","following_url":"https://api.github.com/users/jesuspsalas/following{/other_user}","gists_url":"https://api.github.com/users/jesuspsalas/gists{/gist_id}","starred_url":"https://api.github.com/users/jesuspsalas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesuspsalas/subscriptions","organizations_url":"https://api.github.com/users/jesuspsalas/orgs","repos_url":"https://api.github.com/users/jesuspsalas/repos","events_url":"https://api.github.com/users/jesuspsalas/events{/privacy}","received_events_url":"https://api.github.com/users/jesuspsalas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/orleans/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-19T01:30:22Z","updated_at":"2015-03-26T16:46:14Z","closed_at":"2015-03-26T16:46:14Z","body":"When evaluating the notification action (in the Notify method) if an exception is propagated from the action to orleans code exception is swallow (not logged) and observer is silently removed from observers collection (treat as failed)\r\n\r\nClearly the intention is to allow the notify process to continue for all observers with no disruption however if action evaluation fails is not clear why Orleans should treat the observer as failed.\r\n\r\nProposed fixes:\r\n\r\n1) Log the exception\r\n2) Keep the observer it in the observers list\r\n3) Provide an event handler/callback to manage this situation on grain allowing to eventually chose to set the observer as failed (so Orleans will remove observer from observers collection)\r\n\r\n"}}