Giter Club home page Giter Club logo

Comments (5)

novakzaballa avatar novakzaballa commented on July 20, 2024 1

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.

novakzaballa avatar novakzaballa commented on July 20, 2024

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.

ivastokic avatar ivastokic commented on July 20, 2024

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.

MaximTkachenko avatar MaximTkachenko commented on July 20, 2024

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 inside FlagsmithClient is used as a sigleton too
  • inside AnalyticsProcessor you use plain dictionary for feature usage tracking without any synchronization and periodically you call Clear for this dictionary

So you read and modify this dictionary concurrently without any protection. I made a screenshot from the decompiled code:
image

from flagsmith-dotnet-client.

novakzaballa avatar novakzaballa commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.