Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1357

Client constructor does I/O contrary to spec requirements

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.0.rc0
    • Affects Version/s: None
    • Component/s: Spec Comp
    • None

      https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#client-construction states:

      > The client's constructor MUST NOT do any I/O.

      However the following will hang for a while, note the timeout message:

      averagest% irb -Ilib -rmongo         
      irb(main):001:0> m=Mongo::Client.new(['12.12.12.12'])
      D, [2018-06-12T19:28:54.498585 #15714] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::TopologyOpening topology=Unknown>
      D, [2018-06-12T19:28:54.498822 #15714] DEBUG -- : MONGODB | Topology type 'unknown' initializing.
      D, [2018-06-12T19:28:54.499146 #15714] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::ServerOpening address=12.12.12.12:27017 topology=Unknown>
      D, [2018-06-12T19:28:54.499280 #15714] DEBUG -- : MONGODB | Server 12.12.12.12:27017 initializing.
      m
      D, [2018-06-12T19:29:04.502460 #15714] DEBUG -- : MONGODB | execution expired
      => #<Mongo::Client:0x47151180222960 cluster=12.12.12.12:27017>
      irb(main):002:0> m
      

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: