Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-4640

Provide a way for commit hook to record meta data for a given commit

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.8, 1.6.0
    • Component/s: core
    • Labels:
      None

      Description

      Currently as part of commit the caller can provide a CommitInfo instance which captures some metadata related to commit being performed. Note that CommitInfo instance passed to NodeStore is immutable.

      For some usecases we need a way to add some more metadata to on going
      commit from within the CommitHook

      • OAK-4586 - Here we need to record nodetypes of nodes which got modified as part of current commit
      • OAK-4412 - Here we want to generate Documents for modified nodestate (per index definition) and "attach" it to current commit

      This meta information would later be used by Observer.

      To enable such cases some mutable state needs to be exposed as part of CommitInfo which can be used by CommitHooks.

      As per discussion of DL [1] this can be done by adding a new CommitAttributes instance which can be accessed from CommitInfo

      [1] http://mail-archives.apache.org/mod_mbox/jackrabbit-oak-dev/201608.mbox/%3CCAHCW-mk%3DTMQ_q20dPSmdr7Q%3DcR8OfMDdJceDTd-pGs0pk_cK0g%40mail.gmail.com%3E

        Attachments

        1. OAK-4640-v1.patch
          18 kB
          Chetan Mehrotra

          Issue Links

            Activity

              People

              • Assignee:
                chetanm Chetan Mehrotra
                Reporter:
                chetanm Chetan Mehrotra
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: