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

Split the CommitHook interface

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.4
    • core
    • None

    Description

      The CommitHook interface has two methods, beforeCommit() and afterCommit(), since the symmetry originally seemed like a good idea. However, in practice these methods are not really so symmetric after all.

      For example, unlike afterCommit() the beforeCommit() method may end up being called multiple times for a given changeset if it needs to be repeatedly rebased or otherwise revised before it can be committed. There isn't even any guarantee that a particular changeset on which beforeCommit() has been called ever gets committed. And on the other hand there are good reasons to avoid calling afterCommit() on each and every commit that has been made. Instead it could be called only every now and then to cover larger sets of changes.

      Thus I'd like to split the CommitHook interface to two parts that I'd tentatively call CommitEditor and Observer.

      Attachments

        Activity

          People

            jukkaz Jukka Zitting
            jukkaz Jukka Zitting
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: