Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11050

db.collection.stats metrics are not all sync'd after the call to validate

      The collstats documentation states:


      After an unclean shutdown of a mongod using the Wired Tiger storage engine, size statistics reported by collStats may be inaccurate.

      The amount of drift depends on the number of insert, update, or delete operations performed between the last checkpoint and the unclean shutdown. Checkpoints usually occur every 60 seconds. However, mongod instances running with non-default --syncdelay settings may have more or less frequent checkpoints.

      Run validate on each collection on the mongod to to restore the correct statistics after an unclean shutdown.


      The final paragraph implies that all statistics will be trued up after validate is run. However, this is not the case.

      In terms of count: `validate()` will only true up the fast count if it is off as the result of an unclean shutdown. In general usage the fast count in WT should be considered an estimate (particularly if there are active writes to a collection)

      Moreover, other metrics like the number of documents inserted or removed will not be trued up either.

      Please update the documentation to clarify what is guaranteed to be accurate after a call to validate.

            Assignee:
            jason.price@mongodb.com Jason Price
            Reporter:
            arnie.listhaus@mongodb.com Arnie Listhaus
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 10 weeks, 1 day ago