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

java.lang.IllegalStateException logged when migrating Segment to Document

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.13
    • 1.7.0, 1.6.1, 1.4.16, 1.8.0
    • upgrade
    • None

    Description

      After migrating the SegmentMK to DocumentMK following exception is logged:

      12:38:58.816 INFO  [main] RepositorySidegrade.java:310      Copying checkpoints is not supported for this combination of node stores
      12:38:58.835 ERROR [main] BackgroundObserver.java:176       Uncaught exception in org.apache.jackrabbit.oak.plugins.document.bundlor.BundlingConfigHandler@3c782d8e
      com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Missing external change for branch revision:
              at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2199) ~[guava-15.0.jar:na]
              at com.google.common.cache.LocalCache.get(LocalCache.java:3932) ~[guava-15.0.jar:na]
              at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721) ~[guava-15.0.jar:na]
              at org.apache.jackrabbit.oak.plugins.document.MemoryDiffCache.getChanges(MemoryDiffCache.java:83) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.TieredDiffCache.getChanges(TieredDiffCache.java:50) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.compare(DocumentNodeStore.java:1616) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.AbstractDocumentNodeState.compareAgainstBaseState(AbstractDocumentNodeState.java:114) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.bundlor.BundlingConfigHandler.contentChanged(BundlingConfigHandler.java:70) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:134) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:128) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_73]
              at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) [guava-15.0.jar:na]
              at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1.run(BackgroundObserver.java:148) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.commons.concurrent.NotifyingFutureTask.run(NotifyingFutureTask.java:73) [oak-commons-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.commons.concurrent.NotifyingFutureTask.onComplete(NotifyingFutureTask.java:62) [oak-commons-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver.contentChanged(BackgroundObserver.java:312) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.spi.commit.CompositeObserver.contentChanged(CompositeObserver.java:52) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.spi.commit.ChangeDispatcher.contentChanged(ChangeDispatcher.java:80) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$4.headOfQueue(DocumentNodeStore.java:837) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.CommitQueue.waitUntilHeadOfQueue(CommitQueue.java:237) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.CommitQueue.done(CommitQueue.java:92) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.done(DocumentNodeStore.java:816) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1585) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$Persisted$1.call(DocumentNodeStoreBranch.java:606) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$Persisted$1.call(DocumentNodeStoreBranch.java:600) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.withCurrentBranch(DocumentNodeStoreBranch.java:313) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.access$600(DocumentNodeStoreBranch.java:58) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$Persisted.merge(DocumentNodeStoreBranch.java:600) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge0(DocumentNodeStoreBranch.java:185) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge(DocumentNodeStoreBranch.java:119) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.merge(DocumentRootBuilder.java:167) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1694) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.upgrade.RepositorySidegrade.copyState(RepositorySidegrade.java:344) [classes/:na]
              at org.apache.jackrabbit.oak.upgrade.RepositorySidegrade.copy(RepositorySidegrade.java:279) [classes/:na]
              at org.apache.jackrabbit.oak.upgrade.RepositorySidegrade.copy(RepositorySidegrade.java:242) [classes/:na]
              at org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.sidegrade(OakUpgrade.java:92) [classes/:na]
              at org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:78) [classes/:na]
              at org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:67) [classes/:na]
              at org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:48) [classes/:na]
              at org.apache.jackrabbit.oak.upgrade.cli.AbstractOak2OakTest.prepare(AbstractOak2OakTest.java:109) [test-classes/:na]
      ...
      Caused by: java.lang.IllegalStateException: Missing external change for branch revision:
              at org.apache.jackrabbit.oak.plugins.document.JournalEntry$3$1.computeNext(JournalEntry.java:490) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.JournalEntry$3$1.computeNext(JournalEntry.java:478) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-15.0.jar:na]
              at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-15.0.jar:na]
              at org.apache.jackrabbit.oak.plugins.document.JournalEntry.addTo(JournalEntry.java:453) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.JournalDiffLoader.readTrunkChanges(JournalDiffLoader.java:168) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.JournalDiffLoader.call(JournalDiffLoader.java:88) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.diffImpl(DocumentNodeStore.java:2427) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.access$700(DocumentNodeStore.java:136) [oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$8.call(DocumentNodeStore.java:1621) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.MemoryDiffCache$1.call(MemoryDiffCache.java:89) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.document.MemoryDiffCache$1.call(MemoryDiffCache.java:83) ~[oak-core-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4724) ~[guava-15.0.jar:na]
              at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522) ~[guava-15.0.jar:na]
              at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315) ~[guava-15.0.jar:na]
              at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278) ~[guava-15.0.jar:na]
              at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193) ~[guava-15.0.jar:na]
              ... 71 common frames omitted
      12:38:58.836 INFO  [main] DocumentNodeStore.java:663        Starting disposal of DocumentNodeStore with clusterNodeId: 1 (id: 1, startTime: 1487072336420, machineId: mac:38c98646844e, instanceId: /Users/rekawek/granite/jackrabbit-oak/oak-upgrade, pid: 76780, uuid: 4089c6f3-c563-4734-8816-4ee7fb712ce5, readWriteMode: null, state: NONE, revLock: NONE, oakVersion: 1.8-SNAPSHOT)
      

      It can be reproduced with the oak-upgrade test:

      mvn -f oak-upgrade/pom.xml clean test -Dtest=SegmentToMongoTest && cat oak-upgrade/target/unit-tests.log
      

      Attachments

        1. OAK-5651.patch
          4 kB
          Tomek Rękawek
        2. OAK-5651-1.patch
          3 kB
          Marcel Reutegger

        Activity

          People

            tomek.rekawek Tomek Rękawek
            tomek.rekawek Tomek Rękawek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: