Concurrency issue with TimeZoneConverter
See original GitHub issueVersion
4.19.2
Describe the bug
Intermittently we are seeing a concurrency issue when trying to use date based adaptive functions.
It seems to stem from concurrent access of static dictionaries in TimeZoneConverter
.
To Reproduce
To reproduce you can follow the following steps. Note step 3 is not easy to reproduce and requires some load:
- Having a bot using the adaptive function
convertFromUTC
in the first turn. e.g.=float(formatDateTime(convertFromUTC(utcNow(), 'Eastern Standard Time'), 'HH'))
- Then restarting the process hosting the bot code
- Having concurrent requests hit our bot which both cause the static dictionaries in
TimeZoneConverter
to be initialized - causing the error below which stops the bot from functioning:
System.InvalidOperationException
AdaptiveExpressions.TimeZoneConverter.LoadData
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.
Expected behavior
The dictionary access in TimeZoneConverter
should be thread-safe.
Screenshots
N/A
Additional context
N/A
Issue Analytics
- State:
- Created 7 months ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
TimeZoneNotFoundException in Alpine Based Docker Images
My problems began whilst working on a multi-tenant event processing microservice. The service processes some messages from an AWS SQS queue, ...
Read more >SQL Server 2016 concurrency limitations? Tuning for db ...
The only issue is that there is no internal context connection available in the static class constructor, so the Assembly will need to...
Read more >slack-timezone-converter/Gemfile.lock at master
An integration for Slack that converts any time string in a message to all timezones where the team is - slack-timezone-converter/Gemfile.lock at master ......
Read more >Handling Concurrency Conflicts - EF Core
This page discusses mechanisms for ensuring that your data stays consistent in the face of such concurrent changes.
Read more >asp net timezone dropdown list
The TimeStamp attribute is used to specify that a property should take part in concurrency management.. The TimeStamp attribute is only valid if...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks team for prioritising this. I will keep an eye out for the new release Monday
@robertcox-msft It will be available on NuGet within minutes of the release. We will do a Release on GitHub. Anyone watching the repo will get notified. We don’t have any other mechanism to notify.
It won’t be until Monday at the earliest though.