Uploaded image for project: 'MongoDB ETL Tools'
  1. MongoDB ETL Tools
  2. TOOLS-2122

Inconsistent document count when using mongodump with the --query argument

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.6.6, 3.6.7
    • Fix Version/s: None
    • Component/s: mongodump
    • Labels:
      None
    • Environment:
      OSX (server and client)
    • Case:

      Description

      Inconsistent document count from mongodump when using the --query argument and performing an equality match on an object-based _id field.

      Problem appears to be reproducible on a standalone, RS or sharded cluster.

      Steps to Reproduce

      Data set

      db.coll.insertMany([
      { _id: {id: "ABC", version: 1}, text: "a" }
      { _id: {id: "ABC", version: 2}, text: "a" }
      { _id: {id: "ABC", version: 3}, text: "a" }
      { _id: {id: "ABC", version: 4}, text: "a" }
      { _id: {id: "ABC", version: 5}, text: "a" }
      { _id: {id: "ABC", version: 6}, text: "a" }
      { _id: {id: "ABC", version: 7}, text: "a" }
      ])
      

      mongodump command

      > mongodump -d test -c coll --query '{_id: {id: "ABC", version:7 }}'
      

      results

      ~ 90% of the time 1 document is dumped
      ~ 10% of the time 0 documents are dumped

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                david.golden David Golden
                Reporter:
                mark.baker-munton Mark Baker-Munton
              • Votes:
                3 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: