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

Orphan documents returning on the mongo 3.6.8

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL

      Description

      We are having the problem of duplicate posts (orphans) being returned in the secondary nodes. I saw that this problem was resolved at https://jira.mongodb.org/browse/SERVER-5931; however, we currently have a cluster with 9 shards and 3 replica sets, all nodes using version 3.6.8 and the problem persists.

      The collection has 2.2 billion documents with hashed shard key.

       

      I have been periodically excluding orphans and, even moments after that process, I find duplicates. I performed this aggregation as a way of debugging and got the output below:

      db.investigation_cards.aggregate([{
          $match: {
              _id: {$gt:ObjectId("5e43dab00000000000000000")}    }},
          {$group: {"_id" : "$_id" , "count" : { "$sum" : 1}}},
          {$match: {count: {$gt: 1}}}
      ])
      

      {"_id":{"$oid":"5e43f3a8ae813900169e6156"},"count":2} 
      {"_id":{"$oid":"5e43f3a8ae813900169e6155"},"count":2} 
      {"_id":{"$oid":"5e43f08b96d31b0015e73a00"},"count":2} 
      {"_id":{"$oid":"5e43e506d914da00158f1cc3"},"count":2} 
      {"_id":{"$oid":"5e43e508e1a3d00016b249d9"},"count":2}
       {"_id":{"$oid":"5e43e5bfc048ba0015973c58"},"count":2} 
      {"_id":{"$oid":"5e43e25f5eea640015f12ea1"},"count":2} 
      {"_id":{"$oid":"5e4400a82656d10015a9397d"},"count":2} 
      {"_id":{"$oid":"5e43e5bfc048ba0015973c5a"},"count":2} 
      {"_id":{"$oid":"5e43e508e1a3d00016b249da"},"count":2} 
      {"_id":{"$oid":"5e43dbfa7e15b900156d0f9f"},"count":2} 
      {"_id":{"$oid":"5e43dbfa7e15b900156d0f9b"},"count":2} 
      {"_id":{"$oid":"5e43e5bfc048ba0015973c5b"},"count":2} 
      {"_id":{"$oid":"5e43e9f464e8b30015fc7f24"},"count":2} 
      {"_id":{"$oid":"5e43eb009c38d3103c3bcce4"},"count":2} 
      {"_id":{"$oid":"5e43e7e364e8b30015fc7906"},"count":2} 
      {"_id":{"$oid":"5e43f3a8ae813900169e6153"},"count":2} 
      {"_id":{"$oid":"5e43e508e1a3d00016b249dc"},"count":2} 
      {"_id":{"$oid":"5e43e7e364e8b30015fc790a"},"count":2} 
      {"_id":{"$oid":"5e43dbfa7e15b900156d0f9d"},"count":2}
      

      If I do a search for any of these _id I get two identical documents in response.
      Is there any other solution to solve this problem?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              josef.ahmad Josef Ahmad
              Reporter:
              cintyfmoura@yahoo.com.br Cintia Freitas
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: