Skip to content

Race conditions when updating guage value #29

@mariuszwojcik

Description

@mariuszwojcik

Hi Luke,

I was looking at Gauge implementation as we want to use statsd.net in our applications, and noticed that there is no guarantee of processing messages in order. When running LogMultipleValuesFromOneGauge_OneGraphiteLine_Success test I noticed that it fails most of the time. Further code analysis shows that gauge updates are processed asynchronously on multiple threads allowing for gauge being set to other value than last update.

The easy solution will be to set MaxDegreeOfParallelism on gauge's ActionBlock to 1, but that will have an impact on general performance. Any thoughts on better approach?

Regards,

Mariusz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions