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

mongoimport should default to w:majority

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.8.0-rc0
    • mongoimport
    • None
    • 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

              adinoyi.omuya@mongodb.com Adinoyi Omuya
              ian@mongodb.com Ian Whalen (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: