Maker maker = DBMaker
.fileDB(new File(mapdbMmapDirectory.get() + this.serializerName))
.fileMmapEnable()
.fileMmapCleanerHackEnable()
.closeOnJvmShutdown();
Maker in read mode
Maker maker = DBMaker
.fileDB(new File(mapdbMmapDirectory.get() + this.serializerName))
.fileMmapEnable()
.fileMmapCleanerHackEnable()
.readOnly()
.cacheLRUEnable()
.cacheSize(10000)
.closeOnJvmShutdown();
HTreeMap
HTreeMap<K, V> data = maker.make().hashMapCreate(this.serializerName)
.keySerializer(this.keySerializer())
.valueSerializer(this.valueSerializer())
.makeOrGet();
FYI data contains 158 000 entries and the exception is raised randomly, even if i remove only 1K entries.
Best regards
Hi,
would you have a stacktrace?
Jan
--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This is not necessary data corruption. It is an assertion that serializer read less data than it wrote. It could be caused by your serializer.
What type of serialization are you using?
Jan
On Tuesday, February 23, 2016 01:54:03 Michaël C. wrote:
Hi,
Thanks for your quick answer
org.mapdb.DBException$DataCorruption: Data were not fully read, check your serializer. Read size:391, expected size:396
at org.mapdb.Store.deserialize(Store.java:418)
at org.mapdb.StoreWAL.get2(StoreWAL.java:527)
at org.mapdb.Store.get(Store.java:253)
at org.mapdb.Engine$ReadOnlyWrapper.get(Engine.java:369)
at org.mapdb.HTreeMap.getInner(HTreeMap.java:649)
at org.mapdb.HTreeMap.get(HTreeMap.java:583)
at com.netadge.grinder.dsr.MapDbTest.testLookUp(MapDbTest.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Best regards,
public Serializer<V> valueSerializer() {
return new Serializer<V>() {
@Override
public void serialize(DataOutput out, V value) throws IOException {
out.writeInt(value.XXXXX.intValue());
out.writeInt(value.XXXXX.intValue());
out.writeInt(value.XXXXX.intValue());
out.writeInt(value.XXXXX.intValue());
out.writeInt(value.XXXXX.intValue());
out.writeInt(value.XXXXX.intValue());
out.writeInt(value.XXXXX.intValue());
out.writeUTF(value.XXXXX);
}
@Override
public V deserialize(DataInput in, int available) throws IOException {
return new V(
in.readInt(),
in.readInt(),
in.readInt(),
in.readInt(),
in.readInt(),
in.readInt(),
in.readInt(),
in.readUTF());
}
@Override
public boolean isTrusted() {
return true;
}
};
}
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+unsubscribe@googlegroups.com.
That looks ok.
What happens if you set 'isTrusted' to false? That will make more strict size checking, and should for sure diagnose data corruption
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
...
Store.forDB(this.db).fileLoad();
If i disable this operation, i get a new error message
org.mapdb.DBException$EngineGetVoid: Recid passed to Engine.get() does not exist. Possible data corruption!
at org.mapdb.StoreDirect.indexValGet(StoreDirect.java:1577)
at org.mapdb.StoreWAL.indexValGet(StoreWAL.java:307)
at org.mapdb.StoreWAL.get2(StoreWAL.java:517)
at org.mapdb.Store.get(Store.java:253)
at org.mapdb.Engine$ReadOnlyWrapper.get(Engine.java:369)
at org.mapdb.HTreeMap.getInner(HTreeMap.java:662)
at org.mapdb.HTreeMap.get(HTreeMap.java:583)
at com.*******.MapDbTest.testLookUp(MapDbTest.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
FYI I'm able to say that this behaviour exists in MMAP file (fileMmapEnable) but not in default file mode (RAF)
...
No progress yet, I will review code changes in beta13 today.
Is this issue happening with beta12?
--
...
I will give it 30 minutes tomorrow, but I would not give it much hope.
There are way too many things which could cause it, and I focus on 3.0
Jan
--