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

Improve concurrent update detection and behavior

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.7.3
    • Fix Version/s: 5.8
    • Component/s: Core, Core VCS
    • Backlog priority:
      700
    • Upgrade notes:
      Hide

      A new ConcurrentUpdateException (subclass of ClientException) may be thrown during a save() when a low-level concurrency issue is detected. It is up to the application code to rollback the transaction and retry if possible.

      Show
      A new ConcurrentUpdateException (subclass of ClientException) may be thrown during a save() when a low-level concurrency issue is detected. It is up to the application code to rollback the transaction and retry if possible.

      Description

      Some concurrent updates in different overlapping transactions cause low-level SQL exceptions that should be managed better.

      The basic use case is:

      • worker starts running fulltext update
      • worker checks that the document exists
      • main thread deleted the document
      • main thread commits
      • worker saves the new fulltext, generating an INSERT or UPDATE on a row in the fulltext table which has as id a foreign key to hierarchy, which has just been deleted

      In this case we have an exception which can be trapped and analyzed by the worker framework to allow retries.

      Another case is pure deadlocks, where two transactions modify tables in different orders with a save() in between. In this case a deadlock (detected and broken by the database) is inevitable, and should at least be reported as a ConcurrentUpdateException.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: