Author: tomekr
Date: Wed Jun 20 12:45:06 2018
New Revision: 1833911
URL: http://svn.apache.org/viewvc?rev=1833911&view=rev
Log:
OAK-7561: Don't migrate the checkpoints in oak-store-composite seed
initialization
- use the up-to-date targetBuilder before committing the /:async changes
Modified:
jackrabbit/oak/trunk/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/InitialContentMigrator.java
Modified:
jackrabbit/oak/trunk/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/InitialContentMigrator.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/InitialContentMigrator.java?rev=1833911&r1=1833910&r2=1833911&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/InitialContentMigrator.java
(original)
+++
jackrabbit/oak/trunk/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/InitialContentMigrator.java
Wed Jun 20 12:45:06 2018
@@ -130,12 +130,11 @@ public class InitialContentMigrator {
String fullTextAsyncId = targetNodeStore.checkpoint(Long.MAX_VALUE,
Collections.singletonMap("name", "fulltext-async"));
String asyncId = targetNodeStore.checkpoint(Long.MAX_VALUE,
Collections.singletonMap("name", "async"));
- targetBuilder = targetRoot.builder();
+ targetBuilder = targetNodeStore.getRoot().builder();
targetBuilder.getChildNode(":async").remove();
NodeBuilder asyncNode = targetBuilder.child(":async");
asyncNode.setProperty("fulltext-async", fullTextAsyncId);
asyncNode.setProperty("async", asyncId);
-
targetNodeStore.merge(targetBuilder, EmptyHook.INSTANCE,
CommitInfo.EMPTY);
markMigrationAsDone();