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

Long running transactions might cause Nuxeo Drive to miss some document updates

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.6.0-HF15
    • Fix Version/s: 5.6.0-HF16, 5.7.1
    • Component/s: Nuxeo Drive
    • Tags:
    • Upgrade notes:
      Hide

      A new column log_date is introduced in the nxp_log_date column. By default the log_date of the old events will be null which should not be a problem.

      It is possible to set the value of the log_date = null rows to log_event_date instead.

      Show
      A new column log_date is introduced in the nxp_log_date column. By default the log_date of the old events will be null which should not be a problem. It is possible to set the value of the log_date = null rows to log_event_date instead.

      Description

      Suppose a user updates 3 documents in a row (e.g. using drag and drop) and that writing documents take 2s each (for instance computing some thumbnails synchronously, a S3BinaryManager blob upload or something similarly costly). Let's call the first document creation / update start start at t0.

      The CoreSession will fire document created / updated events at t0, t0 + 2, t0 + 4. The event audit logger is an asynchronous event listener that will insert the whole batch of events in the audit table at once at time (t0 + 5).

      In the mean time let's assume that the client did two non-overlapping range queries: query 1 for the range [t0 - 2 to t0 + 3[ at time (t0 + 3) and query 2 for the range [t0 + 3, t0 + 8[ at time (t0 + 8).

      The audit event logger is an asynchronous listener will only see the last document update that occurred at (t0 + 4) in the query 2. query 1 will return 0 result as the changed are not yet committed in the audit db at that time.

      Therefore the range queries made by the client should not rely upon log_event_date but rather use a new log_date generated by the database at insertion time to guarantee a near monotonic behavior.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: