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

Optimize list appends in VCS

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0-HF30, 7.10-HF08, 8.3
    • Component/s: Core VCS
    • Backlog priority:
      500
    • Upgrade notes:
      Hide

      In 8.3 and later, optimized list appends are active by default. In 7.10 and earlier they are not.

      For 8.3 (default value is "false") the previous behavior can be re-activated using:

      <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
      <property name="org.nuxeo.vcs.list-delete-before-append">true</property>
      </extension>

      For 7.10-HF08 (default value is "true") the new optimized behavior can be activated by using "false" above.

      For 6.0-HF30 (default value is "true") the new optimized behavior can be activated by using in nuxeo.conf:

      org.nuxeo.vcs.list-delete-before-append=false

      Show
      In 8.3 and later, optimized list appends are active by default. In 7.10 and earlier they are not. For 8.3 (default value is "false") the previous behavior can be re-activated using: <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration"> <property name="org.nuxeo.vcs.list-delete-before-append">true</property> </extension> For 7.10-HF08 (default value is "true") the new optimized behavior can be activated by using "false" above. For 6.0-HF30 (default value is "true") the new optimized behavior can be activated by using in nuxeo.conf: org.nuxeo.vcs.list-delete-before-append=false
    • Sprint:
      nxFG 8.2.2
    • Story Points:
      3

      Description

      In the current implementation, when a new item is added to a list, the following operations are done:

      1. run a DELETE statemet to remove all the entries that correspond to this list in the associated table
      2. run as many INSERT statements as there are items in the list

      We can do metter and only run INSERT statements when we detect that only new values were added to the list.

      However note that the current code has notable behavior when using parallelism. If we INSERT the new list element as a new row, both parallel INSERTs will work but they will both use the same pos attribute so the two inserted elements will be in indeterminate order (and potentially observed differently by different connections). This indeterminism (due to two pos values being the same) will only be corrected if an operation is done on the list that is not a simple append.

        Attachments

          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 - 2 days
                2d