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

Docs should strongly advise against use of db.eval()

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • v1.3.12
    • None
    • manual
    • None

    Description

      In general, using db.eval() or the $eval command is a Very Bad idea. The docs should discourage its use, and encourage the use of client-side operations (possibly with projection) instead.

      Problems with $eval:

      • Acquires the global lock
      • Cannot be used in a sharded environment
      • Requires __system privilege
      • Non-performant since it runs in JavaScript

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            william.zola@10gen.com William Zola
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 28 weeks, 2 days ago