Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1073

non-blocking version of db.eval

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • JavaScript
    • None

    Description

      This would be useful for doing data migrations on the server. Currently if I run a migration on a large collection, everything blocks:

      db.eval(function(){
      b.users.find().forEach( function(obj)

      { obj.name = obj.first_name + " " + obj.last_name; delete obj.first_name; delete obj.last_name; db.things.save(obj); }

      );
      })

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            tmm1 Aman Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: