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

mongos seems to swallow 'No matching object found' errors when running findAndModify on a sharded collection.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.1, 1.9.0
    • Affects Version/s: 1.8.0-rc1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux x86_64
    • ALL

      Steps to reproduce:

      1. Set up a sharded system with at least two shards (in my case they are both replica sets with a primary and two secondaries)
      2. Enable sharding on a database
      3. Shard a collection in that database.
      4. Insert enough data that chunks are migrated to both shards (this may not be required)
      5. Run findAndModify querying for a document that does not exist using the shard key.

      Expected results:

      mongos returns 'No matching object found'

      Actual result:

      mongos returns

      {u'ok': 1.0}

      This was found while investigating http://jira.mongodb.org/browse/PYTHON-219 so the problem also exists in at least 1.7.6.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: