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

Internal document version/timestamp (system change token)

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.2
    • Component/s: Core
    • Epic Link:
    • Impact type:
      Data Persistence Change
    • Upgrade notes:
      Hide

      A new column "systemchangetoken" (for VCS) or a new field "ecm:systemChangeToken" (for DBS) is now written with each document and incremented automatically at each write.

      When migrating from 9.1, the column hierarchy.changetoken (for VCS) or the property ecm:changeToken (for DBS MongoDB) has changed type, it must be deleted so that Nuxeo can recreate it with the correct type:

      VCS
      ALTER TABLE hierarchy DROP COLUMN changetoken
      
      DBS MongoDB
      db.default.update({}, {$unset: {"ecm:changeToken": 1} }, {multi: 1})
      
      Show
      A new column "systemchangetoken" (for VCS) or a new field "ecm:systemChangeToken" (for DBS) is now written with each document and incremented automatically at each write. When migrating from 9.1, the column hierarchy.changetoken (for VCS) or the property ecm:changeToken (for DBS MongoDB) has changed type, it must be deleted so that Nuxeo can recreate it with the correct type: VCS ALTER TABLE hierarchy DROP COLUMN changetoken DBS MongoDB db. default .update({}, {$unset: { "ecm:changeToken" : 1} }, {multi: 1})
    • Sprint:
      nxFG 9.2.2, nxFG 9.2.3, nxFG 9.2.4, nxFG 9.2.5, nxFG 9.2.6
    • Story Points:
      5

      Description

      We need an internal version/timestamp (system change token) for every document. This version will be an opaque string that's updated automatically by the database layer every time the document changes in any way.

      This is needed in order to have efficient and accurate reporting of document changes, for synchronization / get-if-modified operations.

      This is different from the base change token (NXP-22019), which is oriented toward user-level operations.


      Every modification to a document (whether done by the system or by a user) now increments a system value called the "system change token", which is part of the value returned by the API DocumentModel.getChangeToken(). This allows an observer doing synchronization tasks to have precise information about whether or not a document has changed.

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