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

RepositorySidegrade: AsyncIndexUpdate throws a IllegalArgumentException after migrating from segment to document store

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0, 1.4
    • core, upgrade
    • None

    Description

      After migrating a repository from segment store to the document store, the AsyncIndexUpdate can throw a IllegalArgumentException because it doesn't understand the segment stores checkpoint format:

      java.lang.IllegalArgumentException: 5f18ca57-a72b-4c4d-8105-03a3486094cc
              at org.apache.jackrabbit.oak.plugins.document.Revision.fromString(Revision.java:236)
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.retrieve(DocumentNodeStore.java:1558)
              at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run(AsyncIndexUpdate.java:279)
      

      The checkpoint references are stored in the node "/:async".

      To solve the problem, multiple solution are possible.

      One (more complex) solution is to preserve checkpoints (copy the repository state of the very first checkpoint, then apply the diff for each later checkpoint, until all checkpoints are copied). This requires a new API to set change the checkpoint id, and is slow if there are many checkpoints. Let's not do this for now.

      The easier solution is to remove or clear the checkpoint references, that is, the "/:async" node. I think this can be done in all cases (even when migrating from segment store to segment store and from document store to document store), because the new repository doesn't know the checkpoints of the old repository (even thought, no exception should be thrown in this case).

      Attachments

        Issue Links

          Activity

            People

              thomasm Thomas Mueller
              thomasm Thomas Mueller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: