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

Support for URI Connection Strings in MongoShardedClient Does Not Work as Designed

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.3
    • Affects Version/s: 1.8.2
    • Component/s: None
    • None

      There are two problems here:

      • MongoShardedClient#from_uri and URIParser#connection do not support returning a MongoShardedClient instance. This should either be fixed, or an exception should be thrown when this is used from a MongoShardedClient instance.
      • When specifying the connection string URI from ENV['MONGODB_URI'], MongoShardedClient.new raises an exception when you specify more than one mongos.
      ENV['MONGODB_URI'] = 'mongodb://brandonblack-mbpr.local:3333,brandonblack-mbpr.local:3334'
      client = Mongo::MongoShardedClient.new
      => NoMethodError: undefined method `split' for #<Array:0x007fecc405a3d0>
      

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            brandon.black@10gen.com Brandon Black
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: