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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • v1.3.12
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      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

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

              Created:
              Updated:
              Resolved:
              9 years, 39 weeks, 4 days ago