Server & topology change events are dispatched out of order

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Critical - P2
    • 2.7.0.rc0
    • Affects Version/s: None
    • Component/s: Spec Comp
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      On master:

      butler% CLIENT_DEBUG=1 MONGODB_URI=mongodb://localhost:27100/\?replicaSet=ruby-driver-rs bs spec/spec_tests/sdam_monitoring_spec.rb'[1:2]'
      [mongo] Warning: No private key present, creating unsigned gem.
      Run options: include {:ids=>{"./spec/spec_tests/sdam_monitoring_spec.rb"=>["1:2"]}}                                                                    
      D, [2018-10-26T23:49:18.007544 #27811] DEBUG -- : MONGODB | EVENT: #<TopologyOpening topology=Unknown[]>                              |  ETA: ??:??:?? 
      D, [2018-10-26T23:49:18.007677 #27811] DEBUG -- : MONGODB | Topology type 'unknown' initializing.
      D, [2018-10-26T23:49:18.007985 #27811] DEBUG -- : MONGODB | EVENT: #<ServerOpening address=a:27017 topology=Single>
      D, [2018-10-26T23:49:18.008054 #27811] DEBUG -- : MONGODB | Server a:27017 initializing.
      D, [2018-10-26T23:49:18.008243 #27811] DEBUG -- : MONGODB | EVENT: #<TopologyChanged prev=Unknown[a:27017] new=Single>
      D, [2018-10-26T23:49:18.008328 #27811] DEBUG -- : MONGODB | Topology type 'unknown' changed to type 'single'.
      D, [2018-10-26T23:49:18.010231 #27811] DEBUG -- : MONGODB | Error running ismaster on a:27017: getaddrinfo: Name or service not known
      D, [2018-10-26T23:49:18.509767 #27811] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::ServerDescriptionChanged>
      D, [2018-10-26T23:49:18.509991 #27811] DEBUG -- : MONGODB | Server description for a:27017 changed from 'unknown' to 'standalone'.
      D, [2018-10-26T23:49:18.510231 #27811] DEBUG -- : MONGODB | EVENT: #<TopologyChanged prev=Single new=Single>
      D, [2018-10-26T23:49:18.510364 #27811] DEBUG -- : MONGODB | There was a change in the members of the 'single' topology.
       5/5 |============================================================= 100 =============================================================>| Time: 00:00:00 
      D, [2018-10-26T23:49:18.517912 #27811] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::ServerClosed>
      D, [2018-10-26T23:49:18.518089 #27811] DEBUG -- : MONGODB | Server a:27017 connection closed.
      D, [2018-10-26T23:49:18.518199 #27811] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::TopologyClosed>
      D, [2018-10-26T23:49:18.518309 #27811] DEBUG -- : MONGODB | Topology type 'single' closed.
      
      Finished in 0.51328 seconds (files took 0.62719 seconds to load)
      5 examples, 0 failures
      

      The server description is referencing single topology before there's a topology change event announcing that change.

            Assignee:
            Oleg Pudeyev (Inactive)
            Reporter:
            Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: