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

Update conflict detection should be optimized for big documents

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.10
    • Component/s: Performance, Write Ops
    • Labels:
      None
    • Query

      When updating document with hundreds of properties, the time spent in update conflict detection is high.

      The FieldRefSet::insert is visible in flame graph.

      Attached is a js script that reproduce the problem that create a bottleneck in production.

      Just for information, we also do update conflict detection on our application before submitting the update commands to MongoDB. We had the same performance problem using a similar algorithm, this has been fixed using a different approach:
      https://github.com/nuxeo/nuxeo/commit/eeceab7024445b88082f7406290478d9f6702c28

        1. update-conflict.png
          update-conflict.png
          57 kB
        2. update-conflict.svg
          980 kB
        3. update-conflict-prod.svg
          78 kB
        4. update-conflict-test.js
          0.3 kB

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            bdelbosc Delbosc Benoit
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: