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

ISSUE: Wrong Document Count returning from MONGODBServer

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.0
    • Component/s: Index Maintenance, Querying
    • Labels:
      None

      Description:
      We are using MongoDB Server version 3.4
      We have a collection with 5.5 Million=(5482968) documents and indexSize=283.6MB . we have set the RAM Size as 1.1GB
      When we try to retrieve the document count from MongoDBServer taking long time to respond and finally returning wrong count
      we have created indexes on 8 fields on this collection .Our Collection Size =7.8GB

      Issue we are facing:
      1. Some times Wrong document count is returned from MongoDBServer
      Actual Count Returned from MonogoDBServer=5080966
      Expected Count Returned from MonogoDBServer=5482968
      2. Some times MongoDBServer taking too long time to respond [in minutes]

      Note: In production, this collection can grow to have more documents (Billions of documents)

      Requesting you to Kindly address our below queries ,
      a)Whether increasing the RAM Size will address our above Mentioned issues[count ]
      b)Will reducing number of indexed columns/fields help in addressing these issues?

      How to Reproduce:

      1.Create a collection say 'testCollection' with 5.5Million or more document with average document size of 1.5KiB
      2.Create index for 8 fields ensure that indexSize grows to >=280MB
      3.Set the mongoDB RAMSize to 1.1GB
      *db.adminCommand(

      {setParameter: 1, internalQueryExecMaxBlockingSortBytes: 1073741824}

      )*
      4.Perform db.testCollection.count(with some condition on a field)

        1. log.zip
          11.71 MB
        2. diagnostic.data.zip
          54.06 MB
        3. SERVER-32200.zip
          500 kB
        4. systemprofile_gt-4minutes.zip
          18 kB

            Assignee:
            mark.agarunov Mark Agarunov
            Reporter:
            Urs Sandeep [X]
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: