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

Improve internal change token for optimistic locking

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 9.1
    • Fix Version/s: 9.2
    • Component/s: Core
    • Epic Link:
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      New behavior:

      • calling doc.putContextData(CoreSession.USER_CHANGE, Boolean.TRUE) then CoreSession.saveDocument(doc) will flag the save as a "user change".
      Show
      New behavior: calling doc.putContextData(CoreSession.USER_CHANGE, Boolean.TRUE) then CoreSession.saveDocument(doc) will flag the save as a "user change".
    • Sprint:
      nxFG 9.2.1, nxFG 9.2.2, nxFG 9.2.3, nxFG 9.2.4, nxFG 9.2.5, nxFG 9.2.6
    • Story Points:
      5

      Description

      Ticket NXP-19435 gives the base framework to have an internal change token. However it must be improved to be more fine-grained and allow concurrent updates if one is "user" and the other is "system" and they don't overlap.


      The change token returned to the user-level API DocumentModel.getChangeToken() is now a mix of a system change token (updated at every change) and a user change token (updated at every user change). A "user change" is a change initiated by a user-level operation, which is defined as a document save that passes a previous change token using doc.putContextData(CoreSession.CHANGE_TOKEN, token), or that marks the save as an explicit user change using doc.putContextData(CoreSession.USER_CHANGE, Boolean.TRUE).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 week, 30 minutes
                  1w 30m