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

mongoexport --forceTableScan description can be misleading

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 01112017-cleanup
    • Component/s: manual
    • Labels:
    • # Replies:
      3
    • Last comment by Customer:
      true
    • Actual Time:
      2

      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

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                4 years, 28 weeks, 3 days ago
                Date of 1st Reply: