I don't understand the internals well enough but to get online-backup going I 
removed the log truncate operation from neo core in XaLogicalLog class which 
seems to conflict with the log still in use. I furthermore removed the 
timestamp checks in NeoBackup.prepare() because whenever I e.g. use Neoclipse 
to access either storage file timestamps are changed, leading to failing 
backups afterwards. I suspect the version should be fine for now. An overall 
checksum in the Neo store is something to consider in the long run I guess.

Can someone please confirm that my above changes are safe? I am happy to 
provide the patch for these then.

It also would be helpful to get some design understanding around 
online-backups. Otherwise it's all trial and error ;(

-Andreas

On Thu, May 14, 2009 at 06:35:28PM -0700, Andreas Guenther wrote:
> Hi,
> 
> I tried running the online-backup component but most if not all all test 
> cases are failing with the same error pasted below. I hope it's something 
> trivial as I really would like to get the backup feature going.
> 
> Any ideas?
> -Andreas
> 
> 
>         at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
> May 14, 2009 6:19:27 PM org.neo4j.impl.transaction.xaframework.XaLogicalLog 
> renameCurrentLogFileAndIncrementVersion
> WARNING: Failed to truncate log at correct size
> java.io.IOException: The requested operation cannot be performed on a file 
> with a user-mapped section open
>         at sun.nio.ch.FileChannelImpl.truncate0(Native Method)
>         at sun.nio.ch.FileChannelImpl.truncate(FileChannelImpl.java:340)
>         at 
> org.neo4j.impl.transaction.xaframework.XaLogicalLog.renameCurrentLogFileAndIncrementVersion(XaLogicalLog.java:753)
>         at 
> org.neo4j.impl.transaction.xaframework.XaLogicalLog.close(XaLogicalLog.java:929)
>         at 
> org.neo4j.impl.transaction.xaframework.XaContainer.close(XaContainer.java:100)
>         at 
> org.neo4j.impl.nioneo.xa.NeoStoreXaDataSource.close(NeoStoreXaDataSource.java:232)
>         at 
> org.neo4j.impl.nioneo.xa.NioNeoDbPersistenceSource.stop(NioNeoDbPersistenceSource.java:71)
>         at org.neo4j.api.core.NeoJvmInstance.shutdown(NeoJvmInstance.java:228)
>         at org.neo4j.api.core.EmbeddedNeo.shutdown(EmbeddedNeo.java:195)
>         at org.neo4j.onlinebackup.Util.stopNeo(Util.java:88)
>         at org.neo4j.onlinebackup.Util.stopNeo(Util.java:94)
>         at 
> org.neo4j.onlinebackup.MultiRunningTest.backup(MultiRunningTest.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at 
> org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>         at 
> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>         at 
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at 
> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>         at 
> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
>         at 
> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
>         at 
> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>         at 
> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>         at 
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at 
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>         at 
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>         at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>         at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
> 
> _______________________________________________
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to