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

Concurrently adding nodes fails with CommitFailedException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5
    • 0.7
    • jcr
    • None

    Description

      Concurrently adding nodes fails with CommitFailedException with a conflict on the node type property index.

      oak-jcr currently does not retry commits. In some cases retries are not useful, e.g. if conflict markers were added by AnnotatingConflictHandler. However, in the case described above, the conflict is introduced by the property index commit hook and a commit will eventually succeed when retried often enough.

      There's one problem though, the MicroKernel API only specifies a generic MicroKernelException. JavaDoc for MicroKerne.commit() does not contain too much detail about the conflicting case. It currently only mentions that the implementation tries to merge non-conflicting changes. I think we need to be more specific here, even if we have to say it's implementation specific. A client needs to know what it can expect. Is an implementation allowed to simply overwrite a conflict? Is it a requirement to detect a conflict and throw an exception (and what kind of exception)?

      Attachments

        1. OAK-442-p2.patch
          2 kB
          Alex Deparvu

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mreutegg Marcel Reutegger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: