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

Orphans documents returning in the mongo 3.6.8

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      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?

            Assignee:
            Unassigned Unassigned
            Reporter:
            cintyfmoura@yahoo.com.br Cintia Freitas
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: