Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-31511

AllowPartialResults not working when sharded cluster is backed by replica set

    • Query
    • ALL

      The AllowPartialResults cursor method (DBQuery.Option.partial) does not have the desired effect when a shard backed by a REPLICA SET becomes unavailable.

      In first example below I have set up a sharded cluster where each shard is backed by a single MONGOD. AllowPartialResults works as expected - if I kill on MONGOD I get results back from the other MONGOD. In the second example below, I have set up exact same cluster except I have backed each shard with a [single mongod] replica set. AllowPartialResults now does not work, in the sense that if I kill the mongod that forms the replica set, the db.collection.find().allowPartialResults() fails reporting an error saying "could not find host matching read preference { mode: \"primary\", tags: [ {} ] } for set shard1".

            backlog-server-query Backlog - Query Team (Inactive)
            jg1 John Gibbons
            3 Vote for this issue
            22 Start watching this issue