Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1914

bulk.execute() should not fail if there were no operations

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.3
    • Affects Version/s: Not Applicable
    • Component/s: None

      Description

      Filed in the wrong component on purpose, because it looks like the form validation for the NODE component is broken.

      bulk.execute() should not fail if there were no operations

      Executing a sequence of zero bulk operations should do nothing, right? That was my expectation - the same way looping over an array of 0 elements does nothing, and so on.

      Instead, the Node driver throws `Invalid Operation, no operations specified`. This is not helpful. I' m programmatically adding operations to a bulkOp, and sometimes there might be no operations - that's fine.

      Now I have to separately keep track of whether at least one operation has been added, which is mildly cumbersome.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Reporter:
            dandv Dan Dascalescu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: