{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/aspnet-redis-providers/issues/80","repository_url":"https://api.github.com/repos/Azure/aspnet-redis-providers","labels_url":"https://api.github.com/repos/Azure/aspnet-redis-providers/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/Azure/aspnet-redis-providers/issues/80/comments","events_url":"https://api.github.com/repos/Azure/aspnet-redis-providers/issues/80/events","html_url":"https://github.com/Azure/aspnet-redis-providers/issues/80","id":246301295,"number":80,"title":"Provider throws InvalidOperationException at random timing","user":{"login":"shibayan","id":1356444,"avatar_url":"https://avatars1.githubusercontent.com/u/1356444?v=4","gravatar_id":"","url":"https://api.github.com/users/shibayan","html_url":"https://github.com/shibayan","followers_url":"https://api.github.com/users/shibayan/followers","following_url":"https://api.github.com/users/shibayan/following{/other_user}","gists_url":"https://api.github.com/users/shibayan/gists{/gist_id}","starred_url":"https://api.github.com/users/shibayan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shibayan/subscriptions","organizations_url":"https://api.github.com/users/shibayan/orgs","repos_url":"https://api.github.com/users/shibayan/repos","events_url":"https://api.github.com/users/shibayan/events{/privacy}","received_events_url":"https://api.github.com/users/shibayan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-07-28T09:54:49Z","updated_at":"2018-04-10T00:03:50Z","closed_at":null,"author_association":"NONE","body":"When reading / writing load is applied, the following error is output at random timing.\r\n\r\n```\r\nException information:\r\n\r\n    Exception type: InvalidOperationException\r\n\r\n    Exception message: Collection was modified; enumeration operation may not execute.\r\n   at System.Collections.Generic.HashSet`1.Enumerator.MoveNext()\r\n   at Microsoft.Web.Redis.RedisUtility.AppendUpdatedOrNewItemsInList(ChangeTrackingSessionStateItemCollection sessionItems, List`1 list) in D:\\BuildAgent\\work\\f55792526e6d9089\\src\\Shared\\RedisUtility.cs:line 55\r\n   at Microsoft.Web.Redis.RedisConnectionWrapper.TryUpdateIfLockIdMatchPrepare(Object lockId, ISessionStateItemCollection data, Int32 sessionTimeout, String[]& keyArgs, Object[]& valueArgs) in D:\\BuildAgent\\work\\f55792526e6d9089\\src\\RedisSessionStateProvider\\RedisConnectionWrapper.cs:line 326\r\n   at Microsoft.Web.Redis.RedisConnectionWrapper.TryUpdateAndReleaseLockIfLockIdMatch(Object lockId, ISessionStateItemCollection data, Int32 sessionTimeout) in D:\\BuildAgent\\work\\f55792526e6d9089\\src\\RedisSessionStateProvider\\RedisConnectionWrapper.cs:line 353\r\n   at Microsoft.Web.Redis.RedisSessionStateProvider.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) in D:\\BuildAgent\\work\\f55792526e6d9089\\src\\RedisSessionStateProvider\\RedisSessionStateProvider.cs:line 414\r\n   at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)\r\n   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()\r\n   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)\r\n```"},"comment":{"url":"https://api.github.com/repos/Azure/aspnet-redis-providers/issues/comments/379930397","html_url":"https://github.com/Azure/aspnet-redis-providers/issues/80#issuecomment-379930397","issue_url":"https://api.github.com/repos/Azure/aspnet-redis-providers/issues/80","id":379930397,"user":{"login":"SiddharthChatrolaMs","id":8050630,"avatar_url":"https://avatars1.githubusercontent.com/u/8050630?v=4","gravatar_id":"","url":"https://api.github.com/users/SiddharthChatrolaMs","html_url":"https://github.com/SiddharthChatrolaMs","followers_url":"https://api.github.com/users/SiddharthChatrolaMs/followers","following_url":"https://api.github.com/users/SiddharthChatrolaMs/following{/other_user}","gists_url":"https://api.github.com/users/SiddharthChatrolaMs/gists{/gist_id}","starred_url":"https://api.github.com/users/SiddharthChatrolaMs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiddharthChatrolaMs/subscriptions","organizations_url":"https://api.github.com/users/SiddharthChatrolaMs/orgs","repos_url":"https://api.github.com/users/SiddharthChatrolaMs/repos","events_url":"https://api.github.com/users/SiddharthChatrolaMs/events{/privacy}","received_events_url":"https://api.github.com/users/SiddharthChatrolaMs/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T00:03:50Z","updated_at":"2018-04-10T00:03:50Z","author_association":"CONTRIBUTOR","body":"@woric @shibayan @JonCole \r\n\r\nI think I have found the issue. RedisUtility.AppendUpdatedOrNewItemsInList is trying to get modified value and to do that it is iteration over ModifiedKeys and fetching the value of each such modified keys. \r\n\r\nCode to fetch value also touches the ModifiedKeys which causes this. I will try to fix this and release new package in next few days."}}
{"actor":{"display_login":"SiddharthChatrolaMs"}}