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

Bulk unique updates (similar to bulk inserts)

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.2.0
    • Component/s: Write Ops
    • Labels:
      None

      1. There is no bulk unique updates feature. There are updates which apply to multiple documents based on query criteria, but if I have to update multiple documents querying by their unique key, I would have to do them one by one.

      2. To do them one-by-one by passing j=True, is a big performance killer. With default journalling time of 100ms each update causes a 33ms delay (1/3rd time) when the next journal commit happens.

      3. The only option for fast updates is not to pass j=True for every update. What we learnt from the forums is, if we update 500 documents without journaling, and then call getLastError with journalling concern, that would still only guarantee the success of the 500th record, and not all records including 1-499. Thus for 1-499 records, I would have to follow the fire-and-forget approach, and I cannot be 100% confident that they are updated and journalled successfully.

      https://groups.google.com/forum/#!topic/mongodb-user/24jyqWmYIIY

      To summarise, we need fast and completely safe updates, but we are not able to achieve that owing to essentially 2 reasons as we see -

      i. No bulk update function to update multiple unique documents with separate criteria, similar to bulk insert.
      ii. The journal is not committed immediately, but rather it waits for 1/3rd of the configured journalCommitInterval time.

      We feel our problem would be solved, if bulk updates is implemented, that supports journaling parameter.

            Assignee:
            Unassigned Unassigned
            Reporter:
            narjunkumar arjun kumar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: