Uploaded image for project: 'MongoDB Command Line Tools'
  1. MongoDB Command Line Tools
  2. TOOLS-76

mongoimport should default to w:majority

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0-rc0
    • Component/s: mongoimport
    • Labels:
      None
    • Documentation Changes:
      Completed

      Description

      data in a replica set is only cluster-wide committed when it reaches a majority of the set. thus, it would be good if mongoimport defaults to w:majority.

      this should be done intelligently to avoid slowness. for example on an unsharded collection, getLastError w:majority could be done every 1000th write and at the end (at a minimum, the latter). on a sharded collection, it is trickier to make fast and guarantee all writes are to a majority; that said, this would be better than the current behavior regardless.

      note that this would also if done not just at the end but every Nth write (e.g. N=1000) create flow-control to the secondaries : if the secondaries are slower than the primaries, the import won't overrun the oplog to the point they are out of sync.

      Perhaps there is already a similar ticket the main point here is that the default should change.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                adinoyi.omuya Adinoyi Omuya
                Reporter:
                ian.whalen Ian Whalen
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: