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

mongoexport --forceTableScan description can be misleading

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 01112017-cleanup
    • manual
    • 2
    • true

    Description

      RE: http://docs.mongodb.org/manual/reference/program/mongoexport/#cmdoption--forceTableScan


      When you run with --forceTableScan, mongoexport does not use $snapshot. As a result, the export produced by mongoexport can reflect the state of the database at many different points in time.

      The above statement gives the impression that when you use mongoexport normally (without --forceTableScan) it would reflect a single point in time. Which is not true.

      mongoexport never reflects a single point in time (unless you stop writes to the database prior to running it), regardless of the use or non-use of --forceTableScan.

      --forceTableScan might cause the output to include the same document twice (representing two variants in time) but it does not affect the chances of the output representing a sheared cross-section in time - resulting in a copy of the database which never actually existed.

      The only reason that $snapshot (i.e not using --forceTableScan) avoids duplicates in the output is because it walks the unique immutable _id index which cannot possibly result in seeing the same document twice - this is unrelated to a point-in-time though ($snapshot is a misleading name but we're stuck with it).

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrew.ryder@mongodb.com Andrew Ryder (Inactive)
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 4 weeks, 5 days ago