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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Connectivity
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      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.

       

            Assignee:
            Unassigned
            Reporter:
            Vincent Kam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: