Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4449

Publish cluster changed events in the order that they were applied

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.5.0
    • Affects Version/s: None
    • Component/s: Monitoring
    • None
    • Fully Compatible
    • Not Needed

      Currently, {{ClusterDescriptionChangedEvent}}s are published to any registered {{ClusterListener}}s in an undefined order. In particular, it's possible that an event A that was applied to the internally-tracked state after an event B could appear to be publish before (or concurrent with) event B.

      This makes it impossible for ClusterListener implementations to use the events to track the current state of the cluster.

      The driver should ensure the following properties:

      • Event publication is serialized. {{ClusterListener implementations should not have to apply their own synchronization
      • Events are published in the order that they were applied to the cluster state

      Also, see https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst#event-order-and-concurrency

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: