Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3128

Use Interlocker.CompareExchange in the ServerMonitor in the same way as in Server

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Connectivity
    • None

    Description

      As part of CSHARP-3057, we added a `ServerDescription` to `Server.cs`. The `SetDescription` method was initially modeled after the one we use in `ServerMonitor` but due to concerns about race conditions, we ended using a different pattern.

      I've included a screenshot of the linked explanation due to the tendency of that PR to display a Unicorn error. Given the default heartbeat interval, this race condition isn't likely to occur IMHO, but updating the code to use the pattern we now use in `Server.SetDescription` would prevent it altogether.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            vincent.kam@mongodb.com Vincent Kam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: