Update versions, and fix concurrent access problem #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We get this exception, and this is why I changed Dictionary to ConcurrentDictionary:
Result StackTrace:
at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at Narochno.Credstash.Configuration.CredstashConfigurationProvider.Load() at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList
1 providers)at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at ...
----- Inner Stack Trace -----
at System.Collections.Generic.Dictionary
2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Narochno.Credstash.Configuration.CredstashConfigurationProvider.SetConfigValueAsync(Dictionary
2 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.