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

XMLWordPrintableJSON

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

      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 Stearn
            Reporter:
            Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: