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

Cluster DescriptionChanged events raised unpredictably during Initialize

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2
    • Affects Version/s: 2.0.1
    • Component/s: Connectivity
    • Labels:
      None

      The Initialize methods in SinglerServerCluster and MultiServerCluster call UpdateClusterDescription at the end of the method to raise a Cluster DescriptionChanged event with a Description containing the newly added servers.

      However, the methods also call Initialize on each server earlier in the method, which starts up the heartbeat loops. Since the heartbeat loops run in parallel to the Initialize method, any DescriptionChanged events raised as a result of heartbeats could occur before, after or even in parallel with the DescriptionChanged event raised by the Initialize method.

      The DescriptionChanged events should occur in a predictable order, and should never be raised in parallel.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: