Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1742

Git Connector - Certain commits cannot be parsed and therefore returned

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 3.0.1.Final
    • Fix Version/s: 3.1.0.Final
    • Component/s: None
    • Labels:
      None

      Description

      When parsing certain commits (most likely commits involving 3-way conflict resolution merging) an exception is thrown:

      org.modeshape.jcr.cache.DocumentStoreException: /commit/e2e665fab36a1d35f1399e95433229a0ba27623f
      	at org.modeshape.connector.git.GitConnector.getDocumentById(GitConnector.java:228)
      	at org.modeshape.jcr.federation.FederatedDocumentStore.get(FederatedDocumentStore.java:230)
      	at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:142)
      	at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:155)
      	at org.modeshape.jcr.cache.document.WorkspaceCache.getNode(WorkspaceCache.java:178)
      	at org.modeshape.jcr.cache.document.AbstractSessionCache.getNode(AbstractSessionCache.java:171)
      	at org.modeshape.jcr.cache.document.WritableSessionCache.getNode(WritableSessionCache.java:144)
      	at org.modeshape.jcr.JcrSession.node(JcrSession.java:412)
      	at org.modeshape.jcr.AbstractJcrNode$ChildNodeResolver.nodeFrom(AbstractJcrNode.java:3396)
      	at org.modeshape.jcr.JcrChildNodeIterator.nextNode(JcrChildNodeIterator.java:113)
      	at org.modeshape.jcr.AbstractJcrRepositoryTest.navigate(AbstractJcrRepositoryTest.java:292)
      	at org.modeshape.connector.git.GitConnectorTest.shouldReadCommitSubgraph(GitConnectorTest.java:113)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: java.lang.IllegalArgumentException: TreeWalk should have exactly two trees.
      	at org.eclipse.jgit.diff.DiffEntry.scan(DiffEntry.java:138)
      	at org.eclipse.jgit.diff.DiffEntry.scan(DiffEntry.java:114)
      	at org.modeshape.connector.git.GitCommitDetails.computeDifferences(GitCommitDetails.java:164)
      	at org.modeshape.connector.git.GitCommitDetails.execute(GitCommitDetails.java:119)
      	at org.modeshape.connector.git.GitConnector.getDocumentById(GitConnector.java:223)
      	... 41 more
      

      The commit on which it fails is:

      commit e2e665fab36a1d35f1399e95433229a0ba27623f
      Merge: 1e63519 85b135a
      Author: Randall Hauch <rhauch@gmail.com>
      Date:   Wed Dec 5 17:01:10 2012 -0600
      
          MODE-1513 Merge branch 'federation' into 'master'
      
          Conflicts:
              modeshape-jcr/src/main/java/org/modeshape/jcr/JcrRepository.java
              modeshape-jcr/src/test/java/org/modeshape/jcr/JcrNodeTypesTest.java
              modeshape-jcr/src/test/java/org/modeshape/jcr/JcrRepositoryStartupTest.java
      

      This can be reproduced by running the shouldReadCommitSubgraph test with a large enough number of nodes so that the above commit is part of the result.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                hchiorean Horia Chiorean
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: