Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update versions, and fix concurrent access problem #22

Merged
merged 1 commit into from
Aug 17, 2018

Conversation

Meister1977
Copy link
Contributor

We get this exception, and this is why I changed Dictionary to ConcurrentDictionary:

Result StackTrace:
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at Narochno.Credstash.Configuration.CredstashConfigurationProvider.Load() at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at ...

----- Inner Stack Trace -----
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Narochno.Credstash.Configuration.CredstashConfigurationProvider.SetConfigValueAsync(Dictionary2 data, String entry)
at Narochno.Credstash.Configuration.CredstashConfigurationProvider.<>c__DisplayClass6_0.<b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Narochno.Credstash.Configuration.ParallelExtensions.<>c__DisplayClass0_1`1.<b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Narochno.Credstash.Configuration.CredstashConfigurationProvider.LoadAsync()
Result Message:
System.AggregateException : One or more errors occurred. (Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.)
---- System.InvalidOperationException : Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.

Copy link
Member

@adamhathcock adamhathcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I should have caught that the first time around.

@adamhathcock adamhathcock merged commit 7f3c3a3 into Narochno:master Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants