Comments (5)
While I was not able to reproduce the issue with functional tests, or automatic tests using the SDK main functions, I was able to systematically replicate the issue accessing directly the TrackFeature
method of the AnalycticsProcessor
class and I put a fix in place in the above PR, which is ready for review now. I will update this thread as soon as we have the fix merged.
from flagsmith-dotnet-client.
Hi @ivastokic. Could you please provide us with more information? For example:
Are you using .Net Core or .Net Framework? Which version?
Also, from the info and context provided, it looks like a safe thread issue, however, it is hard to say the root cause or recommend a solution without more context. Can you generate a minimal project reproducing the issue and your current configuration?
from flagsmith-dotnet-client.
Hi, it is .NET Core app, but is it also hard to reproduce it from out side. The change with introducing enableAnalytics
ON, on registering FlagsmithClient
was introduced in October 2023, and worked well so far, even when this occurred, it fail on only one of pods, fine on others. We will turn off analytics for now.
from flagsmith-dotnet-client.
It looks like you have a thread sefety issue inside AnalyticsProcessor
:
- according to your documentation
FlagsmithClient
is used as a sigleton - it means that
AnalyticsProcessor
created insideFlagsmithClient
is used as a sigleton too - inside
AnalyticsProcessor
you use plain dictionary for feature usage tracking without any synchronization and periodically you callClear
for this dictionary
So you read and modify this dictionary concurrently without any protection. I made a screenshot from the decompiled code:
from flagsmith-dotnet-client.
Thank you @MaximTkachenko and sorry about the late reply! We will take a look into this issue soon.
In the mean time if you prefer you can submit a PR and We'll get that merged for you ASAP.
from flagsmith-dotnet-client.
Related Issues (18)
- HttpClient is intended to be instantiated once and re-used throughout the life of an application HOT 1
- When identity is specified a redundant slash character is added in the end HOT 2
- Caching does not implement a max size HOT 7
- API is using deprecated endpoint HOT 1
- Implement SDK-side Caching HOT 7
- Don't log errors using Console.WriteLine HOT 3
- Can't install SDK on new projects HOT 6
- FlagsmithClient's interface was completely changed HOT 2
- When called consecutively, HasFeatureFlag method gets an error on the second run HOT 8
- using .NET client SDK always return "Value cannot be null. Parameter name: value" error HOT 12
- MV evaluation is not consistent with API in local evaluation mode HOT 1
- Not getting flags after hitting request second time from method GetIdentityFlags HOT 5
- Flagsmith open feature provider HOT 1
- Question: DI registration example HOT 1
- Question: Cancellation token for async methods HOT 2
- Identity overrides in local evaluation mode
- Fix package validation errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flagsmith-dotnet-client.