Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21019

DBS long transaction generates inefficient backend queries

    XMLWordPrintable

    Details

      Description

      For long transaction used in import process or for batch update. The transient states accumulated in the transaction can reach thousand elements.

      Many queries (hasChild, getChildrenState, ...) are built with a clause to exclude the docs that are present in the transient state.

      The result are very long queries (long to build and long to parse by the backend) for instance a hasChild with MongoDB:

      2016-11-10T11:15:05.523+0000 I COMMAND  [conn39] warning: log line attempted (1803kB) over max size (10kB), printing beginning and end ... command nuxeo.default command: find { find: "default", filter: { ecm:parentId: "2433ad43-15e7-425b-a7b6-1401de74fbd4", ecm:name: "the-doc-name", ecm:id: { $nin: [ "666324c9-b649-41c5-9690-70405c420b64", ... 
      "ad676d76-be1f-4646-836a539b" ] } }, projection: { _id: 1 }, limit: 1, singleBatch: true } keysExamined:0 docsExamined:0 cursorExhausted:1 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:0 reslen:119 locks:{ Global: { acquireCount: { r: 2 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { r: 1 } } } protocol:op_query 112ms
      

      The size of the ignored keys must be capped.


      The queries used in the import process of batch update have been improved to be more efficient.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d