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

Possible race condition on Elasticsearch indexing command

    XMLWordPrintable

    Details

    • Tags:
    • Upgrade notes:
      Hide

      There is nothing to do when upgrading to 8.3. To enable optimistic concurrency control in 6.0 or 7.10 you need to override the Elasticsearch config (elasticsearch-config.xml.nxftl to add a property {{ useExternalVersion="true" }} to the elasticSearchRemote or elasticSearchLocal tag.

      Show
      There is nothing to do when upgrading to 8.3. To enable optimistic concurrency control in 6.0 or 7.10 you need to override the Elasticsearch config ( elasticsearch-config.xml.nxftl to add a property {{ useExternalVersion="true" }} to the elasticSearchRemote or elasticSearchLocal tag.
    • Sprint:
      nxBD 8.2.1, nxBD 8.2.2, nxBD 8.4.5
    • Story Points:
      2

      Description

      Two concurrent indexing commands of the same document with different version data can be indexed in a wrong order.
      In this case the older version of a document overwrites the newer version.

      This happens when there is a particular sequence:

      • T1: save a document in v1, trigger an async indexation
      • I1: indexation thread load the document v1 and build its json representation
      • T2: save the document in v2, trigger an async indexation
      • I2: indexation thread load the document v2 and build its json representation
      • I2: submit the indexing command to ES with v2
      • I1: submit the indexing command to ES with v1 overriding v2

      To prevent this wrong ordering of concurrent indexing, we should have an optimistic concurrency control based on indexing command time.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 hours, 30 minutes
                  6h 30m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.