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
- is related to
-
OAK-7687 :async node is being removed during the partial migration
- Closed