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

Cannot list collections on 2.6 server if multiple batches are employed

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.14.0, 2.13.2
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible

      When there are more than 100 collections in a 2.6 server, listing collection fails because getMore request appears to be malformed.

      Working request with driver 041c43607dc51db8e6dc11955271b07957180251:

      (byebug) Clients.default.database.collection_names.count
      D, [2020-10-21T23:07:05.054230 #26031] DEBUG -- : MONGODB | Topology type 'unknown' initializing.
      D, [2020-10-21T23:07:05.055192 #26031] DEBUG -- : MONGODB | There was a change in the members of the 'Unknown' topology.
      D, [2020-10-21T23:07:05.055514 #26031] DEBUG -- : MONGODB | Server localhost:12620 initializing.
      D, [2020-10-21T23:07:05.056530 #26031] DEBUG -- : MONGODB | Waiting for up to 3.42 seconds for servers to be scanned: #<Cluster topology=Unknown[localhost:12620] servers=[#<Server address=localhost:12620 UNKNOWN>]>
      D, [2020-10-21T23:07:05.068437 #26031] DEBUG -- : MONGODB | Server description for localhost:12620 changed from 'unknown' to 'primary'.
      D, [2020-10-21T23:07:05.071176 #26031] DEBUG -- : MONGODB | Server localhost:12622 initializing.
      D, [2020-10-21T23:07:05.071560 #26031] DEBUG -- : MONGODB | Server localhost:12621 initializing.
      D, [2020-10-21T23:07:05.073816 #26031] DEBUG -- : MONGODB | Topology type 'Unknown' changed to type 'ReplicaSetWithPrimary'.
      D, [2020-10-21T23:07:05.128765 #26031] DEBUG -- : MONGODB | Waiting for up to 3.35 seconds for servers to be scanned: #<Cluster topology=ReplicaSetWithPrimary[localhost:12620,localhost:12622,localhost:12621,name=ruby-driver-rs,v=1,e=5f90f52eae76c07be9d72593] servers=[#<Server address=localhost:12620 PRIMARY replica_set=ruby-driver-rs pool=#<ConnectionPool size=0 (0-5) used=0 avail=0 pending=0>>,#<Server address=localhost:12622 UNKNOWN>,#<Server address=localhost:12621 UNKNOWN>]>
      D, [2020-10-21T23:07:05.134991 #26031] DEBUG -- : MONGODB | Server description for localhost:12622 changed from 'unknown' to 'secondary'.
      D, [2020-10-21T23:07:05.137302 #26031] DEBUG -- : MONGODB | There was a change in the members of the 'ReplicaSetWithPrimary' topology.
      D, [2020-10-21T23:07:05.140900 #26031] DEBUG -- : MONGODB | Server description for localhost:12621 changed from 'unknown' to 'secondary'.
      D, [2020-10-21T23:07:05.143319 #26031] DEBUG -- : MONGODB | There was a change in the members of the 'ReplicaSetWithPrimary' topology.
      D, [2020-10-21T23:07:05.146015 #26031] DEBUG -- : MONGODB | localhost:12620 req:14 conn:1:1 | admin.getnonce | STARTED | {}
      D, [2020-10-21T23:07:05.146309 #26031] DEBUG -- : MONGODB | localhost:12620 req:14 | admin.getnonce | SUCCEEDED | 0.000s
      D, [2020-10-21T23:07:05.146501 #26031] DEBUG -- : MONGODB | localhost:12620 req:15 conn:1:1 | admin.authenticate | STARTED | {}
      D, [2020-10-21T23:07:05.147497 #26031] DEBUG -- : MONGODB | localhost:12620 req:15 | admin.authenticate | SUCCEEDED | 0.001s
      D, [2020-10-21T23:07:05.147782 #26031] DEBUG -- : MONGODB | localhost:12620 req:16 conn:1:1 | mongoid_test.find | STARTED | {"find"=>"system.namespaces", "filter"=>{}, "$db"=>"mongoid_test"}
      D, [2020-10-21T23:07:05.148444 #26031] DEBUG -- : MONGODB | localhost:12620 req:16 | mongoid_test.find | SUCCEEDED | 0.000s
      D, [2020-10-21T23:07:05.151741 #26031] DEBUG -- : MONGODB | localhost:12620 req:17 conn:1:1 | mongoid_test.getMore | STARTED | {"getMore"=>#<BSON::Int64:0x00005563c65b1588 @value=47629854486>, "batchSize"=>0, "collection"=>"system.namespaces", "$db"=>"mongoid_test"}
      D, [2020-10-21T23:07:05.152469 #26031] DEBUG -- : MONGODB | localhost:12620 req:17 | mongoid_test.getMore | SUCCEEDED | 0.000s
      103
      (byebug) 
      

      Broken request with driver e2e545c6f7e269cc9001aff43a0a0830cbd5d744:

      (byebug) Clients.default.database.collection_names.count
      D, [2020-10-21T23:05:52.471973 #25940] DEBUG -- : MONGODB | Topology type 'unknown' initializing.
      D, [2020-10-21T23:05:52.472765 #25940] DEBUG -- : MONGODB | There was a change in the members of the 'Unknown' topology.
      D, [2020-10-21T23:05:52.473029 #25940] DEBUG -- : MONGODB | Server localhost:12620 initializing.
      D, [2020-10-21T23:05:52.474837 #25940] DEBUG -- : MONGODB | Waiting for up to 3.42 seconds for servers to be scanned: #<Cluster topology=Unknown[localhost:12620] servers=[#<Server address=localhost:12620 UNKNOWN>]>
      D, [2020-10-21T23:05:52.487129 #25940] DEBUG -- : MONGODB | Server description for localhost:12620 changed from 'unknown' to 'primary'.
      D, [2020-10-21T23:05:52.490085 #25940] DEBUG -- : MONGODB | Server localhost:12622 initializing.
      D, [2020-10-21T23:05:52.490510 #25940] DEBUG -- : MONGODB | Server localhost:12621 initializing.
      D, [2020-10-21T23:05:52.492412 #25940] DEBUG -- : MONGODB | Topology type 'Unknown' changed to type 'ReplicaSetWithPrimary'.
      D, [2020-10-21T23:05:52.547878 #25940] DEBUG -- : MONGODB | Waiting for up to 3.35 seconds for servers to be scanned: #<Cluster topology=ReplicaSetWithPrimary[localhost:12620,localhost:12622,localhost:12621,name=ruby-driver-rs,v=1,e=5f90f52eae76c07be9d72593] servers=[#<Server address=localhost:12620 PRIMARY replica_set=ruby-driver-rs pool=#<ConnectionPool size=0 (0-5) used=0 avail=0 pending=0>>,#<Server address=localhost:12622 UNKNOWN>,#<Server address=localhost:12621 UNKNOWN>]>
      D, [2020-10-21T23:05:52.554840 #25940] DEBUG -- : MONGODB | Server description for localhost:12622 changed from 'unknown' to 'secondary'.
      D, [2020-10-21T23:05:52.558195 #25940] DEBUG -- : MONGODB | There was a change in the members of the 'ReplicaSetWithPrimary' topology.
      D, [2020-10-21T23:05:52.562436 #25940] DEBUG -- : MONGODB | Server description for localhost:12621 changed from 'unknown' to 'secondary'.
      D, [2020-10-21T23:05:52.565115 #25940] DEBUG -- : MONGODB | There was a change in the members of the 'ReplicaSetWithPrimary' topology.
      D, [2020-10-21T23:05:52.567768 #25940] DEBUG -- : MONGODB | localhost:12620 req:14 conn:1:1 | admin.getnonce | STARTED | {}
      D, [2020-10-21T23:05:52.568032 #25940] DEBUG -- : MONGODB | localhost:12620 req:14 | admin.getnonce | SUCCEEDED | 0.000s
      D, [2020-10-21T23:05:52.568240 #25940] DEBUG -- : MONGODB | localhost:12620 req:15 conn:1:1 | admin.authenticate | STARTED | {}
      D, [2020-10-21T23:05:52.569189 #25940] DEBUG -- : MONGODB | localhost:12620 req:15 | admin.authenticate | SUCCEEDED | 0.001s
      D, [2020-10-21T23:05:52.569465 #25940] DEBUG -- : MONGODB | localhost:12620 req:16 conn:1:1 | mongoid_test.find | STARTED | {"find"=>"system.namespaces", "filter"=>{}, "$db"=>"mongoid_test"}
      D, [2020-10-21T23:05:52.570134 #25940] DEBUG -- : MONGODB | localhost:12620 req:16 | mongoid_test.find | SUCCEEDED | 0.000s
      D, [2020-10-21T23:05:52.573370 #25940] DEBUG -- : MONGODB | localhost:12620 req:17 conn:1:1 | mongoid_test.getMore | STARTED | {"getMore"=>#<BSON::Int64:0x000055799424b018 @value=47607416575>, "batchSize"=>0, "collection"=>"namespaces", "$db"=>"mongoid_test"}
      D, [2020-10-21T23:05:52.573664 #25940] DEBUG -- : MONGODB | localhost:12620 req:17 | mongoid_test.getMore | FAILED | collection dropped between getMore calls (17356) | 0.000202625s
      *** Mongo::Error::OperationFailure Exception: collection dropped between getMore calls (17356) (on localhost:12620)
      
      nil
      

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

              Created:
              Updated:
              Resolved: