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

mongoexport --forceTableScan description can be misleading

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • Affects Version/s: None
    • Component/s: manual
    • Labels:

      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).

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

              Created:
              Updated:
              Resolved:
              8 years, 42 weeks, 3 days ago