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

Large discrepancy in SizeStorer after unclean shutdown

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.12, 3.2.6, 3.3.6
    • Component/s: WiredTiger
    • Labels:
    • Storage Execution
    • ALL
    • Hide
      1. Start a standalone mongod instance with wiredTiger storage engine.
      2. Insert documents to a collection until the data volume runs out of disk space.
      3. Allocate/free more disk space for the data volume.
      4. Start the mongod instance again.
      5. Check the results of count() and itcount() for the collection. The numbers are different.
      Show
      Start a standalone mongod instance with wiredTiger storage engine. Insert documents to a collection until the data volume runs out of disk space. Allocate/free more disk space for the data volume. Start the mongod instance again. Check the results of count() and itcount() for the collection. The numbers are different.

      The mongod instance (with WiredTiger storage engine) is down when there is insufficient disk space for the data volume. After adding more space to the dbpath and restart the mongod instance, count() returns incorrect value as below:

      > db.users.count()
      1527296
      > db.users.find().itcount()
      1605004
      

      SERVER-19472 and DOCS-5682 mentioned that count may off by up to 1000 documents after an unclean shutdown. However, count off to 70k+ documents in my test.

      Have tested 3.0.12, 3.2.6 and 3.3.6, all have the same issue.

      db.collection.validate(true) will reset the value for count() to the correct number.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            linda.qin@mongodb.com Linda Qin
            Votes:
            1 Vote for this issue
            Watchers:
            25 Start watching this issue

              Created:
              Updated: